Hello all, having christmas fun configuring Jetty. I have hello world and freemarker servlets working but I'm stuck getting it to serve JSPs.
>From what I can see, I should use Jasper with Jetty to get JSP support. Reckon I have the JspServlet loading and serving without Exceptions, but I think it's failing to find .jsp files, and I've tried putting them in the working directory, in WEB-INF, and various other places with no luck. I'm guessing there's some option for Jasper which is automagically configured in a Tomcat setup which I'll have to do explicitly for Jetty, but I don't know what. The init params for JspServlet offer no useful control variables about pointing to .jsp files... http://tomcat.apache.org/tomcat-4.1-doc/jasper-howto.html#Configuration Jetty is launched explicitly like... Server server = new Server(8080); ...and I have the equivalent of web.xml wiring all requests for JSPs to the jasper JspServlet class, which looks like this in Guice... serve("*.jsp").with(JspServlet.class); ...but when a jsp is actually routed to the JspServlet it responds... HTTP ERROR: 404 Problem accessing /index.jsp. Reason: /index.jsp Powered by Jetty:// Am I right in thinking I can use Jasper's JspServlet to give me JSPs on Jetty? The Jetty docs are pretty sketchy on JSPs, and everything else on the subject points to Tomcat. If Jasper is the right way to go, what configuration step am I missing, e.g. to somehow tell Jasper where to look for .jsp files? Given the mysterious error message, perhaps there's a missing dependency? If so, can anyone tell me what dependencies I need to add to Jetty 8 in order to be able to serve JSPs (I've been adding many combinations of things from Maven repos and no luck so far). Currently the relevant dependencies in my POM are... org.eclipse.jetty jetty-distribution 8.0.0.M2 org.eclipse.jetty jetty-jsp-2.1 7.22 javax.servlet jstl 1.2 org.apache.tomcat jsp-api 6.0.29 org.apache.tomcat jasper 6.0.29 If anyone can guide me to initialise Jasper's JspServlet correctly, or suggest a alternate JSP engine with a known working configuration on Jetty, that would be great. Cefn http://cefn.com _______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
