• Post Reply Bookmark Topic Watch Topic
  • New Topic

cannot find symbol: setMaxAge

 
John Paterson
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks...

I have the following code and I get the above mentioned error, but I am not sure why as I have already imported the correct class. Here is the code:



Hope someone can advise. Thanks.

regards
John.

 
ujjwal soni
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

Change import from import javax.servlet.http.Cookie.*; to import javax.servlet.http.Cookie;

Thanks,
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is nothing wrong with your code

I disagree. There's an extraneous character that causes this problem.
 
SaurabhRc Jain
Greenhorn
Posts: 12
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

setMaxAge is a method not an attribute. Remove the extra "="
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and import javax.servlet.http.Cookie.*; ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!