Question

I am using ZK framework and I want to integrate zk in jsp.I have tried to run following code at server.

Test.jsp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib uri="http://www.zkoss.org/jsp/zul" prefix="z" %>
<html>
    <head>
        <title>Test of ZUL on JSP</title>
    </head>
    <body>
        <h1>1. Header outside z:page</h1>
        <z:page>
            <h2>2. Header in z:page</h2>
            <z:window id="win" title="Test" border="normal">
                <p>3. Content in z:window</p>
                <z:button label="Overlap" onClick="win.doOverlapped()" />
            </z:window>
            <p>
                4. Content in z:page after z:window
            </h2>
        </z:page>
        <p>5. Content after z:page</p>
    </body>
</html>

I have got this Error And I have already added zuljsp.jar in My application Build path

org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/zkoss/web/servlet/xel/PageRequestContext org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Please help me out from this error thanks

Was it helpful?

Solution

The JAR has got to be into webapp's runtime classpath. Dropping the JAR file(s) in /WEB-INF/lib should do it. You don't need to do anything else. You don't need to mess with project's Build Path properties in an IDE.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top