It's got nothing to do with encodeURL/encodeRedirectURL (which are used for handling URL rewriting in the presence of HTTP sessions) or a missing port (which would lead to an error like "can't find host").
The "#" character separates the URL parameters from the fragment (which in this case is "5"). If the "#" is actually part of the parameter, then the URL needs to be encoded by the java.net.URLEncoder.encode method. Afterwards it will look like "http://localhost/host/page.do?abc=%235", which means the "#" has been replaced by its hexadecimal equivalent, and is no longer interpreted as a special URL character. [ March 15, 2007: Message edited by: Ulf Dittmer ]
Joined: Mar 06, 2006
Hi I am agree that i need to encode the URL and but my question is that why i should i need to encode the url . Is # character is the special meaning that browser/webserver can't process