You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Martin Cooper <ma...@tumbleweed.com> on 2001/05/31 06:21:15 UTC
Re: use JSP variable as a value of property in tag
I think you just need a space on each side of 'var'. Try this:
<html:select property="<%= var %>" size="1">
Hope this helps.
--
Martin Cooper
----- Original Message -----
From: "someil" <cy...@intech.lu>
To: <st...@jakarta.apache.org>
Sent: Wednesday, May 30, 2001 5:42 AM
Subject: use JSP variable as a value of property in <html:select ...> tag
> Hi,
>
> I would like use an expression such as :
> <html:select property=<%= var%> size="1">
> but I can't do this.
>
> The error obtained is : "Attribute value should be quoted"
>
> So, I tried : <html:select property="<%= var%>" size="1">
> then it results a new error : "Attribute <% has no value"
>
> that is the problem?
> How can I consider a JSP variable for an attribute value?
>
> Thanks for your response ...
>
> - Cyril -
RE: use JSP variable as a value of property in tag
Posted by someil <cy...@intech.lu>.
Thanks for your help but I have found the solution.
Variable "var" came from a bean and there was a problem in this bean
constructor. So my variable didn't have value.
- Cyril -
-----Message d'origine-----
De : Martin Cooper [mailto:martin.cooper@tumbleweed.com]
Envoyé : jeudi 31 mai 2001 06:21
À : struts-user@jakarta.apache.org
Objet : Re: use JSP variable as a value of property in <html:select...>
tag
I think you just need a space on each side of 'var'. Try this:
<html:select property="<%= var %>" size="1">
Hope this helps.
--
Martin Cooper
----- Original Message -----
From: "someil" <cy...@intech.lu>
To: <st...@jakarta.apache.org>
Sent: Wednesday, May 30, 2001 5:42 AM
Subject: use JSP variable as a value of property in <html:select ...> tag
> Hi,
>
> I would like use an expression such as :
> <html:select property=<%= var%> size="1">
> but I can't do this.
>
> The error obtained is : "Attribute value should be quoted"
>
> So, I tried : <html:select property="<%= var%>" size="1">
> then it results a new error : "Attribute <% has no value"
>
> that is the problem?
> How can I consider a JSP variable for an attribute value?
>
> Thanks for your response ...
>
> - Cyril -