Wow... that fixed my problem! But why (how does that work)? Voodoo monkeys?
I'm familiar with how XML namespaces work, but not how Resin seems to apply
the settings differently.

I'm mainly curious whether this is suitable as a long-term solution, or just
a short-term patch. I'd hate to have all my tag-file-related code break on a
future release of Resin if I can prevent it now.

Thanks again. If there's a specific section of an M for me to RTF, let me
know and I'll be all over it! :)

On 11/27/06, Scott Ferguson <[EMAIL PROTECTED]> wrote:

On Nov 27, 2006, at 9:13 AM, Plat wrote:

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

Somewhat.  It's a very annoying feature of the JSP 2.1 spec (and it's
required by the TCK, so we can't avoid it.)

If you have an old-style web.xml (basically you don't have a
namespace declaration), then JSP won't understand the ${...} syntax.

You can avoid this by changing your web.xml to start like:

<web-app xmlns="";>

(You can also use xmlns="";).

-- Scott

> 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 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 PropertyEditors?)
> 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

resin-interest mailing list

resin-interest mailing list

Reply via email to