Hi John,
We can certainly support injection of the ServletConfig / PortletConfig. The
only issue there is that this just makes sense for beans running in a
FrameworkServlet / FrameworkPortlet, so this is not something for the core
WebApplicationContext implementations - rather a custom BeanPostProcessor to
be registered by FrameworkServlet / FrameworkPortlet.
In any case, let's consider this for Spring 1.3!
Juergen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf Of
John Lewis
Sent: Sunday, November 06, 2005 4:54 AM
To: spr...@li...
Subject: [Springframework-developer] Access to ServletConfig in
WebApplicationContext
I posted a question about this to the user list last week and no one had any
secret tricks for this, so I'd like to propose a minor change to
WebApplicationContext and to FrameworkServlet as follows:
I'd like to provide beans running in a WebApplicationContext with access to
the ServletConfig that they are running in. I'd like to do this in order to
provide access to the portletName and the initParameters for the Servlet. I
know several other developers have expressed an interest in this.
This can be done in the same way that Spring currently provides access to
the ServletContext. In fact, we can also provide a ServletConfigAware
interface and inject the ServletConfig directly into any bean that wants it.
I will then also provide equivalent functionality in the Portlet MVC code so
that beans running in a PortletApplicationContext have access the
PortletConfig they are running in. I'd like to do this in both frameworks
in order to keep them relatively synchronized.
Any objections to all this?
Juergen, I'd be happy to email you the code prior to committing it into CVS
if you would like to review the changes first. Please let me know.
Thanks for your support.
John Lewis
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|