Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Jetty 9 : Jasper not saving .class files to work dir?

Hi All,
after recently upgrading from Jetty 7 to Jetty 9, I noticed that in the scratch/work dir, Jasper no longer writes a .class file for each JSP that it compiles. It only writes the generated .java file.
the JSPs work fine, but there seems to be no .class file written to the scratch/work dir. This used to occur in Jetty 7.

To explain what I'm talking about:
1. I get latest Jetty 9 distribution (I used 9.0.3.v20130506)
2. I run it with "java -jar start.jar"
3. I open http://127.0.0.1:8080/test/jsp/dump.jsp in my browser, and see the JSP's correct output
4. somewhere in my temp directory (for me it's C:\Users\simon\AppData\Local\Temp\jetty-0.0.0.0-8080-test.war-_test-any-\jsp\org\apache\jsp\jsp), I find the file dump_jsp.java being generated, but no .class

The same occurs in Jetty 8.1.11: no .class file.

If however I do the same test in Jetty 7 (7.1.6.v20100715 is the version I was using in the past), I see the file dump_jsp.class in the corresponding scratch dir for that server.

For reference, I used JDK 1.7.0_21 64 bit for Windows in all tests.

This is just with the plain distribution, without any change from me. I also tried editing the webdefault.xml in my own web app, adding/removing keepgenerated, saveByteCode, and other JspServlet init parameters, but all I could do was turn off the preservation of the .java file via keepgenerated. But I cannot get to see the .class file saved to disk anywhere.

I also thought this could be a compilation error (hence the reason why the .java file is still around), but it doesn't make much sense, because I can see the correct output of the jsp in the browser... and there are no error messages in the server's console either.

Is there a reason for this? How does this affect response times when restarting the server? Does Jetty/Jasper have to recompile that .java file every time the server is restarted? Or, worse, every time the jsp is accessed?

If this is covered somewhere in the documentation or faq, please forgive me for not finding it. I searched around for half a day but could not find any mention of this anywhere.






Back to the top