Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using cookie or parameters in sendredirect

 
Anks Gupta
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have 2 applications located on diffirent hosts but on same domain of intranet. I want o call application B from A using sendReDirect() and i want to pass parameters to B from A. When i used cookie for that, I am able to redirect, but somehow cookie is getting null. It seems a new resonse is created and old response to which i added my cookie gets flushed.

Is there any other way I can send data without loosing it. Since data is confidential i cannot append it as query string.


Thanks,
Ankur
 
meehul Chopra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anks Gupta wrote:Hello,

I have 2 applications located on diffirent hosts but on same domain of intranet. I want o call application B from A using sendReDirect() and i want to pass parameters to B from A. When i used cookie for that, I am able to redirect, but somehow cookie is getting null. It seems a new resonse is created and old response to which i added my cookie gets flushed.

Is there any other way I can send data without loosing it. Since data is confidential i cannot append it as query string.


Thanks,
Ankur

Hi Ankur,

First of all in response.sendRedirect() ,a new request is generated by the browser.
Check to see if cookies are enabled on your browser.
Alternative for transferring data is to use attributes in either session or application scope.Request scope wont work because of sendRedirect().
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cookies are domain and context dependent. If you redirected to another domain and/or context, then the cookie obviously won't be found.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!