Mike Kienenberger wrote:
On 2/27/06, Elam Daly <[EMAIL PROTECTED]> wrote:

Oh, and how do I determine if a session has expired?  I don't see any
enlightening methods in the HttpSession class.

Your mistake here is thinking that the servlet api was intended to be useful :)

You have to do something like this:

            boolean expired = false;
            try
            {
                 session.getAttribute("anything"):
                 expired = false;
            }
            catch (IllegalStateException e)
            {
                expired = true;
            }

No, in a filter you can just call session.isNew()

You can do a redirect in a filter like this:

    ((HttpServletResponse) response).sendRedirect(newUrl);
    return;

instead of calling chain.doFilter() to pass control on to
later filters or the JSP.

Elam wrote:
> So it seems to me that in order to use my filter, that I need
> to use the >doChain() method in the myfaces filter class

All filters do this by default, to pass control on. Trust me,
you don't have to alter the MyFaces filter.

I love filters. Who needs an MVC framework when you've got filters
to be the controllers? :-)

Jon
--
.....................................................................
          Dr Jonathan Harley   .
                               .   Email: [EMAIL PROTECTED]
           Zac Parkplatz Ltd   .   Office Telephone: 024 7633 1375
           www.parkplatz.net   .   Mobile: 079 4116 0423

Reply via email to