Community
Participate
Working Groups
Build ID: N/A Steps To Reproduce: 1. Configure RAP Application launch with the 'myproject' servlet name 2. Run it and try to access it in a browser with a trailing slash URL: '/myproject/' The session timeout message will be shown, providing a link to the same '/myproject/' page. More information: I've described the behaviour in more details here: http://www.eclipse.org/newsportal/article.php?id=6132&group=eclipse.technology.rap#6132
*** Bug 277304 has been marked as a duplicate of this bug. ***
This seems to be related to bug 227733
Created attachment 146938 [details] Proposed fix Most resource URLs in RAP are relative, e.g.: rwt-resources/resource/widget/rap/display/bg.gif rwt-resources/themes/images/148ab7bc If the initial request to RAP application is: http://example.com/rap than the browser will construct the consecutive requests for resources as follows: http://example.com/rwt-resources/resource/widget/rap/display/bg.gif http://example.com/rwt-resources/themes/images/148ab7bc These requests will be correctly resolved to the corresponding resource (or servlet) registrations. Now, let's suppose that the initial request has a slash (or an entire path) appended after the servlet name: http://example.com/rap/ the resources requests will have the name of the servlet included in the path: http://example.com/rap/rwt-resources/resource/widget/rap/display/bg.gif http://example.com/rap/rwt-resources/themes/images/148ab7bc These requests will not be resolved to the appropriate resources. They will all end up in the RAP servlet (the RWTDelegate) and the response will consist of the RAP initial HTML page. This explains why the images are not shows as reported in bug 227733. The session timeout is another demonstration of the same issue. It affects application which have the UICallBack mechanism activated. The proposed patch redirects requests with slash (or slash and additional path segments) after the servlet name to the correct RAP servlet URL. The original request parameters are preserved in the query string of the redirection URL. The stripped path is also added to the redirection URL as a parameter with name "pathInfo". Therefore the request http://example.com/rap/ will be redirected to http://example.com/rap?pathInfo=/ or a more generic case: http://example.com/myContext/myServlet/foo/bar?startup=myEntry will be redirected to http://example.com/myContext/myServlet?startup=myEntry&pathInfo=/foo/bar
*** Bug 227733 has been marked as a duplicate of this bug. ***
Created attachment 147872 [details] Alternative solution * Requests with a trailing slash after the servlet name (e.g. http://example.com/webapp/servlet/) are redirected to the same URL without the trailing slash (http://example.com/webapp/servlet) * Requests with additional paths (e.g.http://example.com/webapp/servlet/foo) are answered with 404 -not found
Committred second patch to CVS HEAD