Is there any way to precompile a custom jsp type?
E.g. in my config/web.xml I define:
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jspf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jspt</url-pattern>
Snip
We pre-compile our jsp's and tomcat is hardcoded to only compile certain types.
http://svn.apache.org/repos/asf/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/JspC.java
/**
* The file extensions to be handled as JSP files.
* Default list is .jsp and .jspx.
*/
private List extensions;
/**
* Adds the given file extension to the
* list of extensions handled as JSP files.
*
* @param extension The extension to add, e.g. "myjsp"
*/
protected void addExtension(final String extension) {
if(extension != null) {
if(extensions == null) {
extensions = new Vector();
}
extensions.add(extension);
}
}
// Make sure default extensions are always included
if ((getExtensions() == null) || (getExtensions().size() < 2)) {
addExtension("jsp");
addExtension("jspx");
}
Because that method is protected, we can't access it from the pre-compile ant
task.
SO when we run the jsp compilation, only jsp & jspx types are transformed to
java files which are then turned into servlets PRIOR to war generation.
Thoughts?
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]