You need to encode the '&' (and it wouldn't hurt to encode the '?' either)
in your url using the matching character entity.  You have to do this
manually in your HTML:
<A
HREF="mysevlet?name=bob&age=23&url=http://blah.com/runme&#63;a=b&amp;c=7">

Read up about character entity references in your favorite HTML manual

----- Original Message -----
From: Mike Haberman <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 12, 2000 7:11 PM
Subject: How can I get parameters with '&' in it ?


> Hello all,
>
>    I have a servlet that reads in parameters from a get request.  The
>    problem is that one of the parameters is a url.  If that url
>    has an '&' in it, then the parameters are split around it.
>
>    for example:
>
>    <A HREF = "mysevlet?name=bob&age=23&url=http://blah.com/runme?a=b&c=7">
>
>     in myservlet i get
>     name:bob
>     age:23
>     url:http:..runme?
>     a:b
>     c:7
>
>     What's the fix so I only get three parameters?
>
>     thanks for your time!
>
>     [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
>

___________________________________________________________________________
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

Reply via email to