You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Otávio Augusto <ot...@bol.com.br> on 2004/01/08 04:33:05 UTC

mapped address

I have the following situation:

In my struts-config.xml file, there are lots of mappings like this one:
<forward name="vendaconfirma" path="/vendaConfirmacao.jsp" />

In my application, the user has the chance to add or remove itens from a collection which is in the httpsession. There is only one place to add those itens, but the user can remove then at any time, at least in 3 different web pages during the workflow.

I'd like to implement a single Action class to handle the task of getting the httpsession with those items, remove a certain item and go back to the page where i requested this task. As I said, there are at least 3 different jsp pages where the user can invoke this "remove" task.

The question is: is there a way to get , in the Action class, the mapping for the page where I came from ? At the end of my execute() methods in my Action classes,I do this

return (mapping.findForward(destino));

to return to the jsp page. "destino" is a String containig the jsp "alias" mapped in struts-config.xml. Since I can invoke this Action from, at least, 3 different places, how to feed "destino" with the correct mapping so I can rturn to the page I invoked the service from?

thanks in advance

Otávio Augusto

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org