Which method is used to set a response header with a String value in a servlet?
- addHeader(String name, String value)
- appendHeader(String name, String value)
- setHeader(String name, String value)
- writeHeader(String name, String value)
The setHeader(String name, String value) method is used to set a response header with a String value in a servlet.
Loading...
Related Quiz
- Which HTTP method is idempotent and used primarily for retrieving data?
- If an application needs to clean up resources when the application is shut down, which listener should be used?
- The __________ object provides the filter with information about its initialization parameters.
- The method __________ of the HttpServletRequest is used to read binary data from a form input.
- When integrating with Java-based frameworks like Spring, which technology provides more seamless integration?