Ask for a password from a ServletTag(s): Servlet/JSP
About cookies on this site
We use cookies to collect and analyze information on site performance and usage,
to provide social media features and to enhance and customize content and advertisements.
public void askPassword(HttpServletResponse response) {
response.setStatus(response.SC_UNAUTHORIZED);
response.setHeader("WWW-Authenticate",
"BASIC realm=\"protected-area\"");
}
then the browser will popup a dialog for username/password