PDA

View Full Version : get servlet context


domurtag
Jun 15th, 2007, 04:31 PM
Hi,

Within a spring web application config. file is there any way that I can inject the servlet context into a bean?
In other words, what should I replace '???' with?

<bean id="myBean" class="com.example.MyBean">
<property name="servletContext">???</property>
</bean>


Many thanks in advance,
DM

sureshpw
Jun 15th, 2007, 06:08 PM
this (http://forum.springframework.org/showthread.php?t=39927) might help.

domurtag
Jun 15th, 2007, 07:05 PM
It looks to be exactly what I need - many thanks!