Im having some trouble configuring the client which supposedly serves the files from a Directory restlet. Im running this as a standalone java application, not as a servlet.

... snip snip ...
        Component component = new Component();
        VelocityRepresentation.TEMPLATEPATH = "velocitytemplates/";
        component.getServers().add(Protocol.HTTP, 9090);
        Client client = new Client(Protocol.FILE);
        client.getContext().getParameters().add("timeToLive", "10");
        component.getClients().add(client);
        
        component.getDefaultHost().attach(new MyApplication());
        component.start();
... snip snip ...

As far as I can tell, client.getContext().getParameters() is null and my application therefore throws a nullpointer exception.

Plain and simple, what Im trying to accomplish is to (globally) set the time to live for my static file serving to 0... should I approach this differently?

Reply via email to