Hi, you can share this info in the HttpServletSession. On Tue, Jun 28, 2011 at 4:57 PM, fachhoch <fachh...@gmail.com> wrote: > I have very few jsp pages and for these pages I want to check that user is > authenticated. I tried calling > > AuthenticatedWebSession.get().isSignedIn() and I getting this exception > > java.lang.IllegalStateException: you can only locate or create sessions in > the context of a request cycle > at org.apache.wicket.Session.findOrCreate(Session.java:208) > at org.apache.wicket.Session.get(Session.java:252) > at > org.apache.wicket.authentication.AuthenticatedWebSession.get(AuthenticatedWebSession.java:40) > at > gov.hhs.acf.web.filter.JspSecurityFilter.doFilter(JspSecurityFilter.java:29) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1187) > at > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) > at > org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) > at > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) > at > org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) > at > org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1187) > at > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) > at > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1187) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:421) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:493) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:924) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:358) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:860) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:245) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) > at org.eclipse.jetty.server.Server.handle(Server.java:335) > at > org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:588) > at > org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1029) > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:549) > at > org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:211) > at > org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:418) > at > org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:476) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) > at java.lang.Thread.run(Thread.java:619) > > > please suggest me how check if user is authenticated in case of jsp pages ? > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/jsp-check-AuthenticatedWebSession-get-isSignedIn-tp3631307p3631307.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
-- Pedro Henrique Oliveira dos Santos --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org