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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to