- public boolean beforeTemplate(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 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");