However, if it is the case, tiles is really silly.
The forward logic should be inside each content tile. There's no way I can move the logic into a jsp page before calling any tile, e.g. layout.jsp.
There should be a better way, otherwise, tiles is not useful at all.
From: "Zheng, Gang" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]> Subject: RE: tiles and logic:forward Date: Tue, 11 Mar 2003 14:08:04 -0500
You have to make sure the the "forward" or "redirect" happens before anything is written out to the HTTP response.
One way is to invoke the <logic:forward name="logon"/> the first thing in your JSP page before you call any tiles.
- GZ
-----Original Message----- From: Laker Shen [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2003 1:50 PM To: [EMAIL PROTECTED] Subject: tiles and logic:forward
I tried to migrate my struts project to use tiles. Hit some problems with forward.
In a tile, I have: <logic:notPresent scope="session" name="user"> <logic:forward name="logon"/> </logic:notPresent>
If the user is not logged on, he will be directed to the logon page. It works as a standalone jsp page. However, once I put it into a tile, it is not working. The following exception is thrown: [ServletException in:/docs/SubmitFile.jsp] Exception forwarding for name logon: java.lang.IllegalStateException: Cannot forward after response has been committed'
Looks like the way tiles works is to put all the tile definition into one http response and write to the response even before the forward happens.
I tried to use logic:redirect, no exception is thrown, but the user is not directed to the logon page.
Can someone help? Thanks.
_________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
--------------------------------------------------------------------- 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]
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]