Announcement Announcement Module
Collapse
No announcement yet.
How can I set a bean parameter from Tomcat's context ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I set a bean parameter from Tomcat's context ?

    Hi,

    I have a secure Tomcat application context located on our server, containing various parameters. I would like to use these parameters in my spring beans.

    eg. Tomcat settings :

    <Context path="/myApp" >
    <Parameter name="dblogin" value="foo" />
    <Parameter name="dbpasswd" value="secure" />
    </Context>

    Bean settings (this is just a guess ) :

    <bean id="datasource" >
    <property name="dblogin" value="${dblogin}" />
    <property name="dbpasswd" value="${dbpasswd}" />
    </bean>

    Where the properties are filled in from the Context.

    Any thoughts on how to do this ?

    All help greatly appreciated.

    Thanks,
    Rod.
Working...
X