I am assuming you have a servlet at /mycontext-app/ ? Can't you just map the servlet instead to /mycontext ?
Or am I missing something? Alternatively, is it possible to change your clients to add that extra / so: /mycontext/?x=a Adam. -----Original Message----- From: Liviu Ionescu [mailto:[EMAIL PROTECTED] Sent: 24 March 2004 11:51 To: 'Tomcat Users List' Subject: RE: method="post" but doGet() called -> external redirects > 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] _________________________________________________________ This email and any files attached is intended for the addressee only and may contain information that is confidential and/or legally privileged. Unauthorised use is strictly prohibited and may be unlawful. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, including any attachment, except for the purpose of delivery to the addressee. We make every effort to keep our network free from viruses. However, you do need to verify this e-mail and any attachments to it to be virus free as we can take no responsibility for any computer virus which might be transferred by way of this e-mail. Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software. ________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
