This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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
Struts 2 hidden values
write request.setAttribute("key", "value")
Struts2: Compare request parameter not working
[Struts 2] Use a JSP variable in struts2 tag
fow to forward to an action from jsp ?