What is the purpose of the ServletContext object in Java Servlets?
1
To access session data specific to a request.
2
To share data across all servlets in a web application.
3
To send data back to the client in the response.
4
To handle HTTP requests and responses.