aspose file tools*
The moose likes Servlets and the fly likes How to send hidden variable in sendRedirect(url) method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

How to send hidden variable in sendRedirect(url) method

rev sam
Greenhorn

Joined: May 26, 2008
Posts: 18
I am sending url using sendRedirect method along with some parameters.

I dont want these parameters to be visible in clienturl.How to hide these parameters? I am new to jave.please help me in getting this.

Say for EX: http://localhost/manager/test.php?test=rev

I dont want the name "test" to be visible.How to hide it and send back to url(using sendRedirect()) method
K Kiran Kumar
Ranch Hand

Joined: Jan 04, 2006
Posts: 109
Hi Sam,
Instead of appending the variables in the URL, better save them in a session and retrieve the same when you need them. Here your privacy is maintained while redirecting. You can also use removeAttribute() method to delete the unwanted attributes.
Regards,
Kiran.
[ May 27, 2008: Message edited by: K Kiran Kumar ]
rev sam
Greenhorn

Joined: May 26, 2008
Posts: 18
we cannot use session here. we have some plan to access this url using webservices
cortin flaneir
Greenhorn

Joined: May 26, 2008
Posts: 13
if you use servlet then set this value in servletcontext and then retrive value whenever you want.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Please continue any discussion in the original post on this topic.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send hidden variable in sendRedirect(url) method