On Tuesday 19 Mar 2002 14H:29 pm, you wrote: > On Tue, 19 Mar 2002, John Baker wrote: > > When I was reading the spec, I got the impression this was possible: > > (section 6.1.5) > > > > <c-rt:out value="<%= SomeClass.COST %>"/> > > > > So I'm assuming that the c-rt tld will evaluate SomeClass.COST as "the > > variable COST in the class SomeClass". But that doesn't seem to work > > either :-) > > <%= SomeClass.COST %> is an rtexprvalue; it means the same thing it means > in Java: the public static variable "COST" in "SomeClass". But this > isn't an JSTL expression or even something that JSTL knows how to > evaluate; this is just a traditional rtexprvalue. > > The two aren't intended to work the same. If they were, we wouldn't have > needed an expression language! :-)
Ah ha, so that's how I can achieve what I want using JSTL? :-) Well, in a round-a-bout kind of way. :-) I only today realised what "-rt" actually means, ie you can use <%= moo.doSomething() %> and that will actually get evaluated. I think :-) Ok, one more before I shut up. I'm trying to write this in JSTL: if (request.getParameter("moo").equals("cows")) and so far I've got: <c:if test="${request.parameter.moo == 'cows'}"> but it doesn't work ;-) I'm also assuming the test method uses the java .equals for == and not the Java ==, otherwise "moo" would never == "moo", two object references and all. John -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>