Jan,
thanks so much for your help.
The page also says "if the value you set doesn't take effect, try using all lower case instead of camel case", and I had tested "savebytecode" as well, but it did not occur to me to try a mix of lowercase and camelcase...
Perhaps you could update the documentation so that others don't have the same problem?
Also this as a general feedback - having .class files precompiled in the work dir is a big help performance wise, because when a server restarts for whatever reason it does not have to recompile everything again. When you have hundreds of jsps in a web app, it does make a difference. Our app also does an 'inside precompilation' at startup, by connecting to itself and loading each jsp. If no .class files are saved, at every restart it takes minutes of 100% cpu to recompile everything - something that did not occur with Jetty 7. I know for sure that other developers use the same method, as it's something I've seen in several blogs of JSP developers. And even if you don't do a precompilation, your first customer of the day will experience slow response times at every click.
Was it ever considered the idea of leaving the default behavior that was in Jetty 7 in newer versions? I'm not sure how many end users realize that this is the new 'normal'.
Anyway, just a personal feedback. Thanks for your prompt help, it saved my day.
Date: Fri, 31 May 2013 10:14:24 +1000
From: janb@xxxxxxxxxxx
To: jetty-users@xxxxxxxxxxx
Subject: Re: [jetty-users] Jetty 9 : Jasper not saving .class files to work dir?
Simon,
Previous versions of jsp (eg in jetty-7) always used the JDT java compiler. That compiler always writes out the class files to disk. Jasper changed in version 2.2 to prefer the jvm's compiler, which does not write out the classes unless you explicitly set the init-param "saveBytecode" for the jsp servlet. Note the exact capitalization - your example posted "saveByteCode" with proper camel-case but that's not what they use :)
Make sure when you're adding that init-param to the jsp servlet that if you edit $JETTY_HOME/etc/webdefault.xml that you need to ensure that file is applied to your webapp (by default it is not - the webdefault.xml inside the jetty-webapp jar is used instead) by calling setDefaultsDescriptor() on your context.
regards
Jan
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users