Tutorial :Can I ignore some jsp files when pre-compiling jsp using tomcat?


I'm pre-compiling jsp's in a webapp using tomcat as described here: http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html#Web_Application_Compilation

Is a way to exclude a subset of jsp files in the application? According to the documentation of org.apache.jarsper.JpsC it offers no such thing. But I was wondering if someone has come up with a innovative way of achieving this.

So far I've tried deleting the java files that JspC generated before doing the java compile, but now I'm getting errors in some jsp files from JspC and would like a way to have JspC ignore those.


I use a different approach, as listed at: A different twist on pre-compiling JSPs

You just need to modify his example to exclude some files before calling connect();


You could add an extra task into the ant script to copy jsps you want to compile to a temporary folder then compile them from there. The copy tag has lots of options for including/excluding, etc.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »