You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2002/06/28 14:19:13 UTC
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core ApplicationHttpResponse.java
remm 2002/06/28 05:19:13
Modified: catalina/src/share/org/apache/catalina/core
ApplicationHttpResponse.java
Log:
- Disallow setLocale from an included servlet.
- Patch submitted by Arvind Srinivasan <arvind.srinivasan at sun.com>
Revision Changes Path
1.8 +18 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpResponse.java
Index: ApplicationHttpResponse.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpResponse.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ApplicationHttpResponse.java 23 May 2002 07:13:45 -0000 1.7
+++ ApplicationHttpResponse.java 28 Jun 2002 12:19:13 -0000 1.8
@@ -66,6 +66,7 @@
import java.io.IOException;
+import java.util.Locale;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
@@ -187,6 +188,19 @@
if (!included)
getResponse().setContentType(type);
+
+ }
+
+
+ /**
+ * Disallow <code>setLocale()</code> calls on an included response.
+ *
+ * @param loc The new locale
+ */
+ public void setLocale(Locale loc) {
+
+ if (!included)
+ getResponse().setLocale(loc);
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>