cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck ...@adolos.com>
Subject re: CocoonServlet.java 1.1.4.12
Date Fri, 14 Jul 2000 08:46:44 GMT
Correcting my previous email, the problem is that getServletPath() is  
returning a zero length string, which causes an exception on  
"uri.charAt(0)".

Perhaps:

        String uri=req.getServletPath();
        if (uri!=null) try {
            if (uri.charAt(0)=='/') uri=uri.substring(1);

Should be:

        String uri=req.getServletPath();
        if (uri != null && uri.length() > 0) try {
            if (uri.charAt(0)=='/') {
                if (uri.length() > 1) uri=uri.substring(1);
                else uri="";
            }

However, that takes away the exception but leaves me with other problems!

Stuart.

Mime
View raw message