What differentiates ServletContext and ServletConfig in terms of initialization parameters?
- ServletConfig can be used for application-wide parameters, while ServletContext is specific to a servlet.
- ServletConfig is used for application-wide parameters.
- ServletContext can be used for application-wide parameters, while ServletConfig is specific to a servlet.
- ServletContext is used for servlet-specific parameters.
The ServletContext is intended for parameters that are shared across the entire application, whereas ServletConfig is specific to a particular servlet.
Loading...
Related Quiz
- Which Java method is used to add a cookie to the response object?
- What is a session ID in the context of web applications?
- A servlet needs to load database settings at startup. How should these settings be passed to the servlet?
- What mechanism does WebSocket use to achieve full-duplex communication?
- What is the difference between context and init parameters in servlet configuration?