<%@ page language="java" contentType="text/html; charset=windows-1255"
pageEncoding="windows-1255"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="cssForTopBar.css">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
<title>Success</title>
</head>
<body>
<ul>
<li><a href="forms.jsp">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="contactPage.jsp">Contact</a></li>
<li><a href="aboutPage.jsp">About</a></li>
<li><a href="deleteUser.jsp">Delete Account</a></li>
</ul>
</br>
</br>
<%
session.setMaxInactiveInterval(2);
if(application.getAttribute("counter") == null || (Integer)application.getAttribute("counter") == 0) {
application.setAttribute("counter", 1);
}
if(session.isNew() == true){
synchronized(page){
Integer counter = (Integer) application.getAttribute("counter");
counter += 1;
application.setAttribute("counter", counter);
}
}
%>
<h1>Successfully logged in as <%=session.getAttribute("user")%></h1>
<h2>You are the visitor number <%=application.getAttribute("counter")%></h2>
</body>
</html>
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎