tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Capr1ce <capr...@capr1ce.co.uk>
Subject Re: Accessing static variables
Date Wed, 02 Jul 2003 07:05:53 GMT

I'd just like to agree that this is quite annoying. If I have any static 
variables that I need to access from JSP pages, I set them as application 
scope variables in a load on startup servlet. Annoying, but it's not a bad 
work around.



At 10:47 PM 01/07/2003 -0500, you wrote:
>I searched through the archives, and I couldn't find a good answer for
>this question.  Is there a reason why there is not a JSTL tag to expose
>the static final variables for a class? You can obviously do this by
>importing the class and using <%= MyClass.STATICVAR %>, or by specifying
>it as an attribute in the session or request scope.
>
>I don't believe it would be too difficult to code the necessary tag, but I
>was first curious as to why this was keep out of the specification.  My
>guess would be that someone was trying to say that it is best to keep
>string literals out of source code, and that they could be better defined
>in a properties file.  However, a web application framework I use makes
>use of String literals in the source files, so I was looking for a way to
>access them without scriptlets.
>
>  -------------------
>Eric Hauser
>ehauser@indiana.edu
>(317) 679-4766
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org



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


Mime
View raw message