jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes session variable in presentation layer 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 "session variable in presentation layer" Watch "session variable in presentation layer" New topic
Author

session variable in presentation layer

Shraga van Shufel
Ranch Hand

Joined: Apr 20, 2003
Posts: 33
Hello,
I would like to access a session variable from the JSP page.
I saw that I can check for the existence of that variable using <logic resent parameter="myvariable">
but how can I actually write it ??
thanks in advance
/Shraga.
Shraga van Shufel
Ranch Hand

Joined: Apr 20, 2003
Posts: 33
Hello,
I manage to find it out and I am posting it, so maybe it could help others.
when you use the logic tag you can enter run time expression as a value.
so to compare a bean peoperty to a session variable use
<logic:equal name="mybean" propery="myproperty" value="<%=request.getParameter("myparameter") %>">
some nice logic
</logic:equal>
Hope it helps
/Shraga.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: session variable in presentation layer
 
Similar Threads
storing request object in session
Session variable
Session Tracking Mechanisms?
Getting HttpSession object from SessionContext
how can i set application variable