struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <manoj.tripa...@bt.com>
Subject RE: Handling attribute values
Date Wed, 07 Jun 2006 15:10:00 GMT
Maya, Vectors are synchronized. Any method that touches the Vector's contents is thread safe.
ArrayList, on the other hand, is unsynchronized, making them, therefore, not thread safe.
With that difference in mind, using synchronization will incur a performance hit. So if you
don't need a thread-safe collection, use the ArrayList. Why pay the price of synchronization
unnecessarily?
 
Also can you tell me what exactly are you storing in vector?
I need this to tell you the best possible answer as when navigating through the pages (through
actions) if the information is small you can use hidden values to pass the values around which
you want to manage
 
Cheers
-----Original Message-----
From: Maya menon [mailto:maya_java@yahoo.com] 
Sent: 07 June 2006 15:21
To: Struts Users Mailing List
Subject: RE: Handling attribute values
 
Manoj,
   
  Yes, I am storing a vector in request attribute. Using session attribute, I am not feeling
comfortable. Because the application can be accessed simultaneously by lots. 
   
  So, In EditAction, is there a way to get the attribute from request ? 
  
 
manoj.tripathi@bt.com wrote:
  Maya,
It seems you storing a list of records in request
 
Set the attribute in session scope, and when you delete the record update the attribute in
session when you are in editAction
Or
In Edit action again set the update attribute in request scope
Cheers
-----Original Message-----
From: Maya menon [mailto:maya_java@yahoo.com] 
Sent: 07 June 2006 14:52
To: user@struts.apache.org
Subject: Handling attribute values
 
Hi all,
 
1. I have an action class, DisplayAction which displays the records from database. Here I
am setting a vector into the request scope and on success forwarding it to displayresults.jsp.

 
2. Display results.jsp displays all records with an option of delete to the users.
 
3. Now, once user deletes the records, by going to editaction, on success it should again
display the displayresults.jsp. How will I get the attribute I set in step one here again.

what path should I follow ?
 
DisplayAction -> displayResults -> EditAction 
 
EditAction should again display displayResults and get the attribute set in DisplayAction.
 
Please help
 
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
 
 
 
 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message