tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Rees" <dr...@ebetinc.com>
Subject RE: <jsp:setProperty ... value="<%= application.getAttribute("some-param")%>"/> does not compile?
Date Wed, 06 Dec 2000 04:36:43 GMT
Replying to myself... :-)

Turns out it was myfault, I wasn't escaping the quotes inside the value=""!

Works perfectly, now.

Thanks,
-Dave

> -----Original Message-----
> From: David Rees [mailto:drees@ebetinc.com]
>
> I'm trying do this in a .jsp:
>
> <jsp:useBean id="myBean" scope="application" class="package.myBean">
> <jsp:setProperty name="myBean" property="someValue"
> 	value="<%=application.getAttribute("package.someValue")%>"/>
> </jsp:useBean>
>
> But upon compilation I get this exception:
>
> org.apache.jasper.compiler.ParseException: /local/doc-root/test.jsp(1,104)
> Attribute package.someValue has no value
> 	at
> org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader
> .java:499)
> 	at
> org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.
> java:615)
> 	at
> org.apache.jasper.compiler.Parser$SetProperty.accept(Parser.java:722)
> 	at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
>
> I have defined the attribute by overriding the JspServlet in my web.xml.
> Doing this works fine:
>
> <jsp:useBean id="myBean" scope="application" class="package.myBean"/>
> <%
> myBean.setSomeValue(<%=application.getAttribute("package.someValue")%>);
> %>
>
> Can anyone explain why it doesn't work?  Should it work?
>
> Thanks,
> Dave
>


Mime
View raw message