aspose file tools*
The moose likes Struts and the fly likes passing value from one action to another Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "passing value from one action to another" Watch "passing value from one action to another" New topic
Author

passing value from one action to another

Marco Vanoli
Ranch Hand

Joined: Jan 12, 2005
Posts: 99
I am using dispatch action.
I have a delete method and a list method under the same action.
After deleting the entry i just call a forward to the other dispatched actione.
I need to pass a long value from one method to another. I tryed using request.setParameter("id",id) and relative get but seems every method look at the jsp parameter, not at that i have set.

Then i have to use class variale or to use a session scope, or something other??
Using this one i read this is not thread safe.. how can i do.

Thanks to all want help me


bye, <br />Marco
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31054
    
162

Marco,
When passing values, you use get/setAttribute() rather than getParameter(). That way you can set values independent of a form.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing value from one action to another