Thank you for your response.
The way I worked around the problem was to set a session attribute to the value of the
definition within the servlet. I then forwarded to a common jsp page that obtained
that session attribute value and uses it in a tile insert tag.
Seems to work ok.
Thanks again,
Trevor
-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 04:04
To: Struts Users Mailing List
Subject: Re: Using a Tile Definition from within a Servlet ?
Yes, it is possible. There is no simple API to do that, but take a
look at the TilesRequestProcessor.processTilesDefinition(...) method to
know how it is done by the struts servlet.
What you should do is:
* retrieve the definition from the factory
* create the new tile context from thedefinition
* save the current tile context
* store the new tile context in the jsp context
* include the new tile
* restore the current context
Hope this help,
Cedric
Trevor Nightingale wrote:
>Is it possible to "forward" to a tiles definition with a servlet ?
>
>Something like
>
> RequestDispatcher dispatcher =
> request.getRequestDispatcher("tile.def.goes.here");
> dispatcher.forward(request,response);
>
>
>Thank you in advance,
>Trevor
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]