Hello Vanessa,
as the tag of the template file have been swallowed, I don't clearly see what
happens.
I understand that you design a resource that represents a video and is able to
generate an HTML representation to the client browser. In this web page there
is a reference to a video.
I guess the server application lacks the way to serve this static file. I
suggest you define a Directory Restlet in order to solve all these static files:
public class TestApplication extends Application{
@Override
public synchronized Restlet createInboundRoot() {
Router router = new Router(getContext());
router.attach("/test", test.class);
Directory directory = new Directory(getContext(),
"file:///user/data/files/");
router.attach("/static/", directory);
return router;
}
}
Having said that, you can also make the Test Resource able to generate two
representations of its state : the HTML one, and the video one by using several
Get annotations:
@Get("video")
public File getVideo(){
[...]
}
@Get
public Representation toHtml(){
// As done already
}
But this solution requires a little bit more explanations. I cannot answer this
right now, but will try to find time tomorrow.
Best regards,
Thierry Boileau
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2713175