Results 1 to 2 of 2

Thread: -servlet.xml and param

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    4

    Question -servlet.xml and param

    Hello,
    I param a user-servlet.xml like this and it is working .

    <bean id="userImpl" class="com.xxx.xxx.UserProxyImpl" scope="singleton" dependency-check="objects">
    </bean>

    <bean name="/UserService" class="org.springframework.remoting.httpinvoker.Ht tpInvokerServiceExporter">
    <property name="service" ref="userImpl"/>
    <property name="serviceInterface" value="com.xxx.xxx.UserProxy"/>
    </bean>

    The com.xxx.xxx.UserProxyImpl class is already specified in an other Spring xml file and i dont want declare again the bean in the -servlet.xml file.

    How I can do it ?

    Best Regards

  2. #2
    Join Date
    Nov 2006
    Location
    Germany
    Posts
    452

    Default

    Hi,

    normally you can access all beans that are in parent applicationcontext.
    So you can load the "other" spring beand definition in a root webapplicationcontext through the contextloadlistener, after that you can access them in you child applicationcontext.

    regards
    agim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •