Ant task to pre-compile JSPs on weblogic server
- by user24560
I am trying to create an ant task to compile JSPs. Here are the excerpts from the build.xml related to the task:
....
<fileset dir="${java.home}/lib">
<include name="tools.jar"/>
</fileset>
<java classname="weblogic.jspc" fork="yes">
<classpath refid="weblogic.jsp.classpath" />
<sysproperty key="weblogic.jsp.windows.caseSensitive" value="false"/>
<arg line="-forceGeneration -keepgenerated -compileAll -webapp ${jsp.src.dir} -d ${jsp.generated.src.dir}"/>
</java>
When I try to run wl.jsp.generate task, I get:
wl.jsp.generate:
[java] [jspc] warning: expected file /WEB-INF/web.xml not found, tag
libraries cannot be resolved.
[java] [jspc] Overriding default descriptor option 'keepgenerated' with
value specified on command-line 'true'
[java] Exception encountered while compiling
C:\workspace\smcmw\smcmw_browser\jsp\smcesearchprogress.jsp
[java] java.lang.NoSuchMethodError:
javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/String;ZZLjava/lang/String;ZZLjava/lang/String;Ljava/lang/String;)V
[java] at weblogic.jsp.internal.jsp.tag.TagAttrInfoEx.<init>(TagAttrInfoEx.java:64)
[java] at weblogic.jsp.internal.jsp.tag.TagAttrInfoEx.<init>(TagAttrInfoEx.java:57)
[java] at weblogic.jsp.internal.jsp.tag.TagAttrInfoEx.<init>(TagAttrInfoEx.java:41)
[java] at weblogic.jsp.internal.jsp.tag.TagAttrInfoEx.read(TagAttrInfoEx.java:86)
Looks like it fails because it can't find WEB-INF/web.xml file and tag libraries. How can I fix this?