Why does HttpServlet implement Serializable?

Technically, I believe the servlet container is allowed to “passivate” the servlet object to disk, in a similar way that EJB session beans can be. So you’re correct to ask the question if your app will fail due to non-serializable fields.

In practise, I’ve never heard of a container doing this, so it’s really just legacy baggage from the bad old days of early J2EE. I wouldn’t worry about it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)