// Path: src/main/java/no/gorman/please/LoginServlet.java
// public static final String LOGGED_IN = "logged_in";


import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import static no.gorman.please.LoginServlet.LOGGED_IN;
package no.gorman.please;



public class LoginFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {}

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
        if (request.getServletContext().getContextPath().contains("login"))return;
// Path: src/main/java/no/gorman/please/LoginServlet.java
// public static final String LOGGED_IN = "logged_in";


// Path: src/main/java/no/gorman/please/LoginFilter.java
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import static no.gorman.please.LoginServlet.LOGGED_IN;

package no.gorman.please;



public class LoginFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {}

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
        if (request.getServletContext().getContextPath().contains("login"))return;
        RegisteredUser currentUser = (RegisteredUser) ((HttpServletRequest)request).getSession().getAttribute(LOGGED_IN);