Forward among Actions in Struts

J

Jun

I am trying to find a best way to do the forward with dynamic parameter...
Here is what I face:

- there are two actions:
ActionA - delete an row in (html) table
ActionB - display the the table

- the logic between these two actions is after ActionA is done ActionA
needs to trigger ActionB so that the new after-delete content can be
displayed in the table.

- one solution is that ActionA forward to ActionB with the
"redirect" true. There are two problems with the solution
1. not efficient since there is no need to return to the browser and
have the browser send another request.
2. ActionB requires some parameter carried by the request sent to
ActionA. The parameter will be lost with "redirect".

- What I am think of is to forward from ActionA to ActionB without "redirect"
but ActionB can not accept all the parameters from ActionA and I can not
change any parameter...I can but don't want to make use of attributes in
request or session.


It seems that forwarding among Actions and handling parameter between forwarding
are very common issues in Struts. I am wondering how you guys handle them...

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top