cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties LocalStrings_fr.properties LocalStrings_ja.properties
billbarker2005/01/08 13:14:21 Modified:src/share/org/apache/tomcat/modules/generators ErrorHandler.java StaticInterceptor.java src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties LocalStrings_fr.properties LocalStrings_ja.properties Log: Remove dependancy on o.a.t.u.http.LocaleToCharsetMap, since it doesn't exist anymore. Revision ChangesPath 1.32 +43 -9 jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java Index: ErrorHandler.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- ErrorHandler.java 21 Nov 2004 03:59:16 - 1.31 +++ ErrorHandler.java 8 Jan 2005 21:14:21 - 1.32 @@ -30,7 +30,6 @@ import org.apache.tomcat.core.TomcatException; import org.apache.tomcat.util.net.URL; import org.apache.tomcat.util.http.HttpMessages; -import org.apache.tomcat.util.http.LocaleToCharsetMap; import org.apache.tomcat.util.log.Log; import org.apache.tomcat.util.qlog.Logger; import org.apache.tomcat.util.res.StringManager; @@ -45,10 +44,25 @@ private Context rootContext=null; boolean showDebugInfo=true; int defaultRedirectStatus=301; +private String charset = null; public ErrorHandler() { } +/** + * Set the charset to use for error page generation. + */ +public void setUseCharset(String ucs) { + charset = ucs; +} + +/** + * Get the charset to use for error page generation. + */ +public String getUseCharset() { + return charset; +} + public void setShowDebugInfo( boolean b ) { showDebugInfo=b; } @@ -436,12 +450,14 @@ getManager(org.apache.tomcat.resources); int sbNote=0; boolean showDebugInfo=true; +private String useCharset; -NotFoundHandler(BaseInterceptor bi, boolean showDebugInfo) { +NotFoundHandler(ErrorHandler bi, boolean showDebugInfo) { // setOrigin( Handler.ORIGIN_INTERNAL ); name=tomcat.notFoundHandler; setModule(bi); this.showDebugInfo=showDebugInfo; + useCharset = bi.getUseCharset(); } public void doService(Request req, Response res) @@ -449,7 +465,10 @@ { String msg=(String)req.getAttribute(javax.servlet.error.message); - String charset = LocaleToCharsetMap.getCharset(Locale.getDefault()); + String charset = useCharset; + if(charset == null) { + charset = req.getCharEncoding(); + } if (charset == null) { res.setContentType(text/html); } else { @@ -519,12 +538,14 @@ getManager(org.apache.tomcat.resources); int sbNote=0; boolean showDebugInfo=true; +private String useCharset; -ExceptionHandler(BaseInterceptor bi, boolean showDebugInfo) { +ExceptionHandler(ErrorHandler bi, boolean showDebugInfo) { // setOrigin( Handler.ORIGIN_INTERNAL ); name=tomcat.exceptionHandler; setModule( bi ); this.showDebugInfo=showDebugInfo; + useCharset = bi.getUseCharset(); } public void doService(Request req, Response res) @@ -560,7 +581,10 @@ // only include head...body if reset was successful if ( needsHead ) { - String charset = LocaleToCharsetMap.getCharset(Locale.getDefault()); + String charset = useCharset; + if(charset == null) { + charset = req.getCharEncoding(); + } if (charset == null) res.setContentType(text/html); else { @@ -637,12 +661,14 @@ getManager(org.apache.tomcat.resources); int sbNote=0; boolean showDebugInfo=true; +private String useCharset; -StatusHandler(BaseInterceptor bi, boolean showDebugInfo) { +StatusHandler(ErrorHandler bi, boolean showDebugInfo) { //setOrigin( Handler.ORIGIN_INTERNAL ); name=tomcat.statusHandler; setModule( bi ); this.showDebugInfo=showDebugInfo; + useCharset = bi.getUseCharset(); } // We don't want interceptors called for redirect @@ -664,7 +690,10 @@ // don't set a content type if we are answering If-Modified-Since. // Proxy caches might update their cached content-type with this // info (mod_proxy does it). Martin Algesten 15th Oct, 2002. - String charset = LocaleToCharsetMap.getCharset(Locale.getDefault()); + String charset = useCharset; + if(charset == null) { + charset =
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties LocalStrings_fr.properties
billbarker01/11/02 19:50:50 Modified:src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties LocalStrings_fr.properties Log: Add missing JDBCRealm property. This is a straight copy of another property, so I feel ok with committing the es and fr versons as well (despite my limited ability in those languages). Reported by: Rainer Klute [EMAIL PROTECTED] Revision ChangesPath 1.16 +2 -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.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- LocalStrings.properties 2001/06/09 00:24:21 1.15 +++ LocalStrings.properties 2001/11/03 03:50:50 1.16 @@ -1,4 +1,4 @@ -# $Id: LocalStrings.properties,v 1.15 2001/06/09 00:24:21 costin Exp $ +# $Id: LocalStrings.properties,v 1.16 2001/11/03 03:50:50 billbarker Exp $ # # Localized strings for package org.apache.tomcat.core @@ -99,6 +99,7 @@ jdbcRealm.authenticateSuccess=Authentication successful for user {0} jdbcRealm.notStarted=This Realm has not yet been started jdbcRealm.checkConnectionSQLException=There was an SQLException while in checkConnection: {0} +jdbcRealm.getCredentialsSQLException=There was an SQLException while in getCredentials: {0} jdbcRealm.checkPasswordSQLException=There was an SQLException while in checkPassword: {0} jdbcRealm.checkConnectionDBClosed=The database connection is null or was found to be closed. Trying to re-open it. jdbcRealm.checkConnectionDBReOpenFail=The re-open on the database failed. The database could be down. 1.18 +2 -1 jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings_es.properties Index: LocalStrings_es.properties === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings_es.properties,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- LocalStrings_es.properties2001/07/10 23:14:25 1.17 +++ LocalStrings_es.properties2001/11/03 03:50:50 1.18 @@ -1,4 +1,4 @@ -# $Id: LocalStrings_es.properties,v 1.17 2001/07/10 23:14:25 nacho Exp $ +# $Id: LocalStrings_es.properties,v 1.18 2001/11/03 03:50:50 billbarker Exp $ # # Localized strings for package org.apache.tomcat.core @@ -96,6 +96,7 @@ jdbcRealm.authenticateSuccess=Autentificación para el usuario {0} jdbcRealm.notStarted=Este reino no ha sido todavía iniciado jdbcRealm.checkConnectionSQLException=Hubo una SQLException mientras se ejecutaba checkConnection: {0} +jdbcRealm.getCredentialsSQLException=Hubo una SQLException mientras se ejecutaba getCredentials: {0} jdbcRealm.checkPasswordSQLException=Hubo una SQLException mientras se ejecutaba checkPassword: {0} jdbcRealm.checkConnectionDBClosed=La conexión con la base de datos es nula o se encontró cerrada. Intentando reabrirla. jdbcRealm.checkConnectionDBReOpenFail=La reapertura de la base de datos fallo. La Base de datos podría estar parada. 1.4 +2 -1 jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings_fr.properties Index: LocalStrings_fr.properties === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings_fr.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- LocalStrings_fr.properties2001/06/09 00:24:22 1.3 +++ LocalStrings_fr.properties2001/11/03 03:50:50 1.4 @@ -1,4 +1,4 @@ -# $Id: LocalStrings_fr.properties,v 1.3 2001/06/09 00:24:22 costin Exp $ +# $Id: LocalStrings_fr.properties,v 1.4 2001/11/03 03:50:50 billbarker Exp $ # # Localized strings for package org.apache.tomcat.core @@ -99,6 +99,7 @@ jdbcRealm.authenticateSuccess=Authentification réussie pour l''utilisateur {0} jdbcRealm.notStarted=Ce Royaume n''a pas encore été démarré jdbcRealm.checkConnectionSQLException=Il y a eu une Exception SQL pendant la vérification de connexion (checkConnection): {0} +jdbcRealm.getCredentialsSQLException=Il y a eu une Exception SQL pendant la vérification de connexion (getCredentials): {0} jdbcRealm.checkPasswordSQLException=Il y a eu une Exception SQL pendant la vérification de môt de passe (checkPassword): {0} jdbcRealm.checkConnectionDBClosed=La connexion vers la base de donnée est nulle ou a été trouvé en cours de fermeture. Essaie de réouverture. jdbcRealm.checkConnectionDBReOpenFail=La réouverture de base de donnée a échouée. La base de donnée est peut être
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties LocalStrings_fr.properties
costin 01/06/08 17:24:23 Modified:src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties LocalStrings_fr.properties Log: Removed the messages that belong to j-t-c. We should move all the messages in the packages that are using them, many messages are long gone and utils should be independent on the tomcat core. Revision ChangesPath 1.15 +1 -50 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.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- LocalStrings.properties 2001/02/05 00:12:04 1.14 +++ LocalStrings.properties 2001/06/09 00:24:21 1.15 @@ -1,4 +1,4 @@ -# $Id: LocalStrings.properties,v 1.14 2001/02/05 00:12:04 nacho Exp $ +# $Id: LocalStrings.properties,v 1.15 2001/06/09 00:24:21 costin Exp $ # # Localized strings for package org.apache.tomcat.core @@ -88,51 +88,6 @@ serverResponse.outputStream.ise=getWriter() has already been called serverResponse.writer.ise=getOutputStream() has already been called -sc.100=Continue -sc.101=Switching Protocols -sc.200=OK -sc.201=Created -sc.202=Accepted -sc.203=Non-Authoritative Information -sc.204=No Content -sc.205=Reset Content -sc.206=Partial Content -sc.207=Multi-Status -sc.300=Multiple Choices -sc.301=Moved Permanently -sc.302=Moved Temporarily -sc.303=See Other -sc.304=Not Modified -sc.305=Use Proxy -sc.307=Temporary Redirect -sc.400=Bad Request -sc.401=Unauthorized -sc.402=Payment Required -sc.403=Forbidden -sc.404=Not Found -sc.405=Method Not Allowed -sc.406=Not Acceptable -sc.407=Proxy Authentication Required -sc.408=Request Timeout -sc.409=Conflict -sc.410=Gone -sc.411=Length Required -sc.412=Precondition Failed -sc.413=Request Entity Too Large -sc.414=Request-URI Too Long -sc.415=Unsupported Media Type -sc.416=Requested Range Not Satisfiable -sc.417=Expectation Failed -sc.422=Unprocessable Entity -sc.424=Failed Dependency -sc.500=Internal Server Error -sc.501=Not Implemented -sc.502=Bad Gateway -sc.503=Service Unavailable -sc.504=Gateway Timeout -sc.505=HTTP Version Not Supported -sc.507=Insufficient Storage - servletOutputStreamImpl.reset.ise=can't reset buffer after writing to client servletOutputStreamImpl.setbuffer.ise=setting buffer after writing to the writer @@ -165,10 +120,6 @@ # Utils ascii.parseInit.nfe=number formatting error {0} -hexUtil.bad=Bad hexadecimal digit -hexUtil.odd=Odd number of hexadecimal digits -httpDate.pe=invalid date format: {0} -httpDate.iae=array too small: {0} messageBytes.iae=invalid date format: {0} mimeHeaderField.int.nfe=number formatting error mimeHeaderField.date.iae=invalid date format 1.16 +1 -45 jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings_es.properties Index: LocalStrings_es.properties === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings_es.properties,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- LocalStrings_es.properties2001/02/05 00:12:04 1.15 +++ LocalStrings_es.properties2001/06/09 00:24:21 1.16 @@ -1,4 +1,4 @@ -# $Id: LocalStrings_es.properties,v 1.15 2001/02/05 00:12:04 nacho Exp $ +# $Id: LocalStrings_es.properties,v 1.16 2001/06/09 00:24:21 costin Exp $ # # Localized strings for package org.apache.tomcat.core @@ -87,46 +87,6 @@ serverResponse.outputStream.ise=getWriter() ha sido ya llamado serverResponse.writer.ise=getOutputStream() ha sido ya llamado -sc.100=Continuar -sc.101=Cambiando Protocolos -sc.200=OK -sc.201=Creado -sc.202=Aceptado -sc.203=Información No-Autorizativa -sc.204=Sin Contenido -sc.205=Reset Contenido -sc.206=Contenido Parcial -sc.300=Multiples Elecciones -sc.301=Movido permanentemente -sc.302=Movido temporalmente -sc.303=Mirar Otro -sc.304=No Modificado -sc.305=Usar Proxy -sc.307=Redireccion Temporal -sc.400=Petición incorrecta -sc.401=No Autorizado -sc.402=Pago requerido -sc.403=Prohibido -sc.404=No Encontrado -sc.405=Método No Permitido -sc.406=No Aceptable -sc.407=Autentificación Proxy Requerida -sc.408=Request Caducada -sc.409=Conflicto -sc.410=Gone -sc.411=Longitud Requerida -sc.412=Precondición Fallada -sc.413=Entidad de Request Demasiado Grande -sc.414=Request-URI Demasiado Larga -sc.415=Tipo de Medio No Soportado -sc.416=El Rango Pedido No Ser Satisfecho -sc.417=Expectativa Fallada -sc.500=Error Interno del
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties
nacho 01/02/04 16:12:05 Modified:src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties Log: Strings did not relate to identifiers Revision ChangesPath 1.14 +5 -5 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.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- LocalStrings.properties 2000/12/20 15:18:54 1.13 +++ LocalStrings.properties 2001/02/05 00:12:04 1.14 @@ -1,4 +1,4 @@ -# $Id: LocalStrings.properties,v 1.13 2000/12/20 15:18:54 larryi Exp $ +# $Id: LocalStrings.properties,v 1.14 2001/02/05 00:12:04 nacho Exp $ # # Localized strings for package org.apache.tomcat.core @@ -73,10 +73,10 @@ wrapper.load.noclassname=No class name for servlet to be loaded -reqfac.getinstream.ise=Reader already obtained for this request. -reqfac.getreader.ise=InputStream already obtained for this request. -resfac.getoutstream.ise=Writer already obtained for this request. -resfac.getwriter.ise=OutputStream already obtained for this request. +reqfac.getreader.ise=Reader already obtained for this request. +reqfac.getinstream.ise=InputStream already obtained for this request. +resfac.getwriter.ise=Writer already obtained for this request. +resfac.getoutstream.ise=OutputStream already obtained for this request. hsrf.encodeRedirect.iae=urls must be absolute hsrf.redirect.iae=specified url redirect is null 1.15 +5 -7 jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings_es.properties Index: LocalStrings_es.properties === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings_es.properties,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- LocalStrings_es.properties2001/02/04 22:05:41 1.14 +++ LocalStrings_es.properties2001/02/05 00:12:04 1.15 @@ -1,4 +1,4 @@ -# $Id: LocalStrings_es.properties,v 1.14 2001/02/04 22:05:41 nacho Exp $ +# $Id: LocalStrings_es.properties,v 1.15 2001/02/05 00:12:04 nacho Exp $ # # Localized strings for package org.apache.tomcat.core @@ -73,10 +73,10 @@ wrapper.load.noclassname=No hay nombre de clase para cargar el Servlet -reqfac.getinstream.ise=Reader ya obtenido para esta petición. -reqfac.getreader.ise=InputStream ya obtenido para esta petición. -resfac.getoutstream.ise=Writer ya obtenido para esta petición. -resfac.getwriter.ise=OutputStream ya obtenido para esta petición. +reqfac.getreader.ise=Reader ya obtenido para esta petición. +reqfac.getinstream.ise=InputStream ya obtenido para esta petición. +resfac.getoutstream.ise=OutputStream ya obtenido para esta petición. +resfac.getwriter.ise=Writer ya obtenido para esta petición. hsrf.encodeRedirect.iae=urls deben ser absolutas hsrf.redirect.iae=la url de redireccion especificada es nula @@ -86,8 +86,6 @@ serverResponse.outputStream.ise=getWriter() ha sido ya llamado serverResponse.writer.ise=getOutputStream() ha sido ya llamado -serverResponse.outputStream.ise=Writer ya esta siendo usado para esta petición -serverResponse.writer.ise=OutputStream ya esta siendo usado para esta petición sc.100=Continuar sc.101=Cambiando Protocolos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties
larryi 00/12/20 07:18:56 Modified:src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties Log: Added some strings for ErrorHandler Revision ChangesPath 1.13 +7 -3 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.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- LocalStrings.properties 2000/12/05 13:24:35 1.12 +++ LocalStrings.properties 2000/12/20 15:18:54 1.13 @@ -1,4 +1,4 @@ -# $Id: LocalStrings.properties,v 1.12 2000/12/05 13:24:35 larryi Exp $ +# $Id: LocalStrings.properties,v 1.13 2000/12/20 15:18:54 larryi Exp $ # # Localized strings for package org.apache.tomcat.core @@ -10,15 +10,19 @@ defaultservlet.subdirectories=Subdirectories: defaultservlet.files=Files: -#DefaultCMSetter / error handlers -defaulterrorpage.originalrequest=Original request +#ErrorHandler / error handlers +defaulterrorpage.originalrequest=Original request: defaulterrorpage.includedservlet=Included servlet error: defaulterrorpage.location=Location: +defaulterrorpage.errorlocation=Error Location: defaulterrorpage.notfound404=Not Found (404) defaulterrorpage.rootcause=Root cause: defaulterrorpage.documentmoved=Document moved 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 1.12 +6 -2 jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings_es.properties Index: LocalStrings_es.properties === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings_es.properties,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- LocalStrings_es.properties2000/12/05 13:24:35 1.11 +++ LocalStrings_es.properties2000/12/20 15:18:55 1.12 @@ -1,4 +1,4 @@ -# $Id: LocalStrings_es.properties,v 1.11 2000/12/05 13:24:35 larryi Exp $ +# $Id: LocalStrings_es.properties,v 1.12 2000/12/20 15:18:55 larryi Exp $ # # Localized strings for package org.apache.tomcat.core @@ -10,15 +10,19 @@ defaultservlet.subdirectories=Subdirectorios: defaultservlet.files=Archivos: -#DefaultCMSetter / error handlers +#ErrorHandler / error handlers defaulterrorpage.originalrequest=Request original: defaulterrorpage.Includedservlet=Error en el Servlet Incluido: defaulterrorpage.location=Localizacion: +defaulterrorpage.errorlocation=Localizacion del error: defaulterrorpage.notfound404=No se encuentra (404) defaulterrorpage.rootcause=Causa Raiz: defaulterrorpage.documentmoved=Documento trasladado defaulterrorpage.thisdocumenthasmoved=Este Documento ha sido trasladado defaulterrorpage.internalservleterror=Error interno del servlet: +defaulterrorpage.notfoundrequest=No se ha encontrado el request: +defaulterrorpage.service.unavailable=El servicio no esta disponible, intente de nuevo en {0} segundos +defaulterrorpage.service.permanently.unavailable=El servicio es no esta disponible permanentemente #RequestDispatcherImpl.java dispatcher.forwardException=El servlet de reenvio produjo una excepcion
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/resources LocalStrings.properties
craigmcc00/11/09 13:18:10 Modified:src/share/org/apache/tomcat/facade Tag: tomcat_32 RequestDispatcherImpl.java src/share/org/apache/tomcat/resources Tag: tomcat_32 LocalStrings.properties Log: Previous changes implemented "exception rethrowing" in the case of a path based include(). This patch adds the following enhancements: - If an included servlet throws an exception other than IOException or ServletException, wrap it in a new ServletException (as the root cause) and throw that instead. - Add exception throwing support in the following additional cases: * Path based forward() - getServletContext().getRequestDispatcher() * Name based include() - getServletContext().getNamedDispatcher() * Name based forward() - getServletContext().getNamedDispatcher() - When processing a named based include, set the "included" flag on the response so that attempts to modify headers and cookies in the included servlet are (correctly) ignored. Currently passes all the Watchdog servlet tests, and all the Watchdog JSP tests except for some taglib-related ones that are unrelated to this particular issue. Revision ChangesPath No revision No revision 1.8.2.5 +97 -8 jakarta-tomcat/src/share/org/apache/tomcat/facade/Attic/RequestDispatcherImpl.java Index: RequestDispatcherImpl.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/facade/Attic/RequestDispatcherImpl.java,v retrieving revision 1.8.2.4 retrieving revision 1.8.2.5 diff -u -r1.8.2.4 -r1.8.2.5 --- RequestDispatcherImpl.java2000/11/09 13:27:36 1.8.2.4 +++ RequestDispatcherImpl.java2000/11/09 21:18:09 1.8.2.5 @@ -188,7 +188,28 @@ // CM should have set the wrapper - call it ServletWrapper wr=realRequest.getWrapper(); - if( wr!=null ) wr.service(realRequest, realResponse); +Throwable t = null; +if( wr != null ) { +try { +wr.service(realRequest, realResponse); +} catch (Throwable t1) { +t = t1; +} +} + +// Clean up the request and response as needed +; // No action required + +// Rethrow any exception thrown by the forwarded-to servlet +if (t != null) { +if (t instanceof IOException) +throw (IOException) t; +else if (t instanceof ServletException) +throw (ServletException) t; +else +throw new ServletException +(sm.getString("dispatcher.forwardException", t)); +} // close the response - output after this point will be discarded. realResponse.finish(); @@ -348,12 +369,17 @@ realResponse.setIncluded( false ); } +// Rethrow any exception thrown by the included servlet if (t != null) { if (t instanceof IOException) throw (IOException) t; else if (t instanceof ServletException) throw (ServletException) t; +else +throw new ServletException +(sm.getString("dispatcher.includeException", t)); } + } @@ -364,13 +390,48 @@ public void includeNamed(ServletRequest request, ServletResponse response) throws ServletException, IOException { - // Use the original request - as in specification ! // We got here if name!=null, so assert it ServletWrapper wrapper = context.getServletByName( name ); - Request realR=((HttpServletRequestFacade)request).getRealRequest(); - if( wrapper!=null) - wrapper.service( realR, realR.getResponse()); + + // Use the original request - as in specification ! +Request realRequest = ((HttpServletRequestFacade)request). + getRealRequest(); + Response realResponse = realRequest.getResponse(); + +// Set the "included" flag so that things like header setting in the +// included servlet will be correctly ignored + boolean old_included=realResponse.isIncluded(); + if( ! old_included ) { + realResponse.setIncluded( true ); + } + +// Call the included servlet +Throwable t = null; + if( wrapper!=null) { +try { +wrapper.service( realRequest, realRequest.getResponse()); +} catch (Throwable t1) { +t = t1; +} +} + +// Clean up the request and response as needed + if( ! old_included ) { + realResponse.setIncluded( false ); + } + +//
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/resources LocalStrings.properties
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 ChangesPath 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("/bbr"); + // 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]