0

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?

masegaloeh
  • 17,978
  • 9
  • 56
  • 104

1 Answers1

1

This might be helpful...

http://www.coderanch.com/t/66927/BEA-Weblogic/Precompile-JSPs-using-Ant

hope it helps!

I would also ask you to consider why you would want to pre-compile your jsp pages anyway. The only cost is in the performance of the very first person who hits your jsp pages and that should probably be your Dev team for sanity testing after a deployment. Eric