Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I have doubt, response.sendRedtrect

 
ramesh gosala
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have doubt regading...response.sendRedtrect,

That is, it possible to send Session object, one server to another server..using response.sendRedirect.

i would very thankful to give this answer,

Thank you

Ramesh
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not.

The sendRedirect method merely sends a 302 response code to the browser along with a 'Location' response header.

This causes the browser to make a brand new request to the specified URL.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ben,

or what about the two method of HttpServletResponse Interface encodeURL and encodeRedirectURL, They are used to append the session ID to the URL.

encodeRedirectURL Java Doc

can you please enlighten on these method.
Is it possible to pass your session to another server with the help of these methods? if not then... Any suggestion
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those methods only embed the session ID within the URL.

Your HTTPSession is an object that resides within your webapplication.
It can't be passed to other servers.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ben,

to make me clear.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic