jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "david.off@voila.fr" <david....@voila.fr>
Subject JDK 1.2 version
Date Wed, 07 Aug 2002 09:43:07 GMT

Hi Vincent (or someone with access to the code base),

Can you update the 1.2 version of Cactus so we can use it with JDK 1.2, unfortunately there
are some of us who are still stuck on servers like Weblogic 5.1 or 6.0 which are not certified
for JDK1.3.  There is a dependency on the java.net.URL jdk 1.3 methods getPath() and getQuery()

AFAIKS you will need to create a new version of HttpClientConnectionHelper.java in framework/src/java/j2ee12/org/apache/cactus/client

and replace url.getPath() and url.getQuery() calls which are not available in java 1.2,

The code should be something like (tested on weblogic 5.1 with jdk1.2.2) :-

    String file = url.getFile();
    String path = null;
    String query = null;
    if (file != null)  {
        int q = file.lastIndexOf('?');
        if (q != -1)  {
            path = file.substring(0, q);
            query = file.substring(q+1);
        } else {
             path = file;
             query = "";
        }
    }
    this.method.setPath(path);
    this.method.setQueryString(query);


That seems to do the trick, I guess that is the advantage of open source, you can fix it yourself!

thanks,

David


------------------------------------------

Faites un voeu et puis Voila ! www.voila.fr 


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message