aspose file tools*
The moose likes JSP and the fly likes JSTL test using final static constant defined in a Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL test using final static constant defined in a Class" Watch "JSTL test using final static constant defined in a Class" New topic
Author

JSTL test using final static constant defined in a Class

Nitin Bhardwaj
Ranch Hand

Joined: Feb 02, 2007
Posts: 72
Hi,

Just suppose I have the following class in which I've defined constants and static utility functions:



I want to replace the scriptlets in JSP (somewhat like given below) with JSTL <c:if test>:


Request you to help.

Best Regards,
Nitin
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

There is no direct way. But you can create a Map that contains those values and store it in one of the scopes.

For a more detailed description, see this article.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nitin Bhardwaj
Ranch Hand

Joined: Feb 02, 2007
Posts: 72
Bear Bibeault wrote:There is no direct way. But you can create a Map that contains those values and store it in one of the scopes.

For a more detailed description, see this article.

Yeah that is a good alternative. Thank You for verifying that there is no direct way!
Best Regards,
Nitin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL test using final static constant defined in a Class