struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Mistroni" <mmistr...@waersystems.com>
Subject RE: Antwort: RE: howto redirect to login site after session expiration?
Date Mon, 23 May 2005 11:03:30 GMT
Hello,
	
>container. I just want to say, if your session expired, go to page xyz.

>BTW: how can I determine via the API if a session expired? Is it
possible 
>at all?

I m not 100% sure, but will an HttpSessionListener help here? 



Regards

Frank




"Marco Mistroni" <mmistroni@waersystems.com> 
23.05.2005 12:24
Bitte antworten an
"Struts Users Mailing List" <user@struts.apache.org>


An
"'Struts Users Mailing List'" <user@struts.apache.org>
Kopie

Thema
RE: howto redirect to login site after session expiration?






Hello,
                 Can't you use a ServletFilter that checks if user is in

the
session?
If it is not you will redirect the request to your loginpage.

Regards
                 marco

-----Original Message-----
From: Frank Ratzlow [mailto:ratzlow@adesso.de] 
Sent: 23 May 2005 11:18
To: user@struts.apache.org
Subject: howto redirect to login site after session expiration?

Hallo folks,

I encountered a strange behaviour regarding the population mechanics of
my 
forms. 

Following situation: I have my app running, the browser stays open with
a 
html form to be filled. The http-session expires and the user submits
the 
form to the server. The result is a http 500 error resulting from a NPE 
caused while accessing the underlying struts form to populate. 
What makes me wonder is the fact that although the session expired the 
request is passed through the ActionServlet, a population of the 
ActionForm is attempted and of course not be completed since the session

including it's objects are already removed.

I would like to see a redirect to an error site that I specify in the 
web.xml or struts-config.xml in that case. How do I ensure that 
unauthenticated users or users with an expired session are redirected to

such a specified site?

TIA

Frank

JBoss 3.2.3
Tomcat 4.1.29 (integrated)
Struts 1.1
JDK 1.4.2_06
Windows XP

===========Stacktrace Start=========================
11:16:00,140 ERROR [Engine] StandardWrapperValve[action]: 
Servlet.service() for servlet action threw exception
javax.servlet.ServletException: BeanUtils.populate
        at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
        at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcess
or.java:821)
        at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
254)
        at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
        at 
com.hannoverre.mmf.presentation.general.MMFActionServlet.process(MMFActi
onServlet.java:126)
        at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at 
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurity
MgrRealm.java:220)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(Container
StatsValve.java:76)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:65)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577
)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78
1)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:549)
        at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:60
5)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:677)
        at java.lang.Thread.run(Thread.java:534)
11:16:00,140 ERROR [Engine] ----- Root Cause -----
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUt
ils.java:493)
        at 
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUt
ils.java:428)
        at 
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUti
ls.java:770)
        at 
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.jav
a:801)
        at 
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
        at 
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
        at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
        at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcess
or.java:821)
        at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
254)
        at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
        at 
com.hannoverre.mmf.presentation.general.MMFActionServlet.process(MMFActi
onServlet.java:126)
        at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at 
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurity
MgrRealm.java:220)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(Container
StatsValve.java:76)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:65)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577
)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78
1)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:549)
        at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:60
5)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:677)
        at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.NullPointerException
        at 
com.hannoverre.mmf.presentation.general.contract.ContractContentBaseForm
.getNotification(ContractContentBaseForm.java:2003)
        ... 57 more

===========Stacktrace End  =========================


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




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


Mime
View raw message