|
From: Darren D. <da...@da...> - 2003-08-11 21:36:20
|
On Monday 11 August 2003 19:43, j=C3=BCrgen h=C3=B6ller [werk3AT] wrote: > Hi Darren, > > You're actually the first one to ask for reviving ContextLoaderServlet ;-) I guess a lot of in-house developers won't know anything of Spring yet. Th= ose=20 that do will be battling against corporate sluggishness like I do so I'm su= re=20 they'll appreciate it ;) > Of course, the ContextLoader delegate already allowed being called in a > single line from within a custom startup servlet. So we're now re-adding > ContextLoaderServlet for pure convenience on Servlet 2.2, to avoid the ne= ed > for a custom startup servlet with a ContextLoader.initContext call. I'm not sure from what you say here whether the attached file I sent came=20 through OK, but it was a very cut down version of the original servlet whic= h=20 simply does just what you said and makes the single line call to=20 ContextLoader.initContext from the init() method. I also amended the servi= ce=20 method (just in case it ever mistakenly got called) and changed javadoc to= =20 highlight the deprecation. My feeling was just that it was very definitely= =20 framework code rather than application code and being so simple, it made=20 sense to add it. > Frankly, I haven't been aware that the listeners have been our only Servl= et > 2.3 dependency. But the main reason for removing the loader servlet was > consistency: We also got WebAppRootListener and Log4jConfigListener, and > splitting each of them into a listener, a servlet, and a delegate class t= oo > seemed like overkill. Do you see any need for this? If all of the services can be encapsulated in one servlet, I'd suggest doin= g=20 that rather than maintaining separate servlets and their associated web.xml= =20 entries. I'm happy to keep it up to date for you since I'll be using it=20 anyway. It may not be ideal from a design point of view, but this is only = a=20 2.2 compromise for us laggers. A further updated version with duplicate=20 log4j and webAppRoot init code is attached here. Note that I've NOT tested= =20 this yet (it compiles ok), but I'll drop it into a WebSphere 4.0x server=20 tomorrow morning and try to break it. If you can hold off committing=20 anything until then, I can send you the proper results and any further=20 changes required. All the best, =2D-=20 Darren Davison Public Key: http://www.davison.uk.net/key.jsp |