Dave,

It's about more than that. You can send some amount of data - couldn't tell you how much. The important thing is that the response has not been committed. It sounds to me as if Pauls' response has been committed (due to sufficient output having been sent).

Essentially, you want to check right up front if you need to do a redirect.

Paul, why did you move your redirect into a tile? If you need some pages not to check for your userData object, why not just have a second layout?

<!-- Will output document head and such - first order of business in body is to determine if "userData" is present. If not, it redirects. If it is, it invokes tiles:insert for the "page" attribute. -->
<definition name="secure.root" ....>
 <put name="page" value="..." />
</definition>

<!-- This one does not have the check -->
<definition name="insecure.root" ...>
 <put name="page" value="..." />
</definition>

<!-- Here we use the above.  We could break the page
<definition name="secure.home" extends="secure.root">
 <put name="page" value="..." />
</definition>

<definition name="insecure.login" extends="insecure.root">
 <put name="page" value="..." />
</definition>

You'd be better served to use a filter to determine if a user is logged in and send them to your login page if they aren't, but the above should help you out, I think, if you're already heavily invested in this direction.

Regards,

Eddie

----- Original Message ----- From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Friday, May 27, 2005 12:29 PM
Subject: Re: problem with logic redirect tag and tiles


Paul Moody wrote:

I have a problem using logic:redirect with tiles.
[...]
Any ideas?

Could it be because a redirect only works if no data has been sent to the browser yet? (But I thought I saw an HTML comment before the redirect that works, so maybe that's not the right trail to head down.)

Dave



---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0521-4, 05/27/2005
Tested on: 5/28/2005 12:32:08 PM
avast! - copyright (c) 2000-2004 ALWIL Software.
http://www.avast.com




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

Reply via email to