I'm not sure about this; at worst, wouldn't it be sufficient to recompile just the Struts taglibs against the Servlet 2.4 / JSP 2.0 APIs? There should be no need to upgrade to J2SE 5 or to recompile any other part of Struts as far as I can see.

That being said, I'm not sure any of this is necessary. I'm using Struts 1.2.7 on Tomcat 5.x without any problem what-so-ever. Perhaps Jasperc2 has options to control which level of JSP spec it targets and defaults to something backwards-compatible when called during normal operation of the Tomcat?

Clark, I suggest you look into that before going to the effort of recompiling everything, especially since you'd then be running a non-standard Struts build and would presumably have to repeat the effort every time you upgrade...

L.

Martin Gainty wrote:
Clark-

The only way I know you can achieve 100% compatibility would be if
You recompile the entire struts package library with J2SE 5.0
which means compiling
TagLibs, JSP Pages and Servlet, external providers and jars (basically everything) with the 5.0 JDK to conform to the 2.0 JSP Servlet spec Peronally I would feel more comfortable if the original authors did this but
I think this could also be a fun weekend project..

In any case let me know how you make out or if I can help out in any way,

Does anyone else have a solution for this??
Martin-
617-852-7822

----- Original Message ----- From: "Clark Wright" <[EMAIL PROTECTED]>
To: "Martin Gainty" <[EMAIL PROTECTED]>
Cc: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Tuesday, September 13, 2005 12:58 PM
Subject: Re: Struts, JSP 2.0 and Jasper2 compiler error


At 11:10 AM 9/13/2005, Martin Gainty wrote:

Clark-

Ant has not upgraded the JSPC task for the JSP Servlet 2.0 spec as of yet to quote "There are known problems with Tomcat 5.x that won't get fixed in Ant, please use Tomcat's jspc task instead."


Yup, been there, gotten it to work for a while now.

The real issue seems to be backwards compatibility when generating the java code for taglibs that are adhering to version 1.1 of the JSP spec while using the Tomcat 5.5 version of JasperC, which implements the 2.0 spec.

For instance,
using JasperC from Tomcat 4.x (which also required the custom ant config), the following class would be generated:

  private boolean
_jspx_meth_html_img_0(javax.servlet.jsp.tagext.Tag _jspx_th_html_link_0,
 javax.servlet.jsp.PageContext pageContext)
          throws Throwable

Now, using the Tomcat 5.5 jasperC, you get this class:

private boolean
_jspx_meth_html_link_0 (javax.servlet.jsp.tagext.JspTag _jspx_th_html_html_0,
PageContext _jspx_page_context)
          throws Throwable

Now, same jsp, same taglib, same backing jar. The only difference is that the version of JasperC changed.

The first example adheres to JSP 1.1, the second to JSP 2.0.

But, since the taglib, and its jar, where generated/compiled for jsp 1.1, you get a "cannot be applied error" since the class hierarchy for the tags themselves changed with jsp 2.0.

Since Tomcat 5.5 has been out for a year, I can not be the first person to run into this, so what am I missing?

Thanks,
- clark.,

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to