tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lar...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/resources LocalStrings.properties
Date Thu, 09 Nov 2000 21:42:56 GMT
larryi      00/11/09 13:42:55

  Modified:    src/share/org/apache/tomcat/context Tag: tomcat_32
                        DefaultCMSetter.java
               src/share/org/apache/tomcat/core Tag: tomcat_32
                        ContextManager.java
               src/share/org/apache/tomcat/resources Tag: tomcat_32
                        LocalStrings.properties
  Log:
  Add some indication of the unavailable time to the default response for
  UnavailableExceptions.  Needed to see if recent changes to Exception
  handling are actually working.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.45.2.7  +17 -0     jakarta-tomcat/src/share/org/apache/tomcat/context/DefaultCMSetter.java
  
  Index: DefaultCMSetter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/context/DefaultCMSetter.java,v
  retrieving revision 1.45.2.6
  retrieving revision 1.45.2.7
  diff -u -r1.45.2.6 -r1.45.2.7
  --- DefaultCMSetter.java	2000/09/28 02:07:03	1.45.2.6
  +++ DefaultCMSetter.java	2000/11/09 21:42:46	1.45.2.7
  @@ -379,6 +379,23 @@
   	    .append(msg)
   	    .append("</b><br>");
   
  +	// add unavailable time if present
  +	if ( sc == 503) {
  +            Integer ut = (Integer)req.getAttribute("tomcat.servlet.error.unavailableTime");
  +            if ( ut != null) {
  +                // if permanent
  +                if (ut.intValue() < 0) {
  +		    buf.append("<br>")
  +                	.append(sm.getString("defaulterrorpage.service.permanently.unavailable"))
  +			.append("<br>");
  +                } else {
  +		    buf.append("<br>")
  +                	.append(sm.getString("defaulterrorpage.service.unavailable",ut))
  +			.append("<br>");
  +                }
  +	    }
  +	}
  +
   	buf.append("</body>\r\n");
   
   	if( res.isUsingStream() ) {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.100.2.16 +1 -0      jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java
  
  Index: ContextManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java,v
  retrieving revision 1.100.2.15
  retrieving revision 1.100.2.16
  diff -u -r1.100.2.15 -r1.100.2.16
  --- ContextManager.java	2000/11/09 13:40:48	1.100.2.15
  +++ ContextManager.java	2000/11/09 21:42:54	1.100.2.16
  @@ -1081,6 +1081,7 @@
   	    ctx.log( "UnavailableException in: " + req +
   			", time remaining " + unavailableTime + " seconds : " + msg, t);
   	    req.setAttribute("javax.servlet.error.message", msg );
  +            req.setAttribute("tomcat.servlet.error.unavailableTime", new Integer(unavailableTime));
   	    res.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE); // 503
   	    handleStatus( req, res, HttpServletResponse.SC_SERVICE_UNAVAILABLE );
   	    // indicate error handling has been called
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.4   +3 -1      jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings.properties,v
  retrieving revision 1.4.2.3
  retrieving revision 1.4.2.4
  diff -u -r1.4.2.3 -r1.4.2.4
  --- LocalStrings.properties	2000/11/09 21:18:09	1.4.2.3
  +++ LocalStrings.properties	2000/11/09 21:42:55	1.4.2.4
  @@ -1,4 +1,4 @@
  -# $Id: LocalStrings.properties,v 1.4.2.3 2000/11/09 21:18:09 craigmcc Exp $
  +# $Id: LocalStrings.properties,v 1.4.2.4 2000/11/09 21:42:55 larryi Exp $
   #
   
   # Localized strings for package org.apache.tomcat.core
  @@ -21,6 +21,8 @@
   defaulterrorpage.thisdocumenthasmoved=This document has moved
   defaulterrorpage.internalservleterror=Internal Servlet Error:
   defaulterrorpage.notfoundrequest=Not found request:
  +defaulterrorpage.service.unavailable=Service is unavailable, try again in {0} seconds
  +defaulterrorpage.service.permanently.unavailable=Service is permanently unavailable
   
   #RequestDispatcherImpl.java
   dispatcher.forwardException=Forwarded servlet threw exception
  
  
  

Mime
View raw message