This is a URL encoding question actually. You need to escape the string
that specifies your parameters. A space equates to a "+" when you URL
encode a string. You parameter will look like this:
<PRE>
<a href="http://webserver/servlets/test?John+Chuck">
</PRE>
Hope that helps,
- Ryan Schuft
Thomas To wrote:
>
> Hi all,
>
> I have a question regarding HttpServletRequest.getParameter().
> In the servlet, i'm calling getParameter() to get the value that is
> passed to the servlet through the following HTML statement:
> <a href="http://webserver/servlets/test?John Chuck">
>
> getParameter() starts reading the string after the ? and stops at the
> space between John and Chuck. If I removed the space, it will read all
> the way to the double quote. Is there any way I can pass any string
> that contains space in between so that getParameter() will read all the
> way until the double quote?
>
> Thanks for your help.
>
> - Thomas -
>
> ___________________________________________________________________________
> 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