Community
Participate
Working Groups
Adding a tranling slash to entrypoint path leads to 404 not found. For example in demo http://rap.eclipsesource.com/demo/release/workbench/app works but http://rap.eclipsesource.com/demo/release/workbench/app/ return 404 This issue has been introduced in RWTServlet in handleRequest : Quote: } else if( "/".equals( request.getPathInfo() ) && "".equals( request.getServletPath() ) ) { // /context/: root servlet, in this case path info "/" is ok handleValidRequest( request, response ); } else { response.sendError( SC_NOT_FOUND ); } with trailing slash, request.getPathInfo is "/" but request.getServletPath is not "" but "/app" before 2.3 it used to work because RWTServlet code was different we went through handleInvalidRequets Quote: if( "/".equals( request.getPathInfo() ) ) { // In case of "http://example.com/webapp/servlet/" redirect to // "http://example.com/webapp/servlet" (same URL without trailing slash) String redirectUrl = createRedirectUrl( request ); response.sendRedirect( response.encodeRedirectURL( redirectUrl ) ); } so as request.getPathInfo is "/" request were redirected to http://rap.eclipsesource.com/demo/release/workbench/app This is related to OSGI. Equinox http service try /app (without trailing slash), if there is nothing registered in /app/ see org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(HttpServletRequest, HttpServletResponse) Quote: // perfect match if (processAlias(req, resp, alias, null)) return; String extensionAlias = findExtensionAlias(alias); alias = alias.substring(0, alias.lastIndexOf('/')); // longest path match while (alias.length() != 0) { if (processAlias(req, resp, alias, extensionAlias)) return; alias = alias.substring(0, alias.lastIndexOf('/')); } As RWTSevlet is reached by ProxyServlet with /app, it should not return 404 nn request.getServletPath() return /app in this case that is a valid path where an entrypoint has been registered. At least if it not considered as a bug, as it worked before 2.3, this change of behavior should be documented. There is a workaround for each entrypoint, registering a redirect servlet to entry point path for entryPoint path + "/" should work.
With the introduction of root entrypoints, this redirect turned out to be problematic. We removed it in response to bug 429041. Servers usually redirect from foo to foo/ if foo is a directory, but not the other way round. For example, eclipse.org/downloads redirects to eclipse.org/downloads/ but eclipse.org/downloads/index.php/ would not redirect to eclipse.org/downloads/index.php but respond with 404 Not Found. That's why I don't consider this a bug, however, it's right that the behavior has changed. We didn't expect it to be an issue but since you stumbled upon it, I'd suggest to add a notice to the 2.3 N&N.
Of course, it would be much better if we could ignore any extra path info after the servlet path. This is currently not possible as it would break access to static resources. Feel free to open an enhancement request for this topic.