tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric.Le...@swissinfo.ch
Subject RE: My last annoying question of the day, promise.:-)
Date Mon, 18 Mar 2002 18:41:15 GMT
Just don't...  ;-)

Good Java style dictates that you keep everything as private as possible,
certainly class variables and then use methods to get and set them, like
getY and setY.

Nicely enough, if you implement getY, you can directly use it in
<c:if test="${Moo.Y == someInteger}">

So, just define all the getter methods you need, and off you go!

-----Original Message-----
From: John Baker [mailto:jbaker@teamenergy.com]
Sent: Montag, 18. März 2002 19:31
To: Tag Libraries Users List
Subject: Re: My last annoying question of the day, promise.:-)


On Monday 18 Mar 2002 18H:07 pm, you wrote:

>   Current time in milliseconds:
>   <c:out value="${page.dates[1].time}"/>
>
> This prints out output like:
>
>   Current time in milliseconds: 1016474790054
>
> Hope you can use this as a basis to determine what's wrong with your
> page.  Best,

Yeah, sorry, I was just being dumb. I'm only on day three of the crash
course 
in JSTL. I'm actually very impressed, the stuff I have got working is much 
nicer without all the:

<%
	// blah blah
%>

Is this possible though?

public class Moo {
	public static final String X = "Hello";
	public static final int Y = 10;
}

<c:param name="${Moo.X}" value="something"/>

Evidence would suggest not, as this also doesn't work:

<c:if test="${someInteger == Moo.Y">

never seems to evalute to true when someInteger is 10, but replacing Moo.Y 
with '10' works fine :-)



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:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:taglibs-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message