I think it was added subsequent to the release of 1.1-beta-1, but I know
that in the current nightly builds you should be able to call
RequestUtils.selectApplication() yourself, during the execution of an
Action.  This should cause any subsequent operations (including
interpretation of things like mapping.findForward()), to be interpreted
against the new sub-app instead of the old one.

Craig




On Tue, 25 Jun 2002, Mete Kural wrote:

> Date: Tue, 25 Jun 2002 10:49:51 -0700 (PDT)
> From: Mete Kural <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: Sub-apps Question - Urgent Help Needed
>
> Hi Rob,
>
> > I haven't used the SwitchAction yet but I have been
> > using sub-apps for about
> > 2 Months, so...
>
> Thank God there is another person on this list that
> uses sub-apps. I think they are pretty cool and all
> that but I guess because they're new people aren't
> used to them yet.
>
> > Doesn't your application have a context ?
> >
> > How about
> >
> >
> http://localhost/application-context/catalog/switch.do?prefix=&page=/
>
> The webapp is a /ROOT app so the application context
> is root. I'm sorry not not make that clear.
>
> My original intention was actually not to use
> SwitchAction. In my case, what I'm doing is:
>
> 1) CheckoutAction in the /catalog sub-app, i.e.
> "/catalog/checkout.do" is called from a catalog page
> shoppingCart.jsp, i.e. /catalog/shoppingCart.jsp.
>
> 2) CheckoutAction does some processing, finds out that
> the user is not logged in and decides that it should
> forward the request to a page "logon.jsp" in the
> default sub-app, i.e. "/logon.jsp" (This is because
> logon operations are handled in the defualt sub-app
> and not in the /catalog sub-app).
>
> 3) CheckoutAction returns the forward with the logical
> name "logon".
>
> I was confused at this point. So how will the
> CheckoutAction find the forward "logon" that is in the
> default sub-app, not in the /catalog sub-app? I
> couldn't figure this out, so I decided to create a new
> forward named "logon" in the /catalog sub-app config
> file, i.e. struts-config-catalog.xml.
>
> This was the new forward in struts-config-catalog.xml:
>
> <forward name="logon"
>   path="/switch.do? prefix=&page=/logon.do" />
>
> I didn't like this because it seems like an indirect
> way of switching between sub-apps in this specific
> case, while there has to be a simpler more direct way
> to forward to the /logon.jsp from the
> /catalog/checkout.do action.
>
> Well this SwitchAction idea didn't work anyways, so if
> you have any suggestion at all at how you think I can
> do this seemingly simple task of forwarding to a jsp
> file of another sub-app, I would greatly appreciate
> your help.
>
> Thank you,
> Mete Kural
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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

Reply via email to