Now that I'm able to manage ServerResources in Spring and route requests to
them, I have run into yet another problem.  My server resources have no
Restlet Context!  Since Spring is creating them, like this:

    <!-- restlet resources -->
    <bean id="sampleResource"
class="com.willowtreeapps.rest.resource.TestResource" scope="prototype">
        <!-- let spring inject your service -->
        <property name="lookupManager" ref="lookupManager"></property>
    </bean>

The sampleResource has no Context.  So when I call getContext() it returns
null.  What I really need is to get the container ServletContext for use
within my server resource.  The examples I've found for that assume that you
have a Restlet Context available to query.

-- 
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/How-to-inject-a-Spring-bean-service-into-a-Restlet-component-tp5314211p5322405.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2636454

Reply via email to