tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "andrew cooke" <and...@acooke.org>
Subject Re: Passing values to tags [Was: Passing typed (non-String) data to tag file - error in getValueFromPropertyEditorManager]
Date Wed, 02 Nov 2005 12:29:20 GMT

Thanks!  I don't yet have it (the page I asked about) running, but
changing the web.xml to follow the spec (using the schema rather than the
old 2_3 DTD) has cleared up a whole slew of strange behaviour.  Suddenly
everything works as as it appears in the docs, error messages are helpful,
etc etc...

Cheers,
Andrew


Rahul Akolkar said:
> On 11/1/05, andrew cooke <andrew@acooke.org> wrote:
>>
>> More generally, I can't see how to pass a value at all!
>>
>> If I change my tag to accept a string, then the value it receives if
>> ${name} (literally).  This is true even if rtexprtype is explicitly set
>> to
>> true.
>>
>> I can force evaluation by calling
>> <data:name>
>>  <jsp:attribute name="value"><c:out value="${name}"/></jsp:attribute>
>> </data:name>
>> but that forces conversion to a String which is what I am trying to
>> avoid...
>>
>> Please can someone explain what I am missing?
>>
> <snip/>
>
> A Servlet 2.4 web application descriptor, most likely.
>
> -Rahul
>
>
>> Thanks/sorry,
>> Andrew
>>
>> andrew cooke said:
>> >
>> > I have a JSP page that includes:
>> >    <c:out value="${name.class}"/>
>> >    <data:name value="${name}"/>
>> > and when the second line is commented out, the page prints
>> >    class org.acooke.collaborate.data.transport.Name
>> >
>> > However, when the second line is present, I get the error shown below.
>> > The appropriate code in the compiled JSP is:
>> > _jspx_th_data_name_0.setValue(
>> >  (org.acooke.collaborate.data.transport.Name)
>> >    org.apache.jasper.runtime.JspRuntimeLibrary.
>> >    getValueFromPropertyEditorManager(
>> >      org.acooke.collaborate.data.transport.Name.class,
>> >      "value", "${name}"));
>> > which corresponds directly to the line quoted above, and which has the
>> > correct class name.
>> >
>> > The class name is also declared for the data:name tag, although as far
>> as
>> > I can see the problem is in the page code rather than the tag:
>> >    <%@ include file="/WEB-INF/jsp/include/headers.jsp" %>
>> >    <%@ tag body-content="empty" %>
>> >    <%@ attribute name="value" required="true"
>> >               type="org.acooke.collaborate.data.transport.Name" %>
>> >    ...
>> >
>> > Is this a bug?  I can find nothing in the bug database, but the code
>> > appears OK....
>> >
>> > Thanks,
>> > Andrew
> <snap/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message