as per the above URL, I am trying to precompile my jsps for a struts-based web-app. Suggestion 1: Mention there that with 300 jsp's, java will run out of memory, but extending /usr/local/bin/ant ANT_OPTS=" -Xmx512m " can remedy that. Next problem with the jsp-"compile" target: About 100 errors of the following kind <<_jspx_meth_html_link_9(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.my_jsp cannot be applied to (org.apache.struts.taglib.logic.GreaterEqualTag,javax.servlet.jsp.PageContext)>> This basically happens to all tags that are happily compiled at deploy time. (i.e.: _jspx_meth_logic_notPresent_4, _jspx_meth_logic_greaterThan_2, _jspx_meth_bean_write_7, _jspx_meth_html_form_0, ...) Suggestion 2: It would be great to tell what ant doesn't get when started on the command line that tomcat does nicely when running the webapp.
Created attachment 11644 [details] one sample jsp.java that causes these errors
> From: Jan Luehe [mailto:Jan.Luehe@Sun.COM] > Sent: Tuesday, May 25, 2004 1:35 AM > To: hauser@acm.org > Subject: Re: DO NOT REPLY [Bug 29160] New: - precompile problem: > > Any chance you could attach your webapp to the bugreport, or > send me a copy? hope you can already reproduce it with the attached one sample.tgz file that is created by my jspc. When doing the target compile(jsp), I get [javac] 27 errors [javac] 10 warnings
Created attachment 11645 [details] sample_jsp.tgz - this time the correct one, pls discard the previous
Can you attach your original webapp WAR file that contains the JSP pages and bundles the struts taglib?
I was able to precompile the sample webapps that come with the struts 1.1 distribution. I don't understand this error message you are getting: <<_jspx_meth_html_link_9(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.my_jsp cannot be applied to (org.apache.struts.taglib.logic.GreaterEqualTag,javax.servlet.jsp.PageContext)>> Notice that javax.servlet.jsp.tagext.JspTag, which was added in JSP 2.0, is a superinterface of javax.servlet.jsp.tagext.Tag, which is extended by javax.servlet.jsp.tagext.IterationTag, which is implemented by javax.servlet.jsp.tagext.TagSupport, which is extended by org.apache.struts.taglib.logic.GreaterEqualTag, so the above assignment should be OK. Adding a superinterface such as javax.servlet.jsp.tagext.JspTag is backward-compatible which existing tag handlers. What javac are you using?
Jan, Thanks for staying on this - sorry, can't just give out the full war. my javac was installed the same day this February as <<java -version java version "1.4.2_04" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)>> I had the struts.jar (1.1) twice in the classpath, but fixing this didn't solve the problem.
I'm closing this a not a bug, because - I'm able to precompile the sample webapps that come with struts 1.1. - I'm able to manually compile the .java files in your attachment. It seems you are somehow referencing an old servlet-api.jar that contains JSP 1.2 based interfaces in your environment.
must have been a classloader problem, i.e. it may have found some of the jars twice. When I only take the classpath: WEB-INF/classes:tomcat/common/lib:struts.jar:displaytag-1.0-b2.jar or Jan's javac -classpath jsp-api.jar:servlet-api.jar:jasper-runtime.jar:struts.jar:. <java-filename> it does compile! Thx!