I think this is an issue which was addressed by the servlet 2.4
specification. Meaning you might be stuck for now needing to do it in a
container-specific way (since Tomcat tries to avoid this you may not
get a good Tomcat-specific way).
A good general fix would be to use a factory object and manage your own
signleton config object. e.g.:
class Foo {
private static Foo foo = null;
public Foo getFoo() {
if (foo == null) {
foo = new Foo();
}
return foo;
}
protected Foo(){}
}
Then have filters invoke getFoo() as they please. Only one Foo object
will ever be created and you should easily be able to have it hold all
of your needed info.
Cheers,
Jayson Falkner
[EMAIL PROTECTED]
http://www.jspinsider.com
http://www.jspbook.com
Les Parker wrote:
> Does anyone know how to specify the load order for filterchains in tomcat?
>
> I have a servlet that loads on startup which initializes the environment
> for a filter. This works ok in Iplanet 6sp4, but in tomcat 4 the
> load-order gets reversed and filter gets loaded before the servlet.
>
> Thanks,
> Les Parker
>
> This electronic mail transmission may contain confidential information
> and is intended only for the person(s) named. Any use, copying or
> disclosure by any other person is strictly prohibited. If you have
> received this transmission in error, please notify the sender via e-mail.
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html