|
From: <dar...@hs...> - 2003-08-11 15:40:33
|
Would there be any interest in reviving the skeleton of the old i21 servlet
that used to do this, just for the sake of backwards compatibility - at
least for a while? I know it *is* a step backwards, but many large
corporations do have a habit of moving reluctantly to newer versions of
application servers and plenty may appreciate the gesture. Seems a shame
to push this framework activity into the application domain when it's only
a dozen lines of code and it looks to be the only thing preventing servlet
2.2 compatibility for the MVC codebase.
Attached is a modified version of the servlet with suitable @deprecated
tags and comments for consideration. It should have no impact on any
existing code from 0.9.1
All the best,
Darren.
(See attached file: ContextLoaderServlet.java)
<quote>
Hi Darren,
You're right, Spring assumes Servlet 2.3 in that it recommends listeners
for startup work, like ContextLoaderListener and Log4jConfigListener. We
compile against Servlet 2.3, so there might be some other dependencies too,
but none that I can think of at the moment.
If you look at the implementation of ContextLoaderListener, you'll find
that it just delegates the contextInitialized event to
ContextLoader.initContext(event.getServletContext()). So in a Servlet 2.2
container, you could write your own load-on-startup servlet that invokes
ContextLoader.initContext in its init method, among other custom startup
work that you may require, like Log4J initialization.
Regards,
Juergen
-----Urspr=FCngliche Nachricht-----
Von: Darren Davison [mailto:da...@da...]
Gesendet: So 10.08.2003 21:19
An: spr...@li...
Cc:
Betreff: [Springframework-user] applicationContext.xml for servlet 2.2
hi,
All of the example web projects load the applicationContext with a
<listener>
<listener-class>
com.interface21.web.context.ContextLoaderListener
</listener-class>
</listener>
which is servlet 2.3 specific. Is there a supported/recommended way to
make
this work for servlet 2.2?
Regards,
</quote>
Darren Davison
CIBM Intranet Team
int> 799 19431
ext> +44 (0)20 7991 9431
_____________________________________________________
This transmission has been issued by a member of the HSBC Group=20
"HSBC" for the information of the addressee only and should not be=20
reproduced and / or distributed to any other person. Each page attached=20
hereto must be read in conjunction with any disclaimer which forms part=20
of it. Unless otherwise stated, this transmission is neither an offer nor t=
he=20
solicitation of an offer to sell or purchase any investment. Its contents a=
re=20
based on information obtained from sources believed to be reliable but
HSBC makes no representation and accepts no responsibility or liability as=
to its completeness or accuracy.
|