The Struts-EL is what I'd recommend, which supports exactly what you want to
do, unless you're into (Tomcat 5 and the) JSP 2.0 then you'd just do:
<option value="${accounts.number}">${accounts.number}</option>
Otherwise I _think_ I've done this nastiness and it worked, but I might have
been doing it with plain HTML (non-struts tags):
<html:option value="<c:out value="${accounts.number}"/>"><c:out
value="${accounts.number}"/></html:option>
._.
-----Original Message-----
From: Steltner, Joern [mailto:[EMAIL PROTECTED]
Sent: Friday, March 19, 2004 7:28 AM
To: [EMAIL PROTECTED]
Subject: access variable value in html tag
Dear,
I'm not an expert in Struts and Java. I need some simple help:
<html:select property="no_account">
<c:forEach var="accounts" items="${Accounts}" varStatus="status">
<html:option value="????????"><c:out
value="${accounts.number}"</html:option>
</c:forEach>
</html:select>
Everything works fine, but at ??????? mark I would like take
account.no_account like ${accounts.number}, but it doesn't work. May someone
can give me a small note about the right syntax to get the value from
accounts.number as text in the quotes.
Thanks
Regards
J. Steltner
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]