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-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager Constants.java HTMLManagerServlet.java ManagerServlet.java StatusTransformer.java
Date Sun, 07 Sep 2003 18:47:14 GMT
remm        2003/09/07 11:47:14

  Modified:    webapps/manager/WEB-INF/classes/org/apache/catalina/manager
                        Constants.java HTMLManagerServlet.java
                        ManagerServlet.java StatusTransformer.java
  Log:
  - Bug 22956: Use UTF8 encoding.
  - Submitted by Takashi Okamoto
  
  Revision  Changes    Path
  1.8       +5 -4      jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Constants.java	4 Sep 2003 14:39:21 -0000	1.7
  +++ Constants.java	7 Sep 2003 18:47:14 -0000	1.8
  @@ -237,9 +237,10 @@
           "\n" +
           "</body>\n" +
           "</html>";
  +    public static final String CHARSET="utf-8";
   
       public static final String XML_DECLARATION =
  -        "<?xml version=\"1.0\"?>";
  +        "<?xml version=\"1.0\" encoding=\""+CHARSET+"\"?>";
   		
       public static final String XML_STYLE =
           "<?xml-stylesheet type=\"text/xsl\" href=\"xform.xsl\" ?>";
  
  
  
  1.8       +6 -13     jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java
  
  Index: HTMLManagerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HTMLManagerServlet.java	28 Jul 2003 14:57:47 -0000	1.7
  +++ HTMLManagerServlet.java	7 Sep 2003 18:47:14 -0000	1.8
  @@ -74,7 +74,6 @@
   import java.util.Date;
   import java.util.Iterator;
   import java.util.List;
  -import java.util.Locale;
   import java.util.Map;
   import java.util.TreeMap;
   import javax.servlet.ServletException;
  @@ -136,10 +135,7 @@
           String deployWar = request.getParameter("deployWar");
   
           // Prepare our output writer to generate the response message
  -        Locale locale = Locale.getDefault();
  -        String charset = context.getCharsetMapper().getCharset(locale);
  -        response.setLocale(locale);
  -        response.setContentType("text/html; charset=" + charset);
  +        response.setContentType("text/html; charset=" + Constants.CHARSET);
   
           String message = "";
           // Process the requested command
  @@ -187,10 +183,7 @@
           }
   
           // Prepare our output writer to generate the response message
  -        Locale locale = Locale.getDefault();
  -        String charset = context.getCharsetMapper().getCharset(locale);
  -        response.setLocale(locale);
  -        response.setContentType("text/html; charset=" + charset);
  +        response.setContentType("text/html; charset=" + Constants.CHARSET);
   
           String message = "";
   
  
  
  
  1.9       +6 -12     jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java
  
  Index: ManagerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ManagerServlet.java	6 Aug 2003 18:21:32 -0000	1.8
  +++ ManagerServlet.java	7 Sep 2003 18:47:14 -0000	1.9
  @@ -76,7 +76,6 @@
   import java.net.MalformedURLException;
   import java.util.Enumeration;
   import java.util.Iterator;
  -import java.util.Locale;
   import java.util.jar.JarEntry;
   import java.util.jar.JarFile;
   import javax.naming.Binding;
  @@ -357,10 +356,7 @@
           }
   
           // Prepare our output writer to generate the response message
  -        Locale locale = Locale.getDefault();
  -        String charset = context.getCharsetMapper().getCharset(locale);
  -        response.setLocale(locale);
  -        response.setContentType("text/plain; charset=" + charset);
  +        response.setContentType("text/plain; charset=" + Constants.CHARSET);
           PrintWriter writer = response.getWriter();
   
           // Process the requested command (note - "/deploy" is not listed here)
  @@ -439,9 +435,7 @@
           }
   
           // Prepare our output writer to generate the response message
  -        response.setContentType("text/plain");
  -        Locale locale = Locale.getDefault();
  -        response.setLocale(locale);
  +        response.setContentType("text/plain;charset="+Constants.CHARSET);
           PrintWriter writer = response.getWriter();
   
           // Process the requested command
  
  
  
  1.3       +6 -6      jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusTransformer.java
  
  Index: StatusTransformer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusTransformer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StatusTransformer.java	4 Sep 2003 17:59:39 -0000	1.2
  +++ StatusTransformer.java	7 Sep 2003 18:47:14 -0000	1.3
  @@ -96,9 +96,9 @@
       public static void setContentType(HttpServletResponse response, 
                                         int mode) {
           if (mode == 0){
  -            response.setContentType("text/html");
  +            response.setContentType("text/html;charset="+Constants.CHARSET);
           } else if (mode == 1){
  -            response.setContentType("text/xml");
  +            response.setContentType("text/xml;charset="+Constants.CHARSET);
           }
       }
   
  
  
  

Mime
View raw message