remm        2005/05/13 00:12:24

  Modified:    jasper2/src/share/org/apache/jasper/servlet
                        JspCServletContext.java
               webapps/docs changelog.xml
  Log:
  - Second attempt with my own patch. (note: we don't care about efficiency 
here, since this is not used often at all)
  
  Revision  Changes    Path
  1.5       +12 -3     
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspCServletContext.java
  
  Index: JspCServletContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspCServletContext.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JspCServletContext.java   12 May 2005 13:01:04 -0000      1.4
  +++ JspCServletContext.java   13 May 2005 07:12:24 -0000      1.5
  @@ -236,9 +236,18 @@
               throw new MalformedURLException("Path '" + path +
                                               "' does not start with '/'");
           URL url = new URL(myResourceBaseURL, path.substring(1));
  -        if ("file".equals(url.getProtocol())) {
  -            if (!(new File(url.getFile())).exists()) {
  -                return null;
  +        InputStream is = null;
  +        try {
  +            is = url.openStream();
  +        } catch (Throwable t) {
  +            url = null;
  +        } finally {
  +            if (is != null) {
  +                try {
  +                    is.close();
  +                } catch (Throwable t2) {
  +                    // Ignore
  +                }
               }
           }
           return url;
  
  
  
  1.309     +1 -1      jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.308
  retrieving revision 1.309
  diff -u -r1.308 -r1.309
  --- changelog.xml     12 May 2005 13:01:04 -0000      1.308
  +++ changelog.xml     13 May 2005 07:12:24 -0000      1.309
  @@ -204,7 +204,7 @@
           Daryl Robbins (remm)
         </update>
         <fix>
  -        <bug>34465</bug>: Jspc failure if there is no web.xml, submitted by 
Yoichi Hirose (remm)
  +        <bug>34465</bug>: Jspc failure if there is no web.xml (remm)
         </fix>
       </changelog>
     </subsection>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to