The input property doesn't have to be a JSP. It could be another action.
If that action had another way, besides the input property, to determine
where to send control, it could return whatever ActionForward needed. 

One nasty kludge would be to put the name of the JSP into the file as a
hidden property. The action would then know to look for that propery and
could create an ActionForward back to it. You could also try looking at
the refer header, but I don't know how reliable that would be. 

-T.


Rick Reumann wrote:
> 
> On Wednesday, June 12, 2002, 4:50:15 PM, Ted wrote:
> 
> TH> Each JSP can have its own action-mapping, and own input settings, and
> TH> the rest of it, and all the action-mappings can share the same Action.
> 
>     Sorry if I was confusing, yes I meant JSPs sharing an
>     action-mapping. I was trying to avoid having to write the same
>     action-mapping over again for a few jsp's that are very similar
>     and will end up fowarding to the same page after validation. The
>     similar forms on each page will need to be validated though and I
>     was just trying to find a good way to accomplish this but ran into
>     a snag because the "input" has to be defined in the action-mapping
>     that they would all share, so how would the validation know which
>     page to return to if there were errors?
> 
> TH> Of course, action-mappings can also share JSPs, and so forth. There are
> TH> no 1:1's here.
> 
> TH> -T.
> 
> TH> Rick Reumann wrote:
> >>
> >> Sorry James, I don't think I described the situation to well and I'm
> >> sure there probably is a better way to handle this...
> >>
> >> Easiest way is an extreme example..
> >>
> >> What if you had 4 different JSPs that captured the same information in
> >> a form YET everything else on the page was radically different. Upon
> >> submission, though, you want to forward all the pages to the same
> >> Action and even possibly forward all of them to the same results page.
> >>
> >> The problem(I think) is you also want to validate the form
> >> information. I'm wondering how you would get the validation to know to
> >> return back to the correct JSP page if there were validation errors?
> >>
> >> I thought you needed to provide the input="yourJsp.jsp" so that it
> >> knew were to go back to, but if all 4 jsps shared this action mapping
> >> what would you put in the input="?" section? (maybe I'm totally wrong
> >> and the validation doesn't need that but I thought it did).
> >>
> >> Thanks for the help,
> >> Rick
> >>
> >
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to