This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Jsp struts tag to check null values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Jsp struts tag to check null values" Watch "Jsp struts tag to check null values" New topic
Author

Jsp struts tag to check null values

sudhir pavan
Ranch Hand

Joined: Sep 01, 2011
Posts: 34
In my jsp , i am getting a value from DB. But the field is null.
As the data is null i need to compare the value in struts if tag to check whether it is null or not.
if it is null then i forward the request to login page, otherwise continue to process

<s:if test="#session.issuperadmin== null">
<jsp:forward page="login.jsp" />
</s:if>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Jsp struts tag to check null values
 
Similar Threads
write request.setAttribute("key", "value")
Struts 2 hidden values
Struts2: Compare request parameter not working
[Struts 2] Use a JSP variable in struts2 tag
fow to forward to an action from jsp ?