This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes <s:set /> tag problem in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<s:set /> tag problem in Struts2" Watch "<s:set /> tag problem in Struts2" New topic

<s:set /> tag problem in Struts2

Hrishikesh Maluskar
Ranch Hand

Joined: Jun 19, 2008
Posts: 115
i have hardcoded the value as Guest in the code mentioned below . How to set this value dynamically through session in Struts2.

SCJP 1.5
David Newton

Joined: Sep 29, 2008
Posts: 12617

Make your action SessionAware, put the value in the session map, and use the OGNL access to scoped attributes to display it.
I agree. Here's the link:
subject: <s:set /> tag problem in Struts2
It's not a secret anymore!