>I am sending some parameters in the URL which contain values with spaces and
>ampersands etc, in Netscape the parameters are not properly being
>transmitted or some problem like that, I tried to encode the URL using
>java.net.URLEncoder.urlEncode method, but with the encoded url Netscape says
>that it cannot find the requested url ...
URLEncoder.encode encodes the entire document. I think you just want to
encode your parameters( Netscape Navigator does choke on spaces in URL
parameters). Just use a StringBuffer object to replace all occurrences of a
space in your parameters with the ASCII hex representation, "%20". When you
get it back, it will be translated back to spaces for you. Make sure that you
use name/value pairs in the URL. They should look like this on the way out:
"http://host:8080/servlet/YourServlet?param1=first%20Param,param2=second%20par
am".
The same technique will apply to ampersands.
John Burns
IBS, Inc.
___________________________________________________________________________
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