To set the character encoding for the response body, use the __________ method of HttpServletResponse.
- setCharacterEncoding()
- setContentType()
- setEncoding()
- setResponseEncoding()
The setCharacterEncoding() method of HttpServletResponse is used to set the character encoding for the response body.
Loading...
Related Quiz
- When handling a file upload, if an IOException occurs, how should the servlet respond and log the event?
- The _________ attribute specifies the subset of URLs to which a cookie will be sent.
- How can a servlet invalidate a cookie that has been sent to the client?
- The process of retrieving a connection from the pool, using it, and then returning it is known as _________.
- What is the difference in the URL seen by the client when using forward() vs sendRedirect() in servlets?