Hi Lutz,

when requesting manually (i.e. by typing the URI in my browser) the three URIs in any order, it should works correctly (I mean it works for me).
Can you confirm this?
However, I've noticed the following thing.
When clicking on the "back" link of the third page, I go back to "http://myserver/myapp/test/foo/"; instead of "http://myserver/myapp/test/"; (because of the ending "/"). You can note that the "base" URI is not the same, it ends with "/test/foo/" instead of "/test/". Then, when clicking on any link, the requested URI is "http://myserver/myapp/test/foo/foo/bar.html";. When applying the template "/foo/{filename}", the value of the "filename" variable is "foo". I hope this is the cause of the problem.

best regards,
Thierry Boileau


Hello Thierry,

thanks a lot for responding so quickly and for your help - I greatly appreciate it!

Apparently, you were at least partly right about the libraries - changing them to the newer version 1.1 (Test) has changed the behavior - but it is still not the way it should be...

I have prepared a very small WAR file to illustrate the problem - if you are willing to download it, it should help to clarify the problem (< 500 kB,
Source code and libraries included): http://www.leonidat.de/test.war

Having updated the libraries at first seemed to do the trick - the endings were accessible. However, once you send a request such as
 "http://myserver/maypp/test/foo/bar.html/"; (with a "/" at the end), the old
problem is back again. You never get a suffix after one such request with a
trailing "/" until you restart the server or redeploy the application.

To illustrate that, I have prepared three examples in the WAR, just deploy it in your tomcat, navigate to "http://localhost:8080/test/"; and try the three links I have provided. Examples 1 and 2 will work fine. After clicking the third link, the other two will have changed their behavior...

Any idea how to avoid that strange behavior? Obviously, I would not like to
rely on the hope that nobody will ever send a "wrong" request to the service...

Thanks a great deal for your support!

Cheers,
Lutz

Reply via email to