John Burns wrote:
> >I am sending some parameters in the URL which contain values with spaces and
> >ampersands etc, in Netscape the parameters are not properly being
> >transmitted or some problem like that, I tried to encode the URL using
> >java.net.URLEncoder.urlEncode method, but with the encoded url Netscape says
> >that it cannot find the requested url ...
You only need to encode the stuff after the actual URL used in a GET.
The following bit of code puts a person's name in a talbe cell along with
an HREF to retrieve more detail. (i) will be a string like "John X Doe".
<jsp:scriptlet>
si = (SearchResult) rs.next();
attrs = si.getAttributes();
i = (String) attrs.get("cn").get();
out.println("<td nowrap><a href=\"/servlet/LDAPOne?rdn=" +
URLEncoder.encode(i) + "\">" + i + "</a></td>");
Ray Allis
begin:vcard
n:Allis;Ray
tel;work:+1 206 655 8870
x-mozilla-html:TRUE
org:The Boeing Company
adr:;;2-25.5 E5;Seattle;WA;;
version:2.1
email;internet:[EMAIL PROTECTED]
title:Don' NEED no steenkin' ...
x-mozilla-cpt:;30304
fn:Ray Allis
end:vcard