Java help - servlets

R

Rose Girl

Hi

I am using the response.sendRedirect(url) method. url is path to
another servlet. Example:

response.sendRedirect(response.encodeRedirectURL
("/EcBugManager/servlet/bugmanager.bugmanager.gui.BugsheetPage?
type="+bugsheetType+"&page="+page);

I am using the response.encodeRedirectURL to encode the url as i dont
want the parameters to be seen in the explorer - address bar.

?? But nothing happens, it just returns the same string with all the
paramteers without being encoded.

Am i using the correct way to encode the url, or is there another way
to do it.

Please, help me on this
Thanks for your time

Rose.
 
E

Enrique Madrid

Rose Girl said:
Hi

I am using the response.sendRedirect(url) method. url is path to
another servlet. Example:

response.sendRedirect(response.encodeRedirectURL
("/EcBugManager/servlet/bugmanager.bugmanager.gui.BugsheetPage?
type="+bugsheetType+"&page="+page);

I am using the response.encodeRedirectURL to encode the url as i dont
want the parameters to be seen in the explorer - address bar.

?? But nothing happens, it just returns the same string with all the
paramteers without being encoded.

Am i using the correct way to encode the url, or is there another way
to do it.

Please, help me on this
Thanks for your time

Rose.

Rose,

URL encoding is used to translate caracters in the querystring that are not
allowed (spaces and ampersand and a bunch of others).
If I remember correctly the space caracter is translated to %20.

If your concern is privacy, I'd recommend using a Session object to store
your information, and pass the Session ID on the querystring.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top