• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Tomcat 5.5.12 HttpSession setAttribute must be serializable

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a question but an observation (others might find helpful when searching)

When you want to store a value in the attributes of a HttpSession Tomcat requires it to be serializable. Seems it is a result of the cluster support Tomcat offers.
I tried to stuff a HashMap into an attribute and was kicked with an "not serializable" error. Packing the HashMap into a wrapper object with "implements serializable" did the trick.

WAS6 didn't have that problem
:-) stw
 
Rancher
Posts: 43009
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think everyone who uses Sessions has run into this at some time or other. What I find interesting is that HashMap does implement Serializable. This sounds like a bug to me.
[ November 22, 2005: Message edited by: Ulf Dittmer ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!