利用jetty环境运行jsp文件出现问题

南客 发布于 2013/12/14 15:44
阅读 4K+
收藏 0

JFINAL大神,我运行JFINAL_DEMO_JSP时候,运行环境是jetty 8.1.8,文件名是JSP的时候出现一下问题,什么情况!运行其他文件如html就没有问题点哦,freemaker试图也是没有问题的!求救大神。

我的开发工具MYECLIPSE 8.6

HTTP ERROR 500

Problem accessing /common/index.jsp. Reason:

javax.servlet.ServletContext.getJspConfigDescriptor()Ljavax/servlet/descriptor/JspConfigDescriptor;

Caused by:

java.lang.NoSuchMethodError: javax.servlet.ServletContext.getJspConfigDescriptor()Ljavax/servlet/descriptor/JspConfigDescriptor;
	at org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:106)
	at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:196)
	at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:259)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1336)
	at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:365)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Thread.java:619)
Powered by Jetty://


以下是问题补充:

@南客:利用TOMCAT环境倒是没有问题的! (2013/12/14 15:48)
加载中
0
南湖船老大
南湖船老大
jetty默认配置是不支持JSP的
0
JFinal
JFinal
在googlecode上下载jfinal_demo_for_jsp项目,将lib目录下的jar包用上
0
南客
南客
我直接下载了,导入自己的工作空间,原封不动的!还是不行!
K2Fibre
K2Fibre
需要修改 WebRoot/WEB-INF/a_little_config.txt 文件,填入正确的数据库连接用户名、密码
0
火灵珠
servlet-api.jar不是最新的,不是报了NoSuchMethodError吗?
0
火灵珠
jasper.jar与 servlet-api.jar不匹配,找个
ServletContext
类有
getJspConfigDescriptor()
servlet-api.jar
返回顶部
顶部