File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Using c:if Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Using c:if" Watch "Using c:if" New topic
Author

Using c:if

Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 230
I am having a problem testing the value of a variable using c:if i am currently trying something like (if val variable in request scope is equal to hello)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60048
    
  65

<c:if test="${requestScope.val=='hello'}" >

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18116
    
    8

Just do the obvious thing. (The obvious thing doesn't include escaping of quotes, or whatever those backslashes are for.)
Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 230
<c:if test="${requestScope.val=='hello'}" > worked
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575


concentrate above idiom! :)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using c:if
 
Similar Threads
setting var attribute in classic custom tag
Help in JSTL And EL
JSTL Expressions
Problem with nested c:forEach
JSTL c:if not working, but c:out is working