[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Unable to pre-compile JSP using ANT task with JBoss 4.2.
depryf
do-not-reply at jboss.com
Thu Apr 24 10:22:58 EDT 2008
That was a pretty good suggestion; I did add those jars but the result was the same. I actually solved my problem; it turned out that our TLD files had <DOCTYPE...> headers in them; and the XML parser didn't like that at all.
I removed the <DOCTYPE...> line and the task executed successfully (note that some of the TLD files had schema information instead of a DOCTYPE, but that seems to fine...
For anybody having the same problem, here is my final pre-compiling task:
| <path id="cp.jasper2">
| <pathelement location="${java.home}/../lib/tools.jar" />
| <pathelement location="${deploy.dir}/jboss-web.deployer/jbossweb.jar" />
| <pathelement location="${deploy.dir}/../../../lib/jboss-common.jar" />
| <pathelement location="${deploy.dir}/../../../lib/commons-logging.jar" />
| <pathelement location="${lib.dir}/eclipse/javaee.jar" />
| <pathelement location="${deploy.dir}/../../../lib/endorsed/xercesImpl.jar" />
| <pathelement location="${deploy.dir}/../../../lib/endorsed/xalan.jar" />
| <pathelement location="${deploy.dir}/../../../lib/endorsed/serializer.jar" />
|
| <fileset dir="${lib.dir}/web" />
| <pathelement path="${registry.build.dir}/classes" />
| <path refid="cp.lib"/>
| </path>
|
| <target name="jspc" description="Pre-compile are JSP files." depends="copy-metadata, compile" if="jsp.precompile">
| <echo message="Compiling JSPs..." />
|
| <taskdef classname="org.apache.jasper.JspC" name="jasper2" classpathref="cp.jasper2" />
|
| <!-- this will generate the java files for each JSP file -->
| <jasper2
| compile="false"
| validateXml="false"
| uriroot="${build.war.files.dir}"
| webXmlFragment="${registry.build.dir}/generated_web.xml"
| package="${package.web}"
| outputDir="${registry.build.dir}/jsp-src" />
|
| <!-- compile the java files generated in the previous step -->
| <javac
| srcdir="${registry.build.dir}/jsp-src"
| destdir="${registry.build.dir}/classes"
| listfiles="${compile.listfiles}"
| failonerror="${compile.failonerror}"
| debug="${compile.debug}"
| debuglevel="${compile.debuglevel}"
| optimize="${compile.optimize}"
| deprecation="${compile.deprecation}"
| classpathref="cp.jasper2" />
| </target>
|
Thanks for the help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146535#4146535
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146535
More information about the jboss-user
mailing list