Hi,
Use
String newstring=URLEncoder(theStringotobeEncoded); to get a url friendly
String
do this for all the name=value pairs to construct a new URL. URL is modified
in IE 5.0 and not in Netscape.
besides you may want to keep you query string simple( i.e. just name - value
pairs), and construct a proper sql query only on the servlet.
Gautam
----- Original Message -----
From: S.Ramaswamy <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 28, 1999 11:01 PM
Subject: URL Encoding by Browser of %
> We have been having this problem which has been making 1999 end
> misearable. I appreciate if someone can help out on this one.
>
> We have URL link in our HTML page generated by our servlets that looks
> somewhat like this
>
> servlet/server?table=bookhouse/customer&where=+cust_id+like+'%901%'
>
> servlet/server == the servlet named server
> table parameter 1 name of the database/table
> where where condition that says cust_id like '%901%'
> to be used by the SQL
>
> a) we have replaced all spaces with '+' as required
> b) we have left '%901%' hoping that this will be converted as
> %27%25901%25%27 by the browser. But unfortunately the
> browser is not doing and it sends it as
> %901% only. However the servlet container thinks that it is encoded and
> converts '%901%' to '1%', i.e %90 is unencoded by
> HttpUtils.parseQueryString(). Now if I remember correctly, this used to
> happen earlier. This has
> recently started. My question is does the servlet/web server send
> something to the browser to say that it must encode url
>
> Grateful for any help :-)
>
> ==--==--==--==--==--==--==--==--==--==--==--==--==--==
> S.Ramaswamy
> Matrix Infotech Syndicate
> D-7, Poorti, Vikaspuri, New Delhi, 110018, India
> PHONE: +91-11-5610050, FAX: +91-11-5535103
> WEB http://MatrixInfotech.HyperMart.Net
> ==--==--==--==--==--==--==--==--==--==--==--==--==--==
>
>
___________________________________________________________________________
> 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
>
___________________________________________________________________________
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