tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Koecke ...@schlund.de>
Subject [PATCH Suggestion] tc-3.2.3 Little bug in ContextAdmin.java
Date Wed, 18 Jul 2001 13:45:01 GMT
Hi,

I got a request for the diff of ContextAdmin.java. 
Subject of my original posting was: tc-3.2.2/3.2.3 Little Bug in ContextAdmin.java
Its not to long, so I send it to the list. The orig-class is the one shipped with tomcat-3.2.3.

But again, it solves the problem only for Java2-Systems.

I hope it's useful

Bernd

--- ContextAdmin.java.orig      Wed Jul 18 15:25:25 2001
+++ ContextAdmin.java   Wed Jul 18 15:25:53 2001
@@ -2,6 +2,7 @@
 import java.util.Enumeration;
 import java.io.File;
 import java.net.URL;
+import java.net.URLDecoder;
 import javax.servlet.http.*;
 
 import org.apache.tomcat.core.Request;
@@ -73,7 +74,8 @@
        v.addElement("FULL DOC BASE: " + context.getDocumentBase().toString());
        v.addElement("PATH: " + context.getPath());
        if (context.getWorkDir() != null)
-          v.addElement("WORK DIR: " + RequestUtil.URLDecode(context.getWorkDir().getName()));
+          v.addElement("WORK DIR: " + URLDecoder.decode(context.getWorkDir().getName()));
+          //v.addElement("WORK DIR: " + RequestUtil.URLDecode(context.getWorkDir().getName()));
 
        v.addElement("DESCRIPTION: " + context.getDescription());
        v.addElement("SESSION TIMEOUT: " + new Integer(context.getSessionTimeOut()).toString());
@@ -89,7 +91,8 @@
        while (enum.hasMoreElements()) {
            key = (String)enum.nextElement();
            v.addElement("ATTRIBUTE NAME: " + key);
-           v.addElement("ATTRIBUTE: " + RequestUtil.URLDecode(context.getAttribute(key).toString()));
+           v.addElement("ATTRIBUTE: " + URLDecoder.decode(context.getAttribute(key).toString()));
+           //v.addElement("ATTRIBUTE: " + RequestUtil.URLDecode(context.getAttribute(key).toString()));
        }
 
        v.addElement("SERVER INFO: " + context.getEngineHeader());

Mime
View raw message