On Wed, 20 Sep 2000, Srini Sathya. wrote:
> IMHO!! when you pass a query which contains spaces it has to be
> changed to "+", special characters are not recognized as part of
> submission.
>
> I am attaching a code snippet which checks if the query string
> contains " " and if yes then it will replace with "+". Pass your
> query as a parameter to the method replaceStrings().
[ ... ]
Why bother reinventing the wheel? Try java.net.URLEncoder.encode().
Note that only the query string should be thus encoded (and perhaps
only the values, not the names).
> -----Original Message-----
> From: Marcos Lloret [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 20, 2000 5:43 PM
> To: [EMAIL PROTECTED]
> Subject: problem calling to a servlet
>
>
> hi list,
>
> i have a string like this = 'Man clothes'
>
> when i call a servlet i do it like that:
>
> ..../servlets/myservlet?str=Man clothes&......
>
> but it does not work.. because it only gets up to
>
> ..../servlets/myservlet?str=Man
>
> but i need all the string because i have to look for this string into a
> database.
>
>
> any suggestions will be pleased,
>
> marcos
> [EMAIL PROTECTED]
>
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