当前位置: 首页 > 工具软件 > Jetty Runner > 使用案例 >

jetty runner的配置_jetty-runner 如何配置 jstl

魏澄邈
2023-12-01

HTTP ERROR 500

Problem accessing /SpringMVC/list.jsp. Reason:

Server Error

Caused by:

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)

at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:277)

at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75)

at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:243)

at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:124)

at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:421)

at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:479)

at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1435)

at org.apache.jasper.compiler.Parser.parse(Parser.java:139)

at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:227)

at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)

at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)

at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)

at org.eclipse.jetty.jsp.JettyJspServlet.service(JettyJspServlet.java:108)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)

at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)

at org.eclipse.jetty.server.Server.handle(Server.java:524)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)

at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)

at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)

at java.lang.Thread.run(Thread.java:748)

使用JSTL標簽,但是在使用Jetty Runner部署時,發生錯誤。使用gretty則沒有問題。

另外在本地使用jetty則沒有問題,那就有可能是插件的問題了。

解決:

在/WEB-INF/lib目錄下加入jstl的jar包。

並且在web.xml配置jsp-config:

http://java.sun.com/jsp/jstl/core/WEB-INF/lib/c.tld或者直接把相關的*.tld放在WEB-INF文件夾下,這樣就不用再配置taglib了。

我的external libraries已經存在jstl的jar包了,但是我認為這只是解決編譯時的依賴問題,運行時並沒有解決(找不到依賴的JSTL jar包)。

如果不去閱讀jetty runner的源碼,雖然只是解決了問題,但終究不是學習之道。

Jetty-Runner:A plugin that allows you to quickly run Jetty from IntelliJ IDEA.

 类似资料: