(0000101)
|
user150
|
04-12-05 00:00
|
|
With resin 2 our company used the -compile option of httpd.exe to compile a single JSP page and then built a little script to discover all of the JSP pages to be compiled using the 'find' command. However, resin 3 does not support the -compile flag.
I'm trying to build JSP compilation into our ant build but running up against a roadblock using JspCompiler. I have successfully compiled the JSP pages for our app which do not use taglibs, but any page with a taglib always fails with the following error:
Exception in thread "main" com.caucho.jsp.JspLineParseException: /searchTableView.jsp:18: Can't find taglib-location `/s
truts-bean'. The taglib-location must match a tag library either:
1) by pointing to a .tld directly, relative to the application's root directory
2) specified in the web.xml
3) defined in a jar's .tld in META-INF
4) defined in a .tld in WEB-INF
5) predefined by Resin
at com.caucho.jsp.JspParser.error(JspParser.java:1952)
at com.caucho.jsp.JspParser.processTaglib(JspParser.java:1618)
at com.caucho.jsp.JspParser.processTaglibDirective(JspParser.java:1585)
at com.caucho.jsp.JspParser.parseDirective(JspParser.java:1120)
at com.caucho.jsp.JspParser.parseScriptlet(JspParser.java:1002)
at com.caucho.jsp.JspParser.parseNode(JspParser.java:406)
at com.caucho.jsp.JspParser.parseJsp(JspParser.java:320)
at com.caucho.jsp.JspParser.parse(JspParser.java:244)
at com.caucho.jsp.JspCompilerInstance.generate(JspCompilerInstance.java:444)
at com.caucho.jsp.JspCompiler.compileJsp(JspCompiler.java:625)
at com.caucho.jsp.JspCompiler.main(JspCompiler.java:574)
I'm not sure what's going on because WEB-INF/web.xml contains this:
<taglib>
<taglib-uri>/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
And the JSP contains this:
<%@ taglib uri="/struts-bean" prefix="bean" %>
This page compiles fine when actually running under resin, but not when using the JspCompiler from the command line like so:
java -cp /usr/local/resin/lib/resin.jar:/usr/local/resin/lib/jsdk-24.jar:/usr/local/resin/lib/isorelax.
jar:/usr/local/resin/lib/jstl-11.jar:/usr/local/resin/lib/jta-101.jar:/usr/local/resin/lib/jmx-12.jar:./web/WEB-INF/lib
/nprise.jar:./web/WEB-INF/classes com.caucho.jsp.JspCompiler -conf ./compile-app.xml web/searchTableView.jsp
and my compile-app.xml looks like this:
<web-app xmlns="http://caucho.com/ns/resin"> [^]
<java compiler="javac" args="-source 1.4 -g"/>
<app-dir>/usr/local/build/di.main/webapp/web</app-dir>
</web-app>
The lack of JSP compilation as part of our build process is a major reduction in functionality from resin 2.x. An ant task would be quite nice, but at this point even getting command line JspCompiler to work would be enough.
|
|