A "forward" change the current request processing from one servlet to another, but stay on server side, and the request object is the same.
A redirect send a response to the client (the browser), instructing it to send another request to the specified URL. The request object change because another request is issue.
Building a page with Tiles require that you keep the same request object until you complete the page. So, you can only use forward, and not redirect.

Cedric

ROSSEL Olivier wrote:

But when I want to tiles:put the output of the LoginState action into the
loginBox :

<tiles:insert page="/pages/MainLayout.jsp" flush="true">
<tiles:put name="title" value="/pages/Title.jsp"/>
<tiles:put name="loginBox" value="/LoginState.do"/>
</tiles:insert>

, nothing appears.

My question:
is it possible to have tiles:put to display the output of an action, instead
of just the output of a (statically-referenced) jsp.

I answer to me:
yes you can reference to a Struts action from a tile.
But this action must not forward to a result page via a redirection
(: <forward ... redirect="true"> will make the tile to display nothing.)

So my question is: why?
Having redirect="true" in the <forward> of an action is quite
good. But it is incompatible with tiles, which are also quite good.

Is it a feature?

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

--
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