Matt

Yes I did use global forwards exactly as you say, although it should work
equally well with mapping level forwards. I'm not sure how to advise you
without knowing what you're trying to do. My problem was a sidebar menu
which needed to submit changes on the current page, and then to initialise
and load the new page whose menu link was clicked, so I needed global
forwards as I would not know from which mapping the request came from. My
processing after clicking the menu went like this...

...using Javascipt on menu link...
1.) Populate hidden form field (called 'forward') on current page with
forward name coresponding to clicked link.
2.) Submit current page.
...at the end of each page action...
3.) Remove any current mapping from the request using the following line:
'request.removeAttribute(Action.MAPPING_KEY);' without this, an infinate
loop occurs followed by a stack overflow  - because the setting of the new
action mapping by the action servlet fails (don't ask me why).
4.) Return the global forward as named by th forward field using the
following line: 'return (mapping.findForward(forward))'.




----- Original Message -----
From: "Matt Raible" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 3:57 PM
Subject: Re: Forwarding/redirecting to action mappings rather than directly
to JSPs


> Jim, did this solution involve using a global forward or just using
something
> like the following:
>
> <forward name="success" path="/myList.do" />
>
> Please post samples - thanks for your help!
>
> Matt
>
> --- Jim <[EMAIL PROTECTED]> wrote:
> > Matt
> >
> > I got my code to work by removing the mapping from the request before
> > forwarding from my action classes with the following line
> >
> > request.removeAttribute(Action.MAPPING_KEY);
> >
> > Prior to that it seemed that the previous mapping was not being
overwritten
> > by the ActionServlet.
> >
> > Hope this helps
> >
> > Jim
> >   ----- Original Message -----
> >   From: Matt Raible
> >   To: [EMAIL PROTECTED]
> >   Sent: Friday, July 20, 2001 4:51 AM
> >   Subject: Forwarding/redirecting to action mappings rather than
directly to
> > JSPs
> >
> >
> >   Jim,
> >
> >
> >
> >   Did you ever get this post figured out - I'm having a similar problem
with
> > iPlanet.
> >
> >
> >
> >
http://www.mail-archive.com/[email protected]/msg11046.html
> >
> >
> >
> >   Thanks,
> >
> >
> >
> >   Matt
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>

Reply via email to