struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john lee <sh_thorn_b...@yahoo.com>
Subject why response.addCookie not working inside Struts action class
Date Tue, 12 Jun 2007 14:57:26 GMT
inside Struts(1.x) Action class, within method
   
  public ActionForward(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception
   
  i did the following:
   
  ...
  Cookie me;
  me=new Cookie("LoginID","xxx");
  me.setMaxAge(30*24*60*60);
  response.addCookie(me);
  ...
  return mapping.findFroward("success");
   
  but no cookie(LoginID) is generated at local harddisk, what could be happen? inside Struts
action class, can not call Cookie function?
   
  any clue? tks in advance
   
  john
   

       
---------------------------------
Need a vacation? Get great deals to amazing places on Yahoo! Travel. 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message