tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wall" <dw...@Yozons.com>
Subject URL with servlet path and .jsp bug for jasper or "per spec"?
Date Tue, 23 Oct 2001 04:18:11 GMT
I've got a problem with a URL that includes both the /servlet/ path AND ends
with .jsp, though the .jsp file in this case is not a java serverpages file.

I'm running Tomcat 3.2.3 using Apache with mod_jk.  The mod_jk mount
configuration for Apache is:

    JkMount /ssd/servlet/* ajp13
    JkMount /ssd/*.jsp ajp13

 I have an URL that is designed such that it's supposed to run my servlet,
but still contain a file name since it's for a file download servlet.  Some
browsers use the name from the URL to select the "save as" name when you do
a download (yes, we also set the Content-disposition for those browsers that
 will deal with it).  The URL will look like:

 /ssd/servlet/GA/file.txt -- which would download a file called 'file.txt'
 from our servlet mapped at /ssd/servlet/GA.  Normally, the 'file.txt' is
 returned as the query string for my servlet.

 But, if I have a file that ends in .JSP:

 /ssd/servlet/GA/file.jsp

 Tomcat doesn't run the GA servlet with 'file.jsp' as the query string.
 Instead. Tomcat thinks this must be a JSP and of course doesn't like it and
 produces an error.  The Jasper log shows the confusion:

 2001-10-05 18:27:44 -        ServletPath: /servlet/GA/file.jsp
 2001-10-05 18:27:44 -           PathInfo: null
 2001-10-05 18:27:44 -           RealPath:
/home/tomcat/jakarta-tomcat-3.2.3/WebSsd2/remoteapps/ssd/servlet/GA/file.jsp
 2001-10-05 18:27:44 -         RequestURI: /ssd/servlet/GA/file.jsp

 Is this a bug in jasper, in that it doesn't recognize that it should find
 the GA servlet, or is this the way it's supposed to work according to spec
 since the URL ends with .jsp?  In my case, it's complicated by the fact
that
 the filename part is not under my direct control since it reflects the name
 of
 a file that user uploaded earlier and is now downloading.

 David


Mime
View raw message