Carl Tallis wrote:
Hi, all -     I'm using JRun, and the 0.5 classes/tags work great, but I can't even get the later sample application to run:/newstrutsdemo/:

javax.servlet.ServletException: Compilation error occured:

allaire.jrun.scripting.DefaultCFE:
Errors reported by compiler:C:/Program Files/Allaire/JRun/servers/default/New Struts Demo/WEB-INF/jsp/jrun__index2ejspa.java:41:1:41:27: Error: No match was found for method "setLocale(java.lang.String)".
Pretty basic stuff.  However, looking at the messages on this list, it's obvious that people *are* using the nightly builds. Anyone ever seen this error? What execution environments are people using who can run the later distributions (i.e. post 0.5)?Carl TallisDirector Of ProductsSupplyLinks, Inc.Tel: (703) 796-6010Fax: (703) 796-6014email: [EMAIL PROTECTED] 

Unfortunately, it appears that JRun has an implementation bug.

The servlet container is supposed to do automatic type conversions when the data type of a custom tag property is something other than a String.  In this particular case, the "locale" property accepts a boolean value.

The set of required conversions are in Table 2-4 on page 65 of the JSP 1.1 specification.  Originally, it was not clear (in the spec) that these conversions applied to custom tag attributes, as well as <jsp:setProperty/>, but this was cleared up in an errata to the spec that was published last April, at:

    http://java.sun.com/products/jsp/errata_1_1_a_042800.html

As a workaround on JRun, you can add a String setter for each non-String property, but this is not a good long term solution, because such a tag will not work on any other servlet engine (because the Java reflection code will see two setter methods, and therefore decide that neither of them is appropriate -- so the property will be considered read only).

Craig McClanahan
 

Reply via email to