How to configure JSTL JETTY-RUNNER

HTTP ERROR 500Problem accessing /SpringMVC/list.jsp. Reason: Server ErrorCaused 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.j ava: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.s erver.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.ecl ipse.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 )

Use JSTL tags, but when using Jetty Runner deployment, an error occurs. There is no problem with gretty.

In addition, there is no problem when using jetty locally, it may be a plug-in problem.

Solution:

Add the jstl jar package in the /WEB-INF/lib directory.

And configure jsp-config in web.xml:

  http://java.sun.com/jsp/jstl/core< span style="color:#e8bf6a"> /WEB-INF/lib/c.tld  

Or put the relevant *.tld directly under the WEB-INF folder, so that you don’t need to configure taglib.

My external libraries already have the jstl jar package, but I think this is just to solve the dependency problem at compile time, and it is not solved at runtime (cannot find the dependent JSTL jar Bag).

If you don’t read the source code of jetty runner, although it only solves the problem, it is not the way to learn after all.

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

Leave a Comment

Your email address will not be published.