Rhett, Spring context loaded in web.xml (tomcat) via context params
<!-- Restlet support (default servlet) --> <servlet> <servlet-name>restletServlet</servlet-name> <servlet-class>org.restlet.ext.spring.SpringServerServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>restletServlet</servlet-name> <url-pattern>/ws/*</url-pattern> <url-pattern>/mock/*</url-pattern> </servlet-mapping> <!-- Configuration parameters --> <context-param> <description> Comma separated list of Spring context configuration files. </description> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring/spring-core.xml, /WEB-INF/spring/spring-mail.xml, /WEB-INF/spring/spring-restlet.xml, </param-value> </context-param> <context-param> <description> Spring bean name that inherits from Component. It is used to instantiate and attach the described component, contained applications and connectors (Used by org.restlet.ext.spring.SpringServerServlet) </description> <param-name>org.restlet.component</param-name> <param-value> component </param-value> </context-param> Btw, I corrected the virtual host configuration from the parent post. pl refer the same. Rhett Sutphin wrote: > > Hi Infinity, > > On Oct 5, 2009, at 10:03 AM, infinity wrote: > >> I'm trying to setup a SpringBeanRouter as per the javadocs since I >> cannot use >> SpringRouter if I use spring prototype beans for attachements acc to >> this >> http://n2.nabble.com/Unable-to-inject-Protoype-beans-into-a-singleton-bean-via-value-ref-for-a-Spring-Router-td3756435.html#a3756435 >> issue . >> >> Is there something wrong with the following configuration? >> >> <?xml version="1.0" encoding="UTF-8"?> >> <beans xmlns="http://www.springframework.org/schema/beans" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:util="http://www.springframework.org/schema/util" >> xsi:schemaLocation="http://www.springframework.org/schema/beans >> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> >> >> <!-- Components --> >> <bean name="component" id="component" >> class="org.restlet.ext.spring.SpringComponent"> >> <property name="clientsList"> >> <list> >> <value>HTTP, HTTPS</value> >> </list> >> </property> >> <property name="hosts"> >> <list> >> <ref bean="virtualHost" /> >> </list> >> </property> >> >> </bean> >> >> <!-- Virtual Hosts --> >> <bean id="virtualHost" class="org.restlet.ext.spring.SpringHost"> >> <constructor-arg ref="component" /> >> <property name="attachments"> >> <map> >> <entry key="/" value-ref="router" /> >> </map> >> </property> >> </bean> >> >> <!-- Routers --> >> <bean name="router" >> class="org.restlet.ext.spring.SpringBeanRouter"/> >> >> <!-- Resources --> >> <bean name="/ws/contact/{operation}" >> class="com.xx.rest.resource.ContactData" scope="prototype" >> autowire="byName"/> >> <bean name="/mock/1/data/Contact/{userId}" >> class="com.xxx.mock.resource.ContactData" scope="prototype" >> autowire="byName"/> >> >> The server loads fine but none of Server Resources are invoked. >> There is no >> stacktrace either. Pl suggest. > > What sort of server are you using? How are you loading the beans from > this context and attaching them to the server? > > Rhett > >> >> </beans> >> -- >> View this message in context: >> http://n2.nabble.com/Unable-to-setup-SpringBeanRouter-configure-tp3769405p3769405.html >> Sent from the Restlet Discuss mailing list archive at Nabble.com. >> >> ------------------------------------------------------ >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2403701 > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2403785 > > -- View this message in context: http://n2.nabble.com/Unable-to-setup-SpringBeanRouter-confiiguration-with-VirtualHost-tp3769405p3769937.html Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2403797