-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
fb32623
commit f727536
Showing
11 changed files
with
140 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package controller; | ||
|
||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
import javax.servlet.annotation.WebServlet; | ||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
import service.MyService; | ||
|
||
@WebServlet("/add-task") | ||
public class AddTask extends HttpServlet { | ||
@Override | ||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
MyService service=new MyService(); | ||
service.addTask(req,resp); | ||
} | ||
} |
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,22 @@ | ||
package dto; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.GenerationType; | ||
import javax.persistence.Id; | ||
|
||
import lombok.Data; | ||
|
||
@Entity | ||
@Data | ||
public class Task { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
int id; | ||
String name; | ||
String description; | ||
LocalDateTime createdTime; | ||
boolean status; | ||
} |
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,42 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="ISO-8859-1"> | ||
<title>Add Task</title> | ||
<style> | ||
div { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div> | ||
<h1>Add Task</h1> | ||
<form action="add-task" method="post"> | ||
<fieldset> | ||
<legend>Enter Task here,</legend> | ||
<table> | ||
<tr> | ||
<th>Task Name: </th> | ||
<th><input type="text" name="tname"></th> | ||
</tr> | ||
<tr> | ||
<th>Task Description: </th> | ||
<th><input type="text" name="tdescription"></th> | ||
</tr> | ||
<tr> | ||
<th><button>Add</button></th> | ||
<th><button type="reset">Cancel</button></th> | ||
</tr> | ||
</table> | ||
</fieldset> | ||
</form> | ||
<br> | ||
<br> | ||
<a href="Home.jsp"><button>Back</button></a> | ||
</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 |
---|---|---|
@@ -1,12 +1,40 @@ | ||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" | ||
pageEncoding="ISO-8859-1"%> | ||
pageEncoding="ISO-8859-1"%> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="ISO-8859-1"> | ||
<title>Home</title> | ||
<style> | ||
div { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
.extra { | ||
margin-top: 20px; | ||
margin-left: 305px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1 align="center">This is Home Page</h1> | ||
<h1 align="center">This is Home Page</h1> | ||
<div> | ||
<table border="1"> | ||
<tr> | ||
<th>Task Name</th> | ||
<th>Task Description</th> | ||
<th>Status</th> | ||
<th>Created Time</th> | ||
<th>Delete</th> | ||
<th>Edit</th> | ||
</tr> | ||
</table> | ||
</div> | ||
<a href="AddTask.html"><button class="extra">Add Task</button></a> | ||
<a href="Login.html"><button class="extra">Logout</button></a> | ||
</body> | ||
</html> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
target/m2e-wtp/web-resources/META-INF/maven/org.jsp/todo-app/pom.properties
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