ActionContext.getContext().getSession().put("login", "1");
<%
String flag=(String)session.getAttribute("login");
if(flag==null)
response.sendRedirect("login.jsp");
%>
ActionContext.getContext().getSession().put("login", "1");
<%
String flag=(String)session.getAttribute("login");
if(flag==null)
response.sendRedirect("login.jsp");
%>