Advertisement
Yuvalxp8

Login Success (Using MySQL)

Apr 4th, 2017
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 1.36 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=windows-1255"
  2.     pageEncoding="windows-1255"%>
  3.     <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  6. <html>
  7. <head>
  8. <link rel="stylesheet" type="text/css" href="cssForTopBar.css">
  9.  
  10. <meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
  11. <title>Success</title>
  12. </head>
  13. <body>
  14.         <ul>
  15.                     <li><a href="forms.jsp">Home</a></li>
  16.                     <li><a href="#news">News</a></li>
  17.                     <li><a href="contactPage.jsp">Contact</a></li>
  18.                     <li><a href="aboutPage.jsp">About</a></li>
  19.                     <li><a href="deleteUser.jsp">Delete Account</a></li>
  20.         </ul>
  21.     </br>
  22.     </br>
  23.        
  24. <%
  25. session.setMaxInactiveInterval(2);
  26. if(application.getAttribute("counter") == null || (Integer)application.getAttribute("counter") == 0) {
  27.     application.setAttribute("counter", 1);
  28. }
  29. if(session.isNew() == true){
  30.     synchronized(page){
  31.     Integer counter = (Integer) application.getAttribute("counter");
  32.     counter += 1;
  33.     application.setAttribute("counter", counter);
  34. }
  35. }
  36. %>
  37. <h1>Successfully logged in as <%=session.getAttribute("user")%></h1>
  38. <h2>You are the visitor number <%=application.getAttribute("counter")%></h2>
  39.  
  40.  
  41. </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement