You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "David H. DeWolf" <dd...@apache.org> on 2006/12/05 14:44:22 UTC
Re: Tiles 2 - How to dispatch to tiles servlet????
Moving to Struts Users list, please reply there.
Antonio Petrelli wrote:
> First of all this is a typical question to be submitted in Struts Users
> mailing list.
> Anyway, since Tiles 2 is under development, I will answer anyway.
>
> Stone, Sam ha scritto:
>> I can instantiate the DefinitionsFactory. I can get a
>> ComponentDefinition OK. I cannot figure out how to forward the request
>> from MyServlet to dispatch to my tiles servlet. Any help is greatly
>> appreciated.
>>
> Err... you can't, since TilesServlet does not accept connections (it is
> used without a servlet-mapping).
> Anyway you can forward to (or include) your definition.
>
> <snip>
> ComponentContext context =
> TilesAccess.getContainer(request.getSession().getServletContext())
> .render(request, response, "my.definition.name");
> </snip>
Just to avoid confusion, I don't think Antonio meant to imply that the
Container.render returns a ComponentContext.
TilesContainer tc = TilesAccess.getContainer(servletContext)
ComponentContext context = tc.getComponentContext(req, res);
// do something with the component context if needed,
tc.render(req, res, "my.definition.name");
David
>
> HTH
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
[OT] Re: Tiles 2 - How to dispatch to tiles servlet????
Posted by Antonio Petrelli <ap...@apache.org>.
David H. DeWolf ha scritto:
> Just to avoid confusion, I don't think Antonio meant to imply that the
> Container.render returns a ComponentContext.
Err... right, my confusion was due to wrong cut'n'paste :-)
And the confusion continues, since I posted the same email to Struts
Developers list...
AND IT'S ONLY TUESDAY! :-P
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Tiles 2 - How to dispatch to tiles servlet????
Posted by Antonio Petrelli <ap...@apache.org>.
David H. DeWolf ha scritto:
> Just to avoid confusion, I don't think Antonio meant to imply that the
> Container.render returns a ComponentContext.
Err... right, my confusion was due to wrong cut'n'paste :-)
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org