O'Reilly logo
  • Oscar Chavoya Aceves thinks this is interesting:

The signature of this method is as follows:

From

Cover of Servlet & JSP: A Tutorial, Second Edition

Note

Which means a cast is required to recover an object from the session.