Community
Participate
Working Groups
Deploying a "Dynamic Web Project" by exporting it as a WAR-file to jetty/webapps and starting Jetty with "java -jar start.jar" works fine (both Servlets and JSP). (Also described on http://stackoverflow.com/questions/9113346/pwc6345-there-is-an-error-in-invoking-javac-error-when-using-jetty-wtp-plugi) But if I use Jetty WTP plugin, only Servlets works fine. When I visit a JSP-page I get an error: org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:92) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:119) at org.apache.jasper.compiler.Jsr199JavaCompiler.compile(Jsr199JavaCompiler.java:208) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:384) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453) 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:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:558) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:488) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:973) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:417) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:907) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:271) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:98) at com.example.FormProcessServlet.doPost(FormProcessServlet.java:39) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:558) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:488) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:973) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:417) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:907) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) at org.eclipse.jetty.server.Server.handle(Server.java:346) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:442) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:941) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533) at java.lang.Thread.run(Unknown Source)
I don't know that the WTP plugin supports enabling jsp or not, I thought it did but its been ages since I used it. if you can modify the command line given to jetty you should be able to add jsp oh, actually if you go into the jetty instance that the WTP adaptor is pointing to you can enable jsp in the start.ini file and that ought to work. reopen if you can't get it to work at all and I'll try and take a look, but that ought to work for you
The command line options given to Jetty looks the same, from Jetty WTP and "native" Jetty. In start.ini (both "native" and in Eclipse Servers) I have this line: OPTIONS=Server,jsp,jmx,resources,websocket,ext,plus,annotations I have looked in the other config files too, but haven't found anything that I think can help.
I think this page should answer it: http://wiki.eclipse.org/Jetty/Howto/Configure_JSP Just install the most recent jetty and the version of jsp will support using an external (ecj) compiler. Jan
oh! you were using 8.0.4 yes, listen to the oracle of jsp, Jan :)
(In reply to comment #3) > I think this page should answer it: > > http://wiki.eclipse.org/Jetty/Howto/Configure_JSP > > Just install the most recent jetty and the version of jsp will support using an > external (ecj) compiler. > > Jan I already use the most recent stable Jetty, version 8.0.4. Jetty works fine if I deploy the app with JSP as an exported WAR-file, but not when deployed from Jetty WTP plugin. I have read that "Configure_JSP" page now, but can't see how it help me. I think it most be some misconfiguration by the Jetty WTP since it works fine when exported as a WAR-file.
give 8.1.0.v20120127 a whirl
(In reply to comment #6) > give 8.1.0.v20120127 a whirl I have tried that one now. But I got the exactly same error, it doesn't work from Jetty WTP but exported as a WAR-file. There is also another problem with both versions, I have to add two external JAR-files manually from jetty/lib/annotations , it's only the JAR-files from jetty/lib that is added automatically. That workaround is described on http://pipecuts.wordpress.com/2011/01/30/classnotfoundexception-org-objectweb-asm-classvisitor/
well, wtp is not well maintained so if your using maven I would recommend giving webby a try perhaps
Did you define the system property as described here: http://wiki.eclipse.org/Jetty/Howto/Configure_JSP ? If you don't define that property, then I believe that the jdk's internal compiler is going to be tried, and obviously you don't have one. Jan
(In reply to comment #9) > Did you define the system property as described here: > > http://wiki.eclipse.org/Jetty/Howto/Configure_JSP > > ? > > If you don't define that property, then I believe that the jdk's internal > compiler is going to be tried, and obviously you don't have one. > > Jan Thanks. It worked when I added: -Dorg.apache.jasper.compiler.disablejsr199=true to the start.ini-file in Eclipse for the Jetty WTP Server.