You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Luke Studley <Lu...@cerillion.com> on 2002/01/03 17:13:44 UTC
Values in to attribute values for XML JSP Docs?
Hi all.
I am using the XML form of JSP (1.2) and wish to write the equivalent of the
following.
<jsp:scriptlet>
int myvar = 1;
</jsp:scriptlet>
<input type="hidden" value="%= myvar %"/>
However this doesn't work as the "%= myvar %" is only evaluated as an
expression when being passed to custom tags. So for example the following is
ok:
<html:hidden value="%= myvar %"/>
.. but I've tried everything I can think of (short of using println
statements!) to output the value of any type of variable (not just scripting
ones) to normal output tag attributes - but nothing works.
NOTE: I cannot use "<%= myvar %>" or "<jsp:expression> myvar
</jsp:expression>" as these are not well formed XML and so the page will not
compile.
Help! I don't know if I am missing something obvious or if this is just not
possible!
Thanks
Luke
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>