• Post Reply Bookmark Topic Watch Topic
  • New Topic

want add cookies to make sso  RSS feed

 
david xining
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,all:
I want to use response.addCookies() method to add Cookies which I get from a backend system.
and after I execute response.sendRedirect("url of backend system") method ,I can direct go to the backend system without log in.But it seems don't work.
I get two cookies :
one is :TempGuid=F2FA1E7C%2DC452%2D4880%2D81ED%2D3D6790D9A922; expires=Wed, 24-Mar-2004 10:38:40 GMT
other is :ASPSESSIONIDCATQRDCS=JCKFDHDCJHOLNENLCPLPFKPJ
I first create new Cookies like this:
Cookies newc = new Cookies(TempGuid,F2FA1E7C%2DC452%2D4880%2D81ED%2D3D6790D9A922);
Cookies newc2 = new Cookies(ASPSESSIONIDCATQRDCS,JCKFDHDCJHOLNENLCPLPFKPJ);
then I add Cookies to the response:
response.addCookies(newc);
response.addCookies(newc2);
last :
response.sendRedirect("url of backend system");
any one should give me any advice ? thanks in advance !
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You already asked that question in the servlet forum - which is the appropriate place. Duplicate posts are frowned on
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!