Which Java method is used to add a cookie to the response object?
- addCookie()
- createCookie()
- insertCookie()
- setCookie()
The addCookie() method is used in Java to add a cookie to the response object and send it to the client.
Loading...
Related Quiz
- A filter can alter the header information of a request or response by modifying the __________.
- In JDBC, how can you ensure that all resources are freed, even if an SQL exception occurs?
- A servlet receives form data with both text and file inputs. Identify the correct approach to parse this data.
- Which Java statement is used for handling SQL exceptions?
- How do you specify the URL patterns to which a filter should apply?