That is right but I solved it by using the simple
encodeURL.encode(url) and I got got those pluses in
place of the spaces in the url. Cool.

Thanks all

roy
--- Matthias Carlsson
<[EMAIL PROTECTED]> wrote:
> Just because you've imported
> javax.servlet.http.HttpServletResponse doesn't
> mean you can just write encodeRedirectURL(), you
> still need to write
> <instance of
> HttpServletResponse>.encodeRedirectURL().
>
> [ Matthias Carlsson ]
> [ Programmer (Java, XML/XSL, CGI/Perl, HTML/JS) ] [
> Web Designer ]
> [ E-Mail : [EMAIL PROTECTED] ] [
> ICQ: 1430647 ]
>
> > -----Ursprungligt meddelande-----
> > Fran: A mailing list for discussion about Sun
> Microsystem's Java Servlet
> > API Technology.
> [mailto:[EMAIL PROTECTED]]For roy woods
> > Skickat: den 15 april 2001 18:53
> > Till: [EMAIL PROTECTED]
> > Amne: Re: URL encoding problem
> >
> >
> > Hi
> >
> > I know encodeRedirectURL() and encodeURL()are in
> > javax.servlet.http.HttpServletResponse class and I
> > imported that class too. So the compiler should
> not
> > say method encodeRidectURL(java.lang.String) not
> found
> > in class .... I don't know what else could be
> wrong.
> >
> > roy
> >
> >
> > --- Dion Almaer <[EMAIL PROTECTED]> wrote:
> > > encodeRedirectURL() and encodeURL() are on the
> > > javax.servlet.http.HttpServletResponse class.
> > > Why would it be in java.lang.Object? :)
> > >
> > > so, you would want to run
> > > response.encodeRedirectURL("your url");
> > >
> > > Dion
> > >
> > > > -----Original Message-----
> > > > From: A mailing list for discussion about Sun
> > > Microsystem's Java Servlet
> > > > API Technology.
> > > [mailto:[EMAIL PROTECTED]]On Behalf
> Of
> > > roy
> > > > woods
> > > > Sent: Sunday, April 15, 2001 8:29 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: URL encoding problem
> > > >
> > > >
> > > > Hello everybody
> > > >
> > > > I tried to encode an url but the whole thing
> does
> > > not
> > > > compile. The code fragment that causes the
> problem
> > > is:
> > > >
> > > > String url = obj.toString();
> > > > String encodedUrl = encodeRedirectURL(url);
> > > >
> > > > I then got this error:
> > > >
> > > > method encodeRidectURL(java.lang.String) not
> found
> > > in
> > > > class .... I have import java.lang.*; as one
> of my
> > > > import statement. I got the same error when I
> used
> > > > encodeURL(java.lang.String url). What I am
> trying
> > > to
> > > > get fixed is that I have names coming from
> > > database
> > > > and I want them to be link url on the page.
> For
> > > > example, I have a name like roy woods and i
> use
> > > the <a
> > > > href='roy woods'>roy</a> then when you place
> the
> > > mouse
> > > > over the url, you will not see woods at all. I
> > > mean
> > > > the second word disappears. That is why I am
> > > trying to
> > > > use url encoding to fix that. Any ideas?
> > > >
> > > > roy
> > > >
> > > >
> __________________________________________________
> > > > Do You Yahoo!?
> > > > Get email at your own domain with Yahoo! Mail.
> > > > http://personal.mail.yahoo.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
> > > >
> > >
> > >
> >
>
__________________________________________________________________
> > _________
> > > 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
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get email at your own domain with Yahoo! Mail.
> > http://personal.mail.yahoo.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
>
>
___________________________________________________________________________
> 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


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.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

Reply via email to