| Summary: | jsp-file with load-on-startup not precompiled | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Thomas Zimmermann <zimmermann.tho> | ||||
| Component: | jsp | Assignee: | Jan Bartel <janb> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | janb, jetty-inbox | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 7.5.x | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Thomas Zimmermann
Created attachment 208892 [details]
Simple war to demonstrate missing load-on-startup behaviour.
Very simple webapp with some jsps to demonstrate the issue of missing <load-on-startup> behaviour with <jsp-file>s.
Thomas, You're absolutely correct about this, but I had a look at our code and it seems that its been missing from jetty for forever! Also, looking at the jsp code - and we use the jasper impl from Glassfish - there doesn't seem to be any support code in there to do this either. The Tomcat version of jasper seems to have been modified to support it. I think the best that I can do is to raise a bug over on Glassfish jsp project for them to add support. Jan Tracked at JSP project here: http://java.net/jira/browse/JSP-23 Jan, Thank you very much for your effort and fast response, it's very much appreciated. The bug/feature is not that critical to me, just something I noticed. I guess passing it on to the glassfish guys resolves it for now. Thomas Just documenting the results of some investigations so that it is not forgotten: + jetty 9.2.0.M0 switched to using apache jasper instead of glassfish jasper + that didn't resolve this problem as the container needs to take some steps to get the jsp container to pre-compile servlets that are <jsp-file>s: + tomcat does this: change the class of the servlet definition for the servlet to be the JspServlet, copy in all the init-params from the main JspServlet instance, and add in the value of the <jsp-file> as an init-param named "jspFile". When the JspServlet is started (because of the <load-on-startup>) it checks for this init-param and calls the compiler on it. Fixed for 9.2.0.M1 if you use the apache-jsp module (new in 9.2). Jan |