/project
|--> /war ( it contains my jsp)
|--> /war/WEB-INF (it contains web.xml and weblogic.xml)
|--> build.xml (the script of ant)
I would precompile my jsp pages with ant with this simple task:
<target name="jspc" depends="init" " >
<java classpathref="project-classpath"
classname="weblogic.jspc"
dir="war"
fork="yes">
<arg line="-k -webapp war index.jsp"/>
</java>
</target>
But it doesn't work; the error is
jspc:
[java] [jspc] warning: expected file /project/war/war/WEB-INF/web.xml
not found, tag libraries cannot be resolved.
I think the error is due to the attribute -webapp: in fact if I change this
value (e. g. -webapp=dummydir ) the error is:
jspc:
[java] [jspc] warning: expected file
/project/war/dummydir/WEB-INF/web.xml not found, tag libraries cannot be
resolved.
If I set the attribute -webapp with the absolute path the error is:
jspc:
[java] Exception in thread "main" java.lang.NoSuchMethodError
[java] at
weblogic.apache.xerces.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.j
ava:136)
[java] at
weblogic.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Do
cumentBuilderFactoryImpl.java:82)
[java] at
weblogic.xml.jaxp.WebLogicDocumentBuilderFactory.newDocumentBuilder(WebLogic
DocumentBuilderFactory.java:112)
[java] at
weblogic.servlet.internal.dd.DescriptorLoader.initDOMFactory(DescriptorLoade
r.java:308)
[java] at
weblogic.servlet.internal.dd.DescriptorLoader.parse(DescriptorLoader.java:32
5)
[java] at
weblogic.servlet.internal.dd.DescriptorLoader.initializeWebXml(DescriptorLoa
der.java:341)
[java] at
weblogic.servlet.internal.dd.DescriptorLoader.initialize(DescriptorLoader.ja
va:254)
[java] at
weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader.java:1
74)
[java] at
weblogic.servlet.internal.dd.DescriptorLoader.loadDescriptor(DescriptorLoade
r.java:410)
[java] at weblogic.jspc.runBodyInternal(jspc.java:227)
[java] at weblogic.jspc.runBody(jspc.java:169)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:79)
[java] at weblogic.jspc.main(jspc.java:360)
[java] Java Result: 1
What is wrong?
Giuseppe
Please try:
<target name="jspc" depends="init" " >
<java classpathref="project-classpath"
classname="weblogic.jspc"
dir="war"
fork="yes">
<arg line="-k index.jsp"/>
</java>
</target>
giuseppe wrote:
--
Regards,
Ann
Developer Relations Engineer
BEA Support
Then I've found another solution and this works fine:
<target name="jspc" depends="init" >
<exec executable="java" failonerror="yes" dir="war">
<arg line="-classpath ${bea.home}/lib/weblogic.jar"/>
<arg value="weblogic.jspc" />
<arg line="-webapp /project/war"/>
<arg value="-k" />
<arg value="indexl.jsp" />
</exec>
</target>
Thanks
Giuseppe
"Ann Cao" <Re...@ToNewsgroup.Only> wrote in message
news:3DA66C6D...@ToNewsgroup.Only...