• Post Reply Bookmark Topic Watch Topic
  • New Topic

In Using response.sendRedirect  RSS feed

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using response.sendRedirect() to forward to a different domain/server .

I set like this :

request.setAttribute("name","NVal");
request.setAttribute("Pass","PVal");

and used response.sendRedirect("to a different server");

Can we access this data which is set on to the request Attribute on to that server Or do i need to use HttpClient for this ??

Any Help would be appreciated


 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No you cannot access your request, session & application variables when you do a response.redirect to another server.

You could pass parameters (get) to the other server in the form of a query string.

e.g. response.sendRedirect("DifferentServer?name=NVal&Pass=PVal);
Of course passing userName and password this could be a big security issue...
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a Lot Sam
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can pass parameters like:
response.sendRedirect("http://foo.bar/baz?name=nval&pass=pval")

This will cause them to be shown in the browser's address bar, though.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!