This week's giveaway is in the Groovy forum.
We're giving away four copies of Groovy Fundamentals video training course and have Ken Kousen on-line!
See this thread for details.
The moose likes Struts and the fly likes sess.existsAttribute tag not working? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "sess.existsAttribute tag not working?" Watch "sess.existsAttribute tag not working?" New topic

sess.existsAttribute tag not working?

Nicolas Flammel
Ranch Hand

Joined: May 05, 2004
Posts: 32
I have set a session attribute at the end of the action class
session.setAttribute("USERS_ONLY", "usersOnly") after which the JSP page loads and I have a block of code inside the
<sess:existsAttribute name="USERS_ONLY" value="false">
html tags etc...

<sess:existsAttribute name="USERS_ONLY">
html tags etc...

The JSP doe not load properly and when i see the source it displys the contents inside <sess:existsAttribute name="USERS_ONLY" value="false">
tag although the attribute USERS_ONLY exixts. So why does it go inside the first <sess:existsAttribute name="USERS_ONLY" value="false"> tag???
Nicolas Flammel
Ranch Hand

Joined: May 05, 2004
Posts: 32
Please help me out.
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
ExistsAttribute : Includes the body of the tag if the session attribute exists

Attribute :
- name : Name of session attribute. is Required
- value : If value is set to false the existsAttribute tag includes body of tag if session attribute does not exist. Default is true.


This will this help you.

Java Developer, Thailand
I agree. Here's the link:
subject: sess.existsAttribute tag not working?