tags:

views:

42

answers:

2

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.

+2  A: 

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();

Thierry-Dimitri Roy
With your approach I would actually need to start the system as part of the the build. The whole point of pre-compiling as part of the build process is to catch any errors in jsp in the build phase.
Sindri Traustason
+1  A: 

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.

Adam Butler