PDA

View Full Version : InitParameter in a bean


pikwik
Jun 1st, 2006, 09:40 AM
Hi,

I use tomcat with struts and spring. I would like to put an init parameter in a bean, how can i do this ?

my parameter

<context-param>
<param-name>GH_HOME</param-name>
<param-value>c:/appgh</param-value>
</context-param>



Thanks !

gmazza
Jun 1st, 2006, 03:52 PM
I think you can just place that value in your web application context file (spring (or whatever)-servlet.xml), using normal DI rules. That is the usual file for bean configuration.