The Servlet API was created even before Java EE exists—actually before J2EE existed! It became part of EE in J2EE 1.2 (Servlet 2.2) in 1999.
This is a powerful tool to deal with a request/response context and this recipe will show you an example of how to do it.