I'm doing something similar like this:
<logic:present name="contactCookie" scope="session">
<logic:forward name="track"/>
</logic:present>
<logic:notPresent name="contactCookie" scope="session">
<logic:forward name="login"/>
</logic:notPresent>
Then I have both of those defined in my global-forwards section:
<global-forwards>
<forward name="track" path="/do/track" redirect="true"/>
<forward name="login" path="/do/login" redirect="true"/>
<forward name="logout" path="/do/logout" redirect="true"/>
</global-forwards>
-----Original Message-----
From: koen boutsen [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 10:41
To: [EMAIL PROTECTED]
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(WebAppDispatcherResponse.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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]