tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Wong" <steve_w...@macroview.com>
Subject Servlet for authentication of Apache2.0.39
Date Wed, 26 Jun 2002 06:13:40 GMT
 
                This doPost works fine in Apache2.0.36 to pop up an authentication window
in the browser.
 
        public void doPost(HttpServletRequest req, HttpServletResponse response)
 throws ServletException, IOException {
                PrintWriter out = response.getWriter();
                HttpSession session = req.getSession(true);
                response.setStatus(response.SC_UNAUTHORIZED,"You must login!");
                response.setHeader("WWW-Authenticate", "BASIC realm=\"SSO User A
ccount\"");
                response.setContentType("text/html");
                out.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Trans
itional//EN\">");
                out.println("<html><body><basefont face=Arial>");
                out.println("<blockquote><font size=+2><b>Permission Denied</b><
/font><hr>");
                out.println("Only SSO Users are allow to use this site<br>");
                out.println("If you have any problem or query, please contact th
e administrator<br>");
                out.println("</body></html>");
        }
 
                However, after migrate from 2.0.36 to 2.0.39.  The above code segment doesn’t
work.
 
                Does anyone know why?
 
Thx. and Regards.
Steve.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message