You can also replace space with %20.

Sudarsan

RAVIKUMAR CHENGALVALA wrote:

> Hi Tom,
> I have faced the same problem and could resolve it the following way
>
> Use the following method
> java.net.URLEncoder.encode(String str);
>
> Place the string in which you are facing the problem as an argument.
> Hope this will solve the problem.
> Ravi
>
> --
> RAVIKUMAR CHENGALVALA
> [EMAIL PROTECTED] - email
> (858) 860-6400 x7011 - voicemail/fax
>
> ---- "blueads.com" <[EMAIL PROTECTED]> wrote:
> > - I am running into the same problem as another poster had with spaces
> > in a
> > URL. I have tried replacing the space with a '+' sign using the code
> > below.
> > This worked fine with Internet Explorer but Not with Netscape.
> >
> > // String phrase needs '+' signs between spaces for http links.
> >
> > int length = phrase.length();
> > String temp = phrase;
> > char linkPhrase[] = temp.toCharArray();
> >
> > for (int i = 0; i < length; i++) {
> >         if(linkPhrase[i] == ' '){
> >                 linkPhrase[i] = '+';
> >         }
> > }
> >
> > - Someone suggested that using %20 works. How would I implement it
> > based on
> > the sample code above?
> >
> > Thanks,
> >
> > Tom K.
> >
> > ___________________________________________________________________________
> > 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
> >
>
> __________________________________________________
> FREE voicemail, email, and fax...all in one place.
> Sign Up Now! http://www.onebox.com
>
> ___________________________________________________________________________
> 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

--
We can't be rich while our neighbors are poor...

S. Parida

___________________________________________________________________________
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