Hello, I created the Directory in that way and it worked, but when I start my server whows an error whith the first file:
GRAVE: The informa.rest.spring.resources.SpringDirectory class has no Restlet defined to process calls. Maybe it wasn't properly started. And it doesn't serve the file (error 500). If I refresh the page in the browser it works. public class SpringDirectory extends Application { @Override public Restlet createRoot() { return new Directory(getComponent().getContext().createChildContext(), "file:///c:/templates/"); } I'm using 1.2-SNAPSHOT version. Rubén Hernando > This worked! Thanks for your time. > Brian > > Michael Terrington wrote: > > Hi Brian, > > > > I've been adding the FILE client connector by creating a new component > > and feeding that to the restlet that requires it. Like so: > > > > Component component = new Component(); > > component.getClients().add(Protocol.FILE); > > Directory directory = new > > Directory(component.getContext().createChildContext(), > > "file:///c:/"); > > directory.setListingAllowed(true); > > router.attach("/files", directory); > > > > BTW the createChildContext() is in 1.1 so if you are using 1.0 just > > remove it. There's also no need for the inner Application containing > > the Directory. > > > > Regards, > > Michael. > > -- > Brian E. Williams > Senior Application Developer > > The Archer Group > 233 King Street > Wilmington, DE 19801 > > w: 302.429.9120 x225 > f: 302.429.8720 > > http://www.archer-group.com ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1028389