ContextFilter not instantiated if "localDispatcherName" non-existent

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ContextFilter not instantiated if "localDispatcherName" non-existent

jonwimp
Not that I find many cases where I don't specify "localDispatcherName" in web.xml , but I think
ContextFilter.init() may not be catching possible exceptions correctly.

See ContextFilter.java lines 293-295. If web.xml doesn't have "localDispatcherName" defined, line
295 will throw an exception, break out of the entire ContextFilter.init(), and prevent the
instantiation of the ContextFilter. (Please correct me if I'm wrong about this Java thingy).

Is it possible to catch IllegalArgumentException at line 295? Like this:

try { dispatcher = new WebAppDispatcher(dispatcherName, delegator, readers); }
catch (IllegalArgumentException e) { }

Jonathon