about JSP pre-compile!!! Help!!!
Environment : JSP+TOMCAT(3.2.3)+WINNT(4.0 SERVER)
Problem : As we know , there will be compiling when we
visit a jsp-page which didn't be visited before. So it will
be slow when we first visit a new website ! My question
: Is there a way to compile my all jsp-pages of new
website before i start tomcat server ?
[364 byte] By [
mafubo] at [2007-9-26 2:04:18]

Hi
Hmm, it is not that slow anyway (I am on the same platform). Why not visiting all jsps before your users?
I am not sure is there a command-line option and/or init option for jsp precompile, but at least there is org.apche.jasper.JspC - the jsp compiler used for on the fly compilation. Get the sources and investigate. But MHO is that it realy does not worths.
HtH
Cheffo
hi againin the bin dir of Tomcat you will see jspc.bat - script for invoking compilation. Moreover: if you request a page with jsp_precompile=true (like mys.erv/myjsp?jsp_precompile=true), the page will be only precompiled, but not served.regards
hi thank you very much ! i tired and succeed.i have an idea, can we precompile jsp-pages and installthem in folder /work ,so that others can't read our sourcefiles?
Yes, you can do that. You could even try to obfuscate (I came at that idea quite recently and I am eager to tempt somebody to do the dirty job).
If you want your servlets - compiled jsps to be treated as jsps, you may have to make aliases in the web.xml. See jsp specification, appendix C for details.