Sorry, I forgot to say I use the maven 1.1 snapshot

Jonathan Hall wrote:
Hi,

I'm trying to serve static files using Directory in a Spring way, but I have a problem when it comes to the Context param.

In http://restlet.tigris.org/issues/show_bug.cgi?id=334 Jerome wrote:

"Directory and other classes needing a Context param in constructor should also accept a parent Restlet as well, directly in the API to workaround the inability
of Spring to inject a child property taken from another bean."

This was never implemented, was there another solution found? I've tried searching but had no luck.

At the minute I have it working but extending Directory with:

public SpringDirectory( Restlet restlet, String rootUri )
{
   super( restlet.getContext(), rootUri );
}

and using the spring config:

<bean class="com.blah.SpringDirectory">
   <constructor-arg index="0" ref="application"/>
   <constructor-arg index="1" value="clap://thread/static"/>
</bean>

Any help appreciated,

jon




Reply via email to