Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Manipulating the response headers

laxika edited this page Sep 9, 2013 · 1 revision

You can also manipulate the response headers this way:

response.getHeaderData().setHeader("headername", "headervalue");

For redirecting you can use response.redirect("uri"); and for changing the content type use response.setContentType("application/text"); and for the status use response.setStatus(HttpResponseStatus.FORBIDDEN);.

Clone this wiki locally