-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
6,501 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,8 @@ | |
*.rar | ||
*.tar.gz | ||
*.docx | ||
*.doc | ||
*.doc | ||
*.ppt | ||
*.pptx | ||
*.xls | ||
*.xlsx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Welcome aboard!</title> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
</head> | ||
|
||
<body class="flex flex-col justify-center items-center h-screen"> | ||
<% | ||
int counter=0; | ||
Cookie[] cookies=request.getCookies(); | ||
if (cookies !=null) { | ||
for (Cookie cookie : cookies) { | ||
if (cookie.getName().equals("visitCount")) { | ||
counter=Integer.parseInt(cookie.getValue()); | ||
break; | ||
} | ||
} | ||
} | ||
counter++; | ||
Cookie cookie=new Cookie("visitCount", String.valueOf(counter)); | ||
response.addCookie(cookie); | ||
%> | ||
<h1 class="text-center font-bold text-5xl pt-5"> | ||
<%=counter==1?"⚓ Welcome aboard!":"⚓ Welcome back!" %> | ||
</h1> | ||
<div class="flex-grow flex justify-center items-center"> | ||
<div class="text-center"> | ||
<div class="text-[20rem]">⛵</div> | ||
<p class="text-lg pt-5"> | ||
You have visited this website <%= counter+(counter==1?" time":" times")+"."%> | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Log in</title> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
</head> | ||
|
||
<body class="flex justify-center items-center h-screen"> | ||
<div class="w-full max-w-lg p-6 bg-white rounded-lg shadow-md"> | ||
<h2 class="text-2xl font-bold mb-4 text-black text-center">Log in</h2> | ||
<form id="loginForm" action="" method="post" class="mt-4"> | ||
<div class="mb-4"> | ||
<label for="username" class="block font-bold">Username: </label> | ||
<input type="text" id="username" name="username" required placeholder="username: admin" value="<%= request.getAttribute("username") %>" | ||
class="w-full border border-gray-300 rounded-md py-2 px-3 focus:outline-none focus:border-green-500"> | ||
</div> | ||
<div class="mb-4"> | ||
<label for="password" class="block font-bold">Password: </label> | ||
<input type="password" id="password" name="password" required placeholder="password: admin" | ||
value="<%= request.getAttribute("password") %>" | ||
class="w-full border border-gray-300 rounded-md py-2 px-3 focus:outline-none focus:border-green-500"> | ||
</div> | ||
<div> | ||
<input type="checkbox" id="remember" name="remember" class="mr-2"> | ||
<label for="remember" class="text-sm">Remember me</label> | ||
</div> | ||
<div class="w-full flex justify-center"> | ||
<button type="submit" | ||
class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-md transition-colors duration-300"> | ||
Log in | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<%@ page language="java" contentType="text/html; charset=UTF-8" | ||
pageEncoding="UTF-8"%> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Hello Page</title> | ||
</head> | ||
<body> | ||
|
||
<% | ||
String name = request.getParameter("username"); | ||
if (name != null && !name.isEmpty()) { | ||
%> | ||
<h1>Hello, <%= name %></h1> | ||
<% | ||
} else { | ||
%> | ||
<h1>Hello, Stranger</h1> | ||
<% | ||
} | ||
%> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.