Hey!
I would use the URLEncoder class. Just remember not to encode the
getMethod()'s
delimiters, i.e., ? and =.
But better than that, why are you sending SQL string? Re-look at your design.
Why can't you just send bookhouse and 901?
Sans adieu,
Danny Rubis
"S.Ramaswamy" wrote:
> 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