response.encodeURL does not encode in the manner that you suggest.  (This is
a rather confusing issue....)  response.encodeURL is responsible for
rewriting the URL in order to add a parameter for identifying a particular
session.

java.net.URLEncoder.encode(String) is responsible for doing as you suggest,
turning spaces into '+' and representing special chars with the %XX format.

-AMT

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Donald E. Vandenbeld
> Sent: Thursday, April 13, 2000 8:03 AM
> To: [EMAIL PROTECTED]
> Subject: Re: response.encodeURL not working
>
>
> I think you have to encode the parameters that you intend to tack
> on.  That
> means substituting +'s for spaces:
>
> <% String link="cuba2.jsp?Name=Khoo+Swee+Chin";%>
> <A HREF="<%=response.encodeURL(link)%>"><%=link%></A>
>
> Donald
>
> ----- Original Message -----
> From: "Khoo Swee Chin" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 12, 2000 9:59 PM
> Subject: response.encodeURL not working
>
>
> >
> >
> > Hi
> > I need help on this one. My response.encodeURL not working. Here are my
> > codes, what did i do wrong this time?
> >
> > ....
> > <BODY BGCOLOR="#FFFFFF">
> > <% String link="cuba2.jsp?Name=Khoo Swee Chin";%>
> > <A HREF="<%=response.encodeURL(link)%>"><%=link%></A>
> > </BODY>
> > ...
> >
> > When i try to display Name parameter i only get Khoo, where are
> the rest??
> > Please help. :)
> >
> >
> ==================================================================
> =========
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to