Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 26425 invoked from network); 14 Jul 2000 12:53:43 -0000 Received: from finch-post-12.mail.demon.net (194.217.242.41) by locus.apache.org with SMTP; 14 Jul 2000 12:53:43 -0000 Received: from adolos.demon.co.uk ([212.228.187.7] helo=PowerBookG3) by finch-post-12.mail.demon.net with smtp (Exim 2.12 #1) id 13D4yH-000IQJ-0C; Fri, 14 Jul 2000 12:53:37 +0000 To: cocoon-dev@xml.apache.org Subject: CoocoonServlet.java, getServletPath() and TomCat Cc: fumagalli@exoffice.com Date: Fri, 14 Jul 2000 13:53:20 +0100 From: Stuart Roebuck reply-to: sr@adolos.com x-mailer: Apple Mail (2.317) Message-Id: Final followup to my previous postings... Yesterday's update to CocoonServlet.java appears to break things under TomCat 3.1. Given a URL of: http://www.site.com/path/to/context/subdir/page.html?query I think the code uri = getServletPath() which used to be: uri = getPathInfo() is intended to return: /subdir/page.html Under TomCat 3.1, getPathInfo() works, but getServletPath() returns an empty string. In my mind the Servlet 2.2 spec. would imply that getPathInfo() was the correct method to use. Therefore, why not either: 1. Use context.getServerInfo() to check for specific cases like "Gefian LWS and Orion" and return getServletPath() for them only. 2. Check to see whether uri = req.getRequestURI().substring(req.getContextPath().length()); is a possible alternative (it works under Tomcat 3.1, but I don't know about the rest). Hope this is helpful, Stuart.