• Post Reply Bookmark Topic Watch Topic
  • New Topic

passing value from one action to another  RSS feed

 
Marco Vanoli
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37256
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marco,
When passing values, you use get/setAttribute() rather than getParameter(). That way you can set values independent of a form.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!