tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java
Date Thu, 21 Aug 2003 04:17:06 GMT
remm        2003/08/20 21:17:06

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  - Ensure uniqueness of patters across all servlets, so that the mapper doesn't
    become a mess.
  - This should fix Jean-Francois' problem.
  
  Revision  Changes    Path
  1.86      +8 -1      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- StandardContext.java	20 Aug 2003 08:24:22 -0000	1.85
  +++ StandardContext.java	21 Aug 2003 04:17:06 -0000	1.86
  @@ -2027,6 +2027,13 @@
   
           // Add this mapping to our registered set
           synchronized (servletMappings) {
  +            String name2 = (String) servletMappings.get(pattern);
  +            if (name2 != null) {
  +                // Don't allow more than one servlet on the same pattern
  +                Wrapper wrapper = (Wrapper) findChild(name2);
  +                wrapper.removeMapping(pattern);
  +                mapper.removeWrapper(pattern);
  +            }
               servletMappings.put(pattern, name);
           }
           Wrapper wrapper = (Wrapper) findChild(name);
  
  
  

Mime
View raw message