myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: @WebFilter not called when forwarding to login page
Date Thu, 12 Mar 2015 13:59:37 GMT
Can you share a project reproducing it?

Can it be a mapping conflict?
Le 12 mars 2015 11:54, "l.penet@senat.fr" <l.penet@senat.fr> a écrit :

> Dear all,
>
> I have a legacy application which performs hibernate session attachement
> in a web filter.
>
> It works, excepting, sometimes, on a redirect by the container to the
> login page.
>
> In my web.xml, I have :
>
>     <login-config>
>         <auth-method>FORM</auth-method>
>         <form-login-config>
> <form-login-page>/login.xhtml</form-login-page>
> <form-error-page>/login_failed.html</form-error-page>
>         </form-login-config>
>     </login-config>
>
>
> In login.xhtml, I use LogginBean to perform a "programmatic login". This
> is where it just does not work sometimes.
>
> My web filter is set up using
>
>     <filter>
> <filter-name>HibernateSessionConversationFilter</filter-name>
> <filter-class>fr.senat.faces.filters.HibernateSessionConversationFi
> lter</filter-class>
>         <init-param>
>             <param-name>login-page-timeout</param-name>
>             <param-value>60</param-value>
>         </init-param>
>     </filter>
>     <filter-mapping>
> <filter-name>HibernateSessionConversationFilter</filter-name>
>         <url-pattern>*.xhtml</url-pattern>
>     </filter-mapping>
>
> As you can see in the following stack trace, it is not called.
>
> What should I do to get it called even in this case ?
>
> Thanks in advance,
>
> Ludovic
>
> ======
>
> LoginBean.getRedirectPage:339
> Hidden Source Calls
> LoginBean$$OwbNormalScopeProxy0.getRedirectPage
> GeneratedMethodAccessor373.invoke
> DelegatingMethodAccessorImpl.invoke:43
> Method.invoke:606
> BeanELResolver.getValue:99
> CompositeELResolver.getValue:67
> FacesCompositeELResolver.getValue:179
> AstValue.getValue:183
> ValueExpressionImpl.getValue:184
> ELText$ELTextVariable.writeText:219
> ELText$ELTextComposite.writeText:131
> TextInstruction.write:45
> UIInstructions.encodeBegin:46
> UILeaf.encodeAll:507
> UIComponentBase.encodeAll:550
> UIComponentBase.encodeAll:550
> FaceletViewDeclarationLanguage.renderView:1891
> ViewHandlerImpl.renderView:313
> ViewHandlerWrapper.renderView:58
> ViewHandlerWrapper.renderView:58
> ViewHandlerWrapper.renderView:58
> RenderResponseExecutor.execute:116
> LifecycleImpl.render:267
> DeltaSpikeLifecycleWrapper.render:111
> LifecycleWrapper.render:31
> FacesServlet.service:200
> ApplicationFilterChain.internalDoFilter:303
> ApplicationFilterChain.doFilter:208
> Hidden Source Calls
> WsFilter.doFilter:52
> ApplicationFilterChain.internalDoFilter:241
> ApplicationFilterChain.doFilter:208
> ApplicationDispatcher.invoke:748
> ApplicationDispatcher.processRequest:486
> ApplicationDispatcher.doForward:411
> ApplicationDispatcher.forward:338
> FormAuthenticator.forwardToLoginPage:423
> FormAuthenticator.authenticate:278
> AuthenticatorBase.authenticate:683
> AuthenticatorBase.invoke:473
> StandardHostValve.invoke:170
> ErrorReportValve.invoke:103
> AccessLogValve.invoke:950
> StandardEngineValve.invoke:116
> CoyoteAdapter.service:421
> AbstractHttp11Processor.process:1070
> AbstractProtocol$AbstractConnectionHandler.process:611
> JIoEndpoint$SocketProcessor.run:316
> Hidden Source Calls
> ThreadPoolExecutor.runWorker:1145
> ThreadPoolExecutor$Worker.run:615
> TaskThread$WrappingRunnable.run:61
> Hidden Source Calls
> Thread.run:745
> |
> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> |
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message