Hi Miltos,

I've just tested you sample resource with the following application 
code, and it works for me.
Can you give it a try?

Best regards,
Thierry Boileau

public class MyApplication extends Application {

     public static void main(String[] args) throws Exception {
         Component component = new Component();
         component.getServers().add(Protocol.HTTP, 8181);
         component.getClients().add(Protocol.FILE);

         VirtualHost vh1 = new VirtualHost(component.getContext());
         vh1.setHostDomain("localhost");
         vh1.attach("", new MyApplication());
         component.getHosts().add(vh1);
         component.start();
         ClientResource r = new ClientResource(
                 
"http://localhost:8181/images_path/test/test2/file/test.txt";);

         r.get().write(System.out);

         component.stop();
     }

     public Restlet createInboundRoot() {
         Router router = new Router(getContext());
         TemplateRoute route = router.attach(
                 "/images_path/{images_path}/file/{filename}", 
MyResource.class);
         Variable variable = new Variable(Variable.TYPE_ALL);
         route.getTemplate().getVariables().put("images_path", variable);

         return router;
     };

}

> Hello again.Thank u for the short response.
> Iam attaching my main restlet standalone java application and the resource 
> class.
>
> Best regards,
>
> Miltos Miltiadous

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

Reply via email to