Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
storing values in a session...
Pradeep Adibatla
Ranch Hand
Posts: 336
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have a 2 objects... concept object which has concepts(conceptNames) and Attribute object which has attributes and datatypes...
These 3 form my row in the table... So my row would sample as : ROW1: concept1 attribute1 datatype1
Each row represents one vocabulary object i.e attributes are added to concepts and concepts are inturn stored in vocabulary object...
How to store in a session?
I implemented sessionAware in my action class... (i am not clear whether to use application or session Aware)
Map session; public void setSession(Map session) { this.session=session; }
session.put(???) what key, value pair should go? vocabulary?
Ankit Garg
Sheriff
Posts: 9707
43
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Well since the SessionAware interface gives you a Map<
String
, Object> of session attributes, you need to store a String which will uniquely identify the session attribute as the key and Vocabulary object as the value. Something like this
Vocabulary voc = ....; //assuming that voc has a int property id session.put(new String(voc.getId()), voc);
SCJP 6 | SCWCD 5 |
Javaranch SCJP FAQ
|
SCWCD Links
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
JSF custom tag requirement
vocabulary
Which attribute scopes are thread-safe ?
struts.xml doubt (Action classes,struts-2)
handling objects with DB
More...