views:

36

answers:

1

Hi

I'm using JBOSS 4.0.2 with JSP 2.0. I have created a TAG file with the following directives:

<%@ attribute name="id" required="true" %>
<%@ attribute name="upgradeAccount" type="com.upc.domain.UpgradeAccountData" %>

However, when I try to pass an object of type UpgradeAccountData to the tag as a parameter it is always resolved as String, for instance :

<wmtags:paymentOptions id="23" upgradeAccount="${upgradeAccountCommand}">                   
</wmtags:paymentOptions>

in the above example the upgradeAccountCommand is passed as the "${upgradeAccountCommand}" string.( I've check it by defining the the type attribute in the tag as object and printing the object type and it's string value).

I've also made sure that the upgradeAccountCommand in the caller page is an actual UpgradeAccountData object.

What can I do to solve this?

Many Thanks

+1  A: 

That should work; it sounds like EL expression evaluation might be turned off? That could be due to <%@page isELIgnored="false"%> in the page, or the webapp is using the 2.3 servlet spec (or earlier).

Try this:

<wmtags:paymentOptions id="23" upgradeAccount="<%=upgradeAccountCommand%>">
ZoogieZork
I'm not so charmed of recommending old fashioned scriptlets as "the solution".
BalusC
@BalusC Neither am I, but it'll narrow down the problem to EL being ignored.
ZoogieZork