<%@ page import="weblogic.servlet.security.*" %>
<%! private ServletAuthentication sa = new ServletAuthentication("username", "password"); %>
<%
int authenticated = sa.weak(request, response);
if (authenticated == ServletAuthentication.NEEDS_CREDENTIALS ||
    authenticated == ServletAuthentication.FAILED_AUTHENTICATION) {
response.sendRedirect("/" + errorPageName + "?page="  + request.getRequestURI());
}

%>

