You can create your own tag-lib.

Something like
<app:checkLogon/>

All the logic to check if session is valid or not can go to the class
handling this tag.

regards
deepak

----- Original Message -----
From: "koen boutsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 8:10 PM
Subject: redirect problem


> Hi
> If the session is invalid, I want to send the user to the logon page.
This works fine when I go through an action.  In some cases, I don't go
through an action, I want to redirect the user.
> I tried it like this : (sessionIsValid is a attribute in the session. If
this attribute is null, it means that my session does no longer exist).
>
> <iflogic:if name="sessionIsValid" op="NotPresent">
> <iflogic:then>
> <logic:redirect page="/pages/logon/logonLayout.jsp" />
> </iflogic:then>
> <iflogic:else>
> </iflogic:else>
> </iflogic:if>
>
> This is the error I get :
> ava.lang.IllegalStateException
> [9/10/03 15:44:01:242 CEST] 498b26a6 SystemErr     R at
com.ibm.ws.webcontainer.webapp.WebAppDispatcherResponse.sendRedirect(WebAppD
ispatcherResponse.java:87)
> [9/10/03 15:44:01:242 CEST] 498b26a6 SystemErr     R at
org.apache.struts.taglib.logic.RedirectTag.doEndTag(RedirectTag.java:306)
> [9/10/03 15:44:01:242 CEST] 498b26a6 SystemErr     R
>
>
> Any reply will be appreciated, because I'm completely stuck
>
> Thanks
>
> Koen
>
>
>
>
> ____________________________________________________________
> Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]






Reply via email to