I'm don't know if this is causing or contributing to the problem, but from your email, you may not be using URLEncode properly. I'm not even sure which class and method you are referring to.
First, there is a class called URLEncoder with a method named encode(
String). This method takes a URL and puts it into a special format. This is used when the URL has extra information tacked onto it; something like the URL for the page I am using to reply to your message. Here's the URL: "http://www.javaranch.com/cgi-bin/ubb/postings.cgi?action=reply&forum=Servlets+and+JSP|APO|s&number=7&topic=001347.cgi&TopicSubject=URL+Problems+-+URGENT." All that stuff that follow the ? is the extra information. Sometimes that extra information may contain characters that can't be displayed properly, or would cause problems in parsing the URL. Space characters are an example of that. In the URL above, all the space characters have been converted to + characters. Other special characters are converted into the 3-character string "%xy", where xy is the two-digit hexadecimal representation of the lower 8-bits of the character.
Then there is a method named encodeURL(String) which is part of the HttpServletResponse class. This takes a URL and adds session id information onto it. This is used when you are doing session tracking and the client does not allow cookies.
From your message, it does not seem that
you should be using either of those methods (although you may have left that information out for simplicity). If you aren't adding extra information to the URL that needs to be encoded, and if you are not doing session tracking, you might try removing the encoding call, and see if that makes a difference in the behavior you are seeing.