W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 2000

Re: Problems with jigsaw 2.0.4 and "Tomcat" JSP...

From: Roland Mainz <Roland.Mainz@informatik.med.uni-giessen.de>
Date: Tue, 07 Mar 2000 12:05:21 +0100
Message-Id: <38C4E271.179B82BB@informatik.med.uni-giessen.de>
To: W3 Jigsaw Mailinglist <www-jigsaw@w3.org>
Benoit Mahe wrote:

> I just looked the tomcat jsp servlet code and the way it get the jsp URI is
> strange. GNUJsp use request.getPathInfo() to get the jsp URI and tomcat
> use its own request attribute "javax.servlet.include.request_uri".
> Is it a standard way to get jsp URI? I've never seen it before.
> Anyway, I add a workarround to ServletMapperFrame and it works now,
> please check for the next developper release.

I debugged the last four hours and wrote my own workaround for the problem (and thanks to your fixes to ServletContext.getResource() my "fix" now works :-)

I hacked org.apache.jasper.runtime.JspServlet from the Tomcat 3.1 M1 (http://jakarta.apache.org/builds/tomcat/release/v3.1_m1/bin/jakarta-tomcat.zip) and replaced request.getServletPath() by
request.getPathInfo():
-- snip --
    public void service (HttpServletRequest request,
        HttpServletResponse response)
 throws ServletException, IOException
    {
 try {
            String includeUri
                = (String) request.getAttribute(Constants.INC_REQUEST_URI);

            String jspUri;

            if (includeUri == null)
            {
  jspUri = request.getPathInfo();
   d( "service: spUri = request.getPathInfo() == " + jspUri );
 //jspUri = request.getServletPath();
 //d( "service: spUri = request.getServletPath() == " + jspUri );
            }
            else
            {
                jspUri = includeUri;
  d( "service: spUri = includeUri == " + jspUri );
     }
-- snip --
(static void d( String ); is my debugging output wrapper)

How does your fix in ServletMapperFrame look like ?

----

Bye,
Roland

--
  __ .  . __
 (o.\ \/ /.o) Roland.Mainz@informatik.med.uni-giessen.de
  \__\/\/__/  gisburn@informatik.med.uni-giessen.de
  /O /==\ O\  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
 (;O/ \/ \O;) TEL +49 641 99-13193 FAX +49 641 99-41359
Received on Tuesday, 7 March 2000 06:05:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:07 UTC