> Hi,
> what I meant by "finished successfully" is a logging statement I have
[quoted text clipped - 10 lines]
> be shown? This is the first time I am using filters so I am not very
> confident with them.
You haven't shown any real code, so all of my comments so far are
somewhat speculative. Nevertheless, I see two problems with your approach:
(1) This is a minor problem, but what if some unsecured page in your
application performs a
session.setAttribute("security.object.name", new Object());
? Does your application continue to work as expected? (That is, does
any part of it care *what* object is bound to the session, or is the
fact that *any* object to the specified name all that matters?)
(2) The major problem is that your filter is broken. If it is really
written as you describe, then it should block ALL authenticated traffic
and redirect any unauthenticated traffic. Perhaps that's what you're
actually seeing? For instance, are you sure that the successful
secured-page views you have seen have actually come through the filter?
The servlet spec (2.4) and API docs both say that a filter is
responsible for passing the request and response on down the chain
unless it wants to block other request processing. You accomplish this
by invoking the passed-in FilterChain's doFilter() method. See
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/Filter.html#doFilter(javax.s
ervlet.ServletRequest,%20javax.servlet.ServletResponse,%20javax.servlet.FilterCh
ain)
If you are not doing that then that is likely the source of your problem.

Signature
John Bollinger
jobollin@indiana.edu
fdevelop@googlemail.com - 26 Jan 2006 09:58 GMT
Hi,
> You haven't shown any real code, so all of my comments so far are
> somewhat speculative. Nevertheless, I see two problems with your approach:
Sorry for that but my boss wants the complete code to be
confidential...
> (1) This is a minor problem, but what if some unsecured page in your
> application performs a
[quoted text clipped - 4 lines]
> any part of it care *what* object is bound to the session, or is the
> fact that *any* object to the specified name all that matters?)
The other parts of the application work fine. I checked the other pages
whether or not they modify the object but they do not even reference
it.
> The servlet spec (2.4) and API docs both say that a filter is
> responsible for passing the request and response on down the chain
> unless it wants to block other request processing. You accomplish this
> by invoking the passed-in FilterChain's doFilter() method. See
> http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/Filter.html#doFilter(javax.s
ervlet.ServletRequest,%20javax.servlet.ServletResponse,%20javax.servlet.FilterCh
ain)
> If you are not doing that then that is likely the source of your problem.
I will try that and come back to you.
Thanks alot for your support.
polsa