Hopefully this is a JSP-newbie question. Pleasepleaseplease let it be a
newbie question! :-)

I've recently upgraded from Resin 3.0.14 to 3.0.22. My JSP pages pass
attribute values to JSP Tag Files using EL expressions. Here's some example
code based on my "real" code:

   <helloLib:HelloTag user="${myUser}" />
   <%-- myUser is an instance of the MyUser class --%>

Although this worked fine in 3.0.14, after upgrading Resin I see the error:

   expected `<%= ... %>' at `${myUser}'
   for tag attribute setter `setUser(MyUser)'.
   Tag attributes which can't be converted from strings must use a runtime
   attribute expression.

The error (thrown from JspNode.java in the Resin source) makes sense from
the standpoint that "MyUser" cannot be converted from a string. For my
purposes it would be very difficult to support full conversion to/from
strings, so MyUser does not support this.

Now, if I change my tag call to use runtime expressions for such attributes,
everything works how I want it to.

   <helloLib:HelloTag user="<%= myUser %>" />
   <%-- This works great in 3.0.22 --%>

So now I'm wondering:

1) Is the latter syntax (use of runtime expressions) generally supported by
JSP engines? That is, if I pass such a value using a runtime expression, am
I generally protected from having to change this again? I was reading
through JSR 152 and it seems like I should be OK, but I'm no pro yet.

2) Why is it that "Tag attributes which can't be converted from strings must
use a runtime attribute expression"? Is this a limitation of Resin, or is
this in the JSP specification somewhere? (Or some implicit requirement of

I'm fine with changing my code to use runtime expressions instead, but I'd
really like to understand _why_ I need to do so.

Thanks for your insight!
resin-interest mailing list

Reply via email to