Hi There-
I have been using restlet for a few weeks steady now and love it but now have a
problem with spring and servlets and complete integration. I am using as a base
the spring cvs repository pointed to on the wiki and using. Here is my
situation, not sure if I am attacking it correctly or if i can.
I want to make modifications to my 'base application' that is used in my
servlet with the spring router. For example suppose I have a base application
like this:
// Extends Application
public HwApplication() {
super();
TunnelService ts = new TunnelService(true,true,true,true,true);
ts.setMediaTypeParameter("mt");
this.setTunnelService(ts);
}
Here is one of the variations of my applicationContext-router.xml file that I
used. I thought this would work from the docs on the wiki.
<bean id="application" class="com.hw.rest.HwApplication">
</bean>
<bean id="root" class="org.restlet.ext.spring.SpringRouter">
<constructor-arg ref="application" />
<property name="attachments">
<map>
<entry key="/foo"
value="com.hw.rest.HwResource" />
</map>
</property>
</bean>
What happens is that when com.hw.rest.HwResource is used it does not have a
handle to my application but a generic restlet application. I have tried a
variety of things from the wiki examples and also the CVS repo and nothing
seems to work. So in my use case I am not getting the tunneling or the media
conversion i need via my custom application..
Somewhere something is not getting bound correctly. This is happening in the
servlet situation only. I am digging around the code now the best I can to see
where things get switched up. I obviously and more sure on the correct binding
order.
If anybody has advice or an example from their own work that does this I am
super appreciative!
matt
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=997142