我想将zk集成到jsp中,但出现错误
我正在使用 ZK 框架,我想将 zk 集成到 jsp 中。我尝试在服务器上运行以下代码。
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>
我收到此错误并且我已经在我的应用程序构建路径
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/zkoss/web/servlet/xel 中添加了 zuljsp.jar /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)
请帮我解决这个错误 谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JAR 必须位于 web 应用程序的运行时类路径中。将 JAR 文件拖放到
/WEB-INF/lib
中即可。你不需要做任何其他事情。您无需在 IDE 中弄乱项目的构建路径属性。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.