You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kristopher Brown <Kr...@diagonal-solutions.co.uk> on 2001/04/20 12:51:35 UTC

Reusing a JSP page

I've got a page which allows the user to select an address from a list of
possible addresses, but it is used from lots of different places.  I want to
be able to use the same jsp page but change the action to which it posts
when submit is pressed depending on which Action creates it.  Is this
possible to do?
 
<see attched picture if needed>
 
Cheers
Kris

Re: Reusing a JSP page

Posted by Peter Alfors <pe...@irista.com>.
You could have the AddressAction receive an "actionUrl" and then place
it into the request so that the address page could place it in the <FORM
action="">
You could either use a scriptlet, or maybe place it in a bean to be
retrieved with a taglib.

HTH,
    Pete

Kristopher Brown wrote:

>  I've got a page which allows the user to select an address from a
> list of possible addresses, but it is used from lots of different
> places.  I want to be able to use the same jsp page but change the
> action to which it posts when submit is pressed depending on which
> Action creates it.  Is this possible to do?<see attched picture if
> needed>CheersKris