Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 26118 invoked from network); 27 Nov 2000 14:49:33 -0000 Received: from smtp23.singnet.com.sg (165.21.101.203) by locus.apache.org with SMTP; 27 Nov 2000 14:49:33 -0000 Received: from alum.comp.nus.edu.sg (hs0690.singnet.com.sg [165.21.198.125]) by smtp23.singnet.com.sg (8.9.3/8.9.3) with ESMTP id WAA24545 for ; Mon, 27 Nov 2000 22:49:27 +0800 (envelope-from leeyeowl@alum.comp.nus.edu.sg) Message-ID: <3A227487.878CA3DE@alum.comp.nus.edu.sg> Date: Mon, 27 Nov 2000 22:49:43 +0800 From: Lee Yeow Leong X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Dispatcher Question Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N I'm experiencing some differences in the behaviour of Tomcat vs Websphere and IAS. Assuming that I have a web application called test. Inside the code of a servlet in the web application, I perform the following ------------------------------------------------------------- RequestDispatcher dispatcher = request.getRequestDispatcher("/"); dispatcher.forward(request,response); ------------------------------------------------------------- Should the above the resolve to a) http:/// b) http://// Websphere 3.5 and IAS6 resolves to (b), while Tomcat resolves to (a). I read the specification 2.1 & 2.2. 2.1 seems to talk nothing about it, while version 2.2 says ----------------------------------------------------------- The behavior of this method is similar to the method of the same name in the ServletContext, however it does not require a complete path within the context to be given as part of the argument to operate. The servlet container can use the information in the request object to transform the given relative path to a complete path. For example, in a context rooted at �/�, a request to /garden/tools.html, a request dispatcher obtained via ServletRequest.getRequestDispatcher("header.html") will behave exactly like a call to ServletContext.getRequestDispatcher("/garden/header.html"). ----------------------------------------------------------- But nothing seems to mention about how paths that begins with a "/" ought to be resolved. What should be the desired behaviour? tia.