struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan P Sexton <A.P.Sex...@cs.bham.ac.uk>
Subject Using CheckLogin tag from within tiles
Date Sun, 06 Oct 2002 17:26:09 GMT

I am switching from plain JSP to using tiles. I was using a CheckLogin
tag on my JSP based on the one in the example for struts. This checks if
there is a valid user in the session and, if not, creates an ActionError
indicating that the session has timed out and forwards to logon.

Now I have a simpleLayout.jsp similar to that in the tiles section of
the Chuck Cavaness's online book draft: I insert a header, a body and a
footer in the simpleLayout for my normal pages.

Now I have a problem with the CheckLogin tag:

- If I put it in the body insert, then when the login check fails
  (because of session timeout) it throws an exception saying that it
  couldn't forward because the output was already committed (I presume
  that the preceding tiles do a flush).

- If I put it at the top of the simpleLayout.jsp (which I thought would
  be before anything was flushed) then it detects the error (and creates
  the correct ActionError) but the forward to the logon page doesn't
  work (the current page is displayed) and the page skip of the
  CheckLogin tag doesn't work.

Can anyone explain to me what is going on and how to fix it?


Alan Sexton




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message