Hello Daz,

I've answered in the StackOverFlow forum.

Best regards,
Thierry Boileau


2014-02-04 Daz <dazito1...@gmail.com>:

> I've made this question on stackoverflow but to no success yet.
> (Here's the link:
> http://stackoverflow.com/questions/21533787/restlet-serving-static-content-android)
>
> I'm using Restlet in Android.
>
> I've the REST part working fine but now I need to serve static pages to
> the user and here is where I'm stuck.
>
> I've the following router:
> this.attach("/web_resources/{uid}", staticContentRestlet);
>
> If the user goes to http://10.17.1.72:8080/web_resources/index.html
> which is my phone's ip, it will get 200 status for the index file, as
> expected, but it will get 404 on all request to get the CSS file,
> javascript file and so on... They are all placed in web_resources/js/,
> web_resources/css/ and web_resources/img/ folders.
>
> While googling around I found out this bug report:
> http://restlet.tigris.org/issues/show_bug.cgi?id=1240
>
> And I tried to use wildcards to load up all the content.
> So I added the following code:
> this.attach("/web_resources/{part1}/{part2*}", testRestlet);
>
> But if I load up the following url:
> /web_resources/js/transfer/services.js
> it returns a 404 for the service.js file
>
> Using only: this.attach("/web_resources/{part1*}", testRestlet);
> doesn't solve the problem...
>
> So it seems that the "*" wildcard does nothing. Maybe the bug wasn't fixed
> yet? Or am I missing something here?
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3072518
>

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

Reply via email to