Got it working! Needed to use org.restlet.ext.spring.SpringServerServlet
instead and configure the web.xml a little differently. Below is the
configuration that worked for me.
The web.xml:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:application-context.xml</param-value>
</context-param>
<servlet>
<servlet-name>myServlet</servlet-name>
<servlet-class>org.restlet.ext.spring.SpringServerServlet</servlet-class>
<init-param>
<param-name>org.restlet.component</param-name>
<param-value>myComponent</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
And here are my Restlet beans:
<bean id="myComponent.context"
class="org.springframework.beans.factory.config.PropertyPathFactoryBean" />
<bean id="componentChildContext" class="org.restlet.Context">
<lookup-method name="createChildContext" bean="myComponent.context"
/>
</bean>
<bean id="myComponent" class="org.restlet.ext.spring.SpringComponent">
<property name="name" value="My Component" />
<property name="author" value="Paul Morris" />
<property name="defaultTarget" ref="myApplication" />
</bean>
<bean id="resource" class="com.quietbus.test.MyResource" />
<bean id="router" class="org.restlet.ext.spring.SpringRouter">
<property name="attachments">
<map>
<entry key="/test-resource">
<bean class="org.restlet.ext.spring.SpringFinder">
<lookup-method name="create" bean="resource" />
</bean>
</entry>
</map>
</property>
</bean>
<bean id="myApplication" class="org.restlet.ext.wadl.WadlApplication">
<property name="name" value="My Application" />
<property name="author" value="Paul Morris" />
<property name="inboundRoot" ref="router" />
</bean>
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/OPTIONS-and-TRACE-not-being-caught-by-Restlet-Server-tp7578142p7578151.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2973777