import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class logimine extends HttpServlet{ public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{ HttpSession session = request.getSession(true); Boolean tmpLog=(Boolean)session.getAttribute("logitud"); if(tmpLog!=null && tmpLog.booleanValue()){ session.setAttribute("logitud", new Boolean(false)); }else{ session.setAttribute("logitud", new Boolean(true)); } response.sendRedirect("uudised"); } }