Announcement Announcement Module
Collapse
No announcement yet.
Two App context and select one depending on request Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Two App context and select one depending on request

    Hi, I am newbie to spring, trying to do something like below:Want to create two hash maps in app context. From these hashmaps, I am planning to retrieve values in my actions.ie. from context, get the hashmaps and then based on request parameter, decide which one to use.
    <bean id="exporter" class="org.springframework.web.context.support.Ser vletContextAttributeExporter">
    <property name="attributes">
    <map>
    <entry key="appContenMapEn" value-ref="enMAP" />
    <entry key="appContenMapSp" value-ref="spMAP" />
    </map></property></bean>

    <bean id="enMAP" class="java.util.HashMap">
    <constructor-arg>
    <map>
    <entry key="defaultCss" value="/dmm/styles/default.css" />
    </map>
    </constructor-arg>
    </bean>
    <bean id="spMAP" class="java.util.HashMap">
    <constructor-arg>
    <map>
    <entry key="defaultCss" value="/dmm/styles/default.css" />
    </map>
    </constructor-arg>
    </bean>

    Is it possible to do something like this? Thanks for help,Namita

  • #2
    Does anyone know about it?

    Comment

    Working...
    X