Subject: TilesRequestProcessor (WAS: Re: How do I navigate from one subApp to another 
in Struts1.1?)
From: "Kevin Henrikson" <[EMAIL PROTECTED]>
 ===
Cedric,

    We subclass the Struts RequestProcessor to provide some special resource
resolving, (i.e. override the doForward and doInclude methods to do some
special file path resolution).  Unfortunately if we try this same code with
the TilesRequestProcessor (so we can get the cool ability to do
includes/forwards with tiles definitions directly in the struts-config.xml)
it won't work.  Is there a 'hook' per say inside a tiles that is easily
subclassed to provide us access to do filepath resolution before the URI is
passed to the RequestDispatcher or pageContext.include() is called?
    If not I think this would be a very nice enhancement.  Basically struts
allows us to hook in to it's RequestDispatcher calls but when tiles in
present there is nolonger a single point of RequestDispatching.  To
workaround this now we'd have to tweak some internals of the
InsertTag/GetTag since it also call include directly.  Is there any plans to
centralize calls to RequestDispatcher, and pageContext.include() in the tile
code base now that tiles in more fully integrated with the Struts code base?

thanks

-kevin

"Cedric Dumoulin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
>   Normally it doesn't matter.
>   The Tiles servlet was used from 1.1dev until 1.1b1 to initialize
> Tiles. It contains some request processing methods used only by Struts1.0.
>   The TilesRequestProcessor should normally not impact on the normal
> request processor work. It just check if a forward or include is done on
> a (logical) definition name. If it is not the case, the uri is passed
> "as is" to RequestDispatcher.include() or forward().
>
>   Cedric
>
> Trieu, Danny wrote:
>
> >Craig,
> >
> >Does it mater if my action servlet is the TilesActionComponentServlet?
> >
> >danny
> >
> >-----Original Message-----
> >From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, July 16, 2002 7:53 PM
> >To: Struts Users Mailing List
> >Subject: RE: How do I navigate from one subApp to another in Struts1.1?
> >
> >
> >
> >On Tue, 16 Jul 2002, Trieu, Danny wrote:
> >
> >
> >
> >>Date: Tue, 16 Jul 2002 19:22:08 -0700
> >>From: "Trieu, Danny" <[EMAIL PROTECTED]>
> >>Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> >>Subject: RE: How do I navigate from one subApp to another in Struts1.1?
> >>
> >>Craig,
> >>
> >>I have an action=foo under subapp bar.
> >>I register my subapp like this:
> >>Web.xml
> >>    <init-param>
> >>      <param-name>config/bar</param-name>
> >>      <param-value>/WEB-INF/struts-bar.xml</param-value>
> >>    </init-param>
> >>
> >>
> >>How come it give me a 404 error when I call my action in the browser
with
> >>this URL: http://localhost:7001/my_web_app/bar/foo.do
> >>
> >>
> >>
> >
> >What does your servlet mapping look like?  It should still use the "*.do"
> >pattern.
> >
> >Do you also have a "default" subapp configured with the plain "config"
> >init parameter?  I've never tried it without, although conceptually it
> >should work.
> >
> >Craig
> >
> >
> >
> >
> >>-----Original Message-----
> >>From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> >>Sent: Tuesday, July 16, 2002 6:38 PM
> >>To: Struts Users Mailing List
> >>Subject: Re: How do I navigate from one subApp to another in Struts1.1?
> >>
> >>
> >>
> >>On Tue, 16 Jul 2002, Trieu, Danny wrote:
> >>
> >>
> >>
> >>>Date: Tue, 16 Jul 2002 18:11:48 -0700
> >>>From: "Trieu, Danny" <[EMAIL PROTECTED]>
> >>>Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >>>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >>>Cc: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >>>Subject: How do I navigate from one subApp to another in Struts1.1?
> >>>
> >>>For example: I am in a page of a sub-application of a Struts
> >>>
> >>>
> >application,
> >
> >
> >>>and I want to render a link that link you to another sub-application
> >>>
> >>>
> >>within
> >>
> >>
> >>>the application using the <html:link/> tag.
> >>>
> >>>
> >>>
> >>The tempting way to do this is to do something like
> >>
> >>  <html:link forward="foo"/>
> >>
> >>and mark the "foo" forward as being context relative.  However, this
will
> >>ONLY work if you are switching to the default sub-app, because you'd be
> >>bypassing the controller servlet where sub-app selection is performed.
> >>
> >>The better way is to make your link go through an <action> that uses the
> >>standard SwitchAction class.  This wants you to send along the
application
> >>prefix of the sub-app you want to switch to, as well as a resource in
that
> >>sub-app to forward to after the switch.
> >>
> >>
> >>
> >>>danny
> >>>
> >>>
> >>>
> >>Craig
> >>
> >>
> >>
> >>--
> >>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]>
> >
> >
> >>
> >>
> >
> >
> >--
> >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]>
> >
> >
> >
>
>
>
> --
> 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