CodesJava

Easy learning with example program codes

How to send an authentication error from a servlet?


The setStatus(statuscode) method of HttpServletResponse to send an authentication error.

//Set error code and reason.
response.sendError(407, "Need authentication!" );

Related topics



Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap