I needed this too and after searching the forums it appears lots of people ask 
this question, the answer is that there is no neat solution, your best solution 
is to write a javax.servlet.Filter for every page that sets some session 
attribute when the user is logged in, e.g.


  |            public void doFilter(ServletRequest request, ServletResponse 
response, FilterChain chain)
  |                 throws IOException, ServletException
  |             {
  | 
  |         HttpSession session = ((HttpServletRequest)request).getSession();
  |         if(session.getAttribute("login_flag") == null)
  |         {
  |               session.setAttribute("login_flag", "1");
  |               
servletContext.getRequestDispatcher(welcomePage).forward(request, response);
  |         }
  |         else
  |         {
  |              chain.doFilter(request, response);
  |         }
  | 
  |             }
  | 
Its not nice but it works.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991269#3991269

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991269
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to