You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Bernd Koecke <bk...@schlund.de> on 2001/07/18 11:44:35 UTC

tc-3.2.2/3.2.3 Little Bug in ContextAdmin.java

Hi,

with tomcat comes the admin-Context. When you use it and select the
'View All Context'-Button you get an IllegalArgumentException.

The error arises because of the use of the class
org.apache.tomcat.util.RequestUtil in the ContextAdmin-class which is
used by the ContextAdmin-JSP. In tomcat 3.2.2 and 3.2.3 the
RequestUtil-class throws the Exception when a '/' is URL-encoded in the
Parameter-String (explained in the release-notes of 3.2.3). This happens
e.g. in lines 76 and 92 of ContextAdmin.java.

A quick solution is to use java.net.URLDecoder.decode() instead of
RequestUtil. But this class was introduced in JDK 1.2, so users of older
JDKs don't have this solution. I'm using 1.3, so the quick solution
works fine for me :)

If someone is interested in the diffs, I could send them, but they are
very simple. If tomcat should run on JDKs prior to 1.2, I could write a
small function in ContextAdmin, which translates the '/' before sending
it to the RequestUtil-class and send the diffs of this.

Bernd
-- 
Dipl.-Inform. Bernd Koecke
UNIX-Entwicklung
Schlund+Partner AG
Fon: +49-721-91374-0
E-Mail: bk@schlund.de