> When Tomcat sees a request for > 'http://localhost:8080/mycontext' it sends back a response to > redirect to 'http://localhost:8080/mycontext/'. This is so > that relative links to things like images and stylesheets > work correctly. If the browser conformed to the HTTP/1.1 RFC, > it would re-request the new URL with a POST, but I don't know > of any browsers that do this.
would it be possible to add a configuration parameter to certain contexts so that the external redirects are replaced by internal forwardings? I have a m2m application where the clients are not browsers, but simple dedicated devices that do not implement redirects, and their standard way of accessing the server is .../mycontext?x=a, so without a trailing '/'. Since I could not find a url rewrite mechanism, like in Apache, I had to use a dirty trick, I renamed my context to mycontext-app and I wrote a servlet in the root context to forward requests from "/mycontext" to "/mycontext-app/" (beware that .forward() is usually called in the current context, if another context is needed it should be retrieved first) having the rewrite done directly by Tomcat (is the DefaultServlet handling this?) would be a more appropriate solution, imho. regards, Liviu --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]