xternal-link">String</a>&nbsp;type)</span></div>
<div class="block">Sets the content type of the response being sent to the client, if the response has not been committed yet. The given
 content type may include a character encoding specification, for example, <code>text/html;charset=UTF-8</code>. The
 response's character encoding is only set from the given content type if this method is called before
 <a href="#getWriter()"><code>getWriter()</code></a> is called.
 <p>
 This method may be called repeatedly