- public void doGet(HttpServletRequest req, HttpServletResponse resp)
- throws IOException {
- HttpSession hs = req.getSession();
- if (hs.getAttribute("loggedin") == null) {
- X509Certificate[] cert = (X509Certificate[]) req
- .getAttribute("javax.servlet.request.X509Certificate");
+ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+ resp.getWriter().println(
+ "<form method='POST' action='/login'>" + "<input type='text' name='username'>"
+ + "<input type='password' name='password'> <input type='submit' value='login'></form>");
+ }
+
+ @Override
+ public boolean beforeTemplate(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+ String redir = (String) req.getSession().getAttribute(LOGIN_RETURNPATH);
+ if (req.getSession().getAttribute("loggedin") == null) {
+ X509Certificate[] cert = (X509Certificate[]) req.getAttribute("javax.servlet.request.X509Certificate");