wood burning stoves 2.0*
The moose likes Struts and the fly likes How to test value of parameter using <s:if test> ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to test value of parameter using <s:if test> ?" Watch "How to test value of parameter using <s:if test> ?" New topic
Author

How to test value of parameter using <s:if test> ?

Jonilie Echavez
Greenhorn

Joined: Jun 26, 2009
Posts: 20
Hi,
In the code below, I am able to display value of statusDesc



However, I wanted to check if the value returned by statusDesc is 'Active' and if so it performs something else, but this test doesn't work.


How should i test the value of statusDesc against a string?

Please help!

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Can you please try this (i.e. replace single quotes with double and double with single)



SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Jonilie Echavez
Greenhorn

Joined: Jun 26, 2009
Posts: 20
Ankit, thanks heaps! That worked!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to test value of parameter using <s:if test> ?
 
Similar Threads
How do i adjust the label width n make it bold ? in the jsp of Struts2 aplication ?
How to validate content in dynamically generated textfields?
Setting the value in <s:textfield from request scope
How to use <s:if> tag in another Struts2 tag
Problem positioning Data using CSS and <s:iterate ( information is placed on top of each other).