On Tue, 6 Jun 2000, Prasad Moganna Gowda wrote:

> Hi All,
>
> Does anyone have or know a website which contains a list of
> characters which will be replaced by the encodeUrl method, like
> space is replaced with %20.
>
> I have a url whose query string has a name value pair like the one below.
>
> hidQCode=BOC&hidUserCheckBoxValues=abc+123|doc1|wpid1|04/06/1999+02:20#zxc+4
> 56|doc2|wpid2|02/12/1999+12:24
>
> when I try to get the value fo hidUserCheckBoxValues, I get only one
> half of the string upto the "#" i.e.  the string
> "abc+123|doc1|wpid1|04/06/1999+02:20", the remaining string gets
> truncated.
>
> Any help/hint is appreciated.

First of all, sounds like you might be mixing two things up.
javax.servlet.http.HttpServletResponse.encodeURL() is part of the JSDK
API, and is used when sessions are maintained by URL rewriting (as
opposed to cookies).  java.net.URLEncoder.encode() is part of the JDK
API, and is used to encode URLs (or strings therein) so that naughty
characters are not there.  So it looks like you are really asking
about that latter one.

And my answer is, use the source, Luke.  In many/most/all? versions of
the JDK, the source is included, and you can see exactly what the
method is doing.

In any case, it looks like (part of) the problem here is that you have
a "#" in your URL, and those are interpreted as indicating named
anchors within the URL (that might not quite be the exact correct
terminology, but I think most know what I mean).  So, in this case,
"#" is one of those naughty characters that you need to do something
about.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to