tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler TagLibraryInfoImpl.java
Date Tue, 15 Apr 2003 21:42:37 GMT
luehe       2003/04/15 14:42:37

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        TagLibraryInfoImpl.java
  Log:
  Fixed 19031: Failure in processing TLD files in JAR files included with web application
  
  Now that JAR files are closed in the TagLibraryInfoImpl constructor's finally,
  we must instruct JarURLConnection not to cache them, that is, disable caching.
  
  Revision  Changes    Path
  1.40      +7 -13     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- TagLibraryInfoImpl.java	15 Apr 2003 19:55:51 -0000	1.39
  +++ TagLibraryInfoImpl.java	15 Apr 2003 21:42:37 -0000	1.40
  @@ -191,21 +191,15 @@
                   }
               } else {
                   // Tag library is packaged in JAR file
  -                ZipEntry jarEntry = null;
  -                JarURLConnection conn = null;
                   try {
                       URL url = new URL("jar:" + location[0] + "!/");
  -                    conn = (JarURLConnection) url.openConnection();
  -                    conn.connect(); //@@@ necessary???
  +                    JarURLConnection conn = (JarURLConnection) url.openConnection();
  +		    conn.setUseCaches(false);
  +                    conn.connect();
                       jarFile = conn.getJarFile();
  -                    jarEntry = jarFile.getEntry(location[1]);
  +                    ZipEntry jarEntry = jarFile.getEntry(location[1]);
                       in = jarFile.getInputStream(jarEntry);
                       parseTLD(ctxt, location[0], in, jarFile);
  -                    // FIXME @@@
  -                    // -- it seems that the JarURLConnection class caches JarFile 
  -                    // objects for particular URLs, and there is no way to get 
  -                    // it to release the cached entry, so
  -                    // there's no way to redeploy from the same JAR file.  Wierd.
                   } catch (Exception ex) {
                       err.jspError("jsp.error.tld.unable_to_read", location[0],
                                    location[1], ex.toString());
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message