tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime TagHandlerPool.java
Date Wed, 22 Jan 2003 19:58:45 GMT
costin      2003/01/22 11:58:45

  Modified:    jasper2/src/share/org/apache/jasper/runtime
                        TagHandlerPool.java
  Log:
  Strange - getServletConfig() returns null.
  
  Revision  Changes    Path
  1.5       +5 -0      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/TagHandlerPool.java
  
  Index: TagHandlerPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/TagHandlerPool.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TagHandlerPool.java	22 Jan 2003 19:54:24 -0000	1.4
  +++ TagHandlerPool.java	22 Jan 2003 19:58:44 -0000	1.5
  @@ -187,8 +187,13 @@
       }
   
       protected static String getOption( Servlet servlet, String name, String defaultV) {
  +        if( servlet==null ) return defaultV;
  +        if( servlet.getServletConfig() == null ) return defaultV;
  +
           String value=servlet.getServletConfig().getInitParameter(name);
           if( value != null ) return value;
  +        if( servlet.getServletConfig().getServletContext() ==null )
  +            return defaultV;
           value=servlet.getServletConfig().getServletContext().getInitParameter(name);
           if( value!=null ) return value;
           return defaultV;
  
  
  

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


Mime
View raw message