File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sess.existsAttribute tag not working?

 
Nicolas Flammel
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>

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

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
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help me out.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Example






This will this help you.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic