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-jasper/jasper2/src/share/org/apache/jasper/servlet JspServletWrapper.java
Date Sat, 11 May 2002 05:00:22 GMT
remm        02/05/10 22:00:22

  Modified:    jasper2/src/share/org/apache/jasper
                        EmbededServletOptions.java JspEngineContext.java
               jasper2/src/share/org/apache/jasper/servlet
                        JspServletWrapper.java
  Log:
  - AFAIK, the current code wasn't implementing reloading properly when
    development = true.
  - This patch checks for an outdated JSP on every page access.
  - Defaults to development = true.
  - It could be a good idea to write some more visible docs on configuring
    Jasper, and maybe add a page for configuring that and the default web.xml
    in the admin webapp.
  
  Revision  Changes    Path
  1.4       +4 -4      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbededServletOptions.java
  
  Index: EmbededServletOptions.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbededServletOptions.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EmbededServletOptions.java	6 May 2002 04:33:15 -0000	1.3
  +++ EmbededServletOptions.java	11 May 2002 05:00:21 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbededServletOptions.java,v
1.3 2002/05/06 04:33:15 glenn Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/05/06 04:33:15 $
  + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbededServletOptions.java,v
1.4 2002/05/11 05:00:21 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/05/11 05:00:21 $
    *
    * ====================================================================
    * 
  @@ -82,7 +82,7 @@
       /**
        * Is Jasper being used in development mode?
        */
  -    public boolean development = false;
  +    public boolean development = true;
   
       /**
        * Do you want to keep the generated Java files around?
  
  
  
  1.7       +4 -4      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspEngineContext.java
  
  Index: JspEngineContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspEngineContext.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JspEngineContext.java	6 May 2002 04:33:15 -0000	1.6
  +++ JspEngineContext.java	11 May 2002 05:00:22 -0000	1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspEngineContext.java,v
1.6 2002/05/06 04:33:15 glenn Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/05/06 04:33:15 $
  + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspEngineContext.java,v
1.7 2002/05/11 05:00:22 remm Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/05/11 05:00:22 $
    *
    * ====================================================================
    * 
  @@ -365,7 +365,7 @@
       public Class load() throws JasperException, FileNotFoundException {
   
           try {
  -            if (servletClass == null || options.getDevelopment()) {
  +            if (servletClass == null && !options.getDevelopment()) {
                   compile();
               }
               jspLoader = new JasperLoader
  
  
  
  1.4       +9 -3      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java
  
  Index: JspServletWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JspServletWrapper.java	6 May 2002 04:33:16 -0000	1.3
  +++ JspServletWrapper.java	11 May 2002 05:00:22 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java,v
1.3 2002/05/06 04:33:16 glenn Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/05/06 04:33:16 $
  + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java,v
1.4 2002/05/11 05:00:22 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/05/11 05:00:22 $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -150,6 +150,12 @@
                   response.sendError
                       (HttpServletResponse.SC_SERVICE_UNAVAILABLE,
                        Constants.getString("jsp.error.unavailable"));
  +            }
  +
  +            if (options.getDevelopment()) {
  +                synchronized (this) {
  +                    ctxt.compile();
  +                }
               }
   
               if (ctxt.isReload()) {
  
  
  

--
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