diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/DBUtilR.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/DBUtilR.class
new file mode 100644
index 00000000..07670072
Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/DBUtilR.class differ
diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/againvote.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/againvote.class
new file mode 100644
index 00000000..b3528019
Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/againvote.class differ
diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/loginpage.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/loginpage.class
new file mode 100644
index 00000000..b46c3132
Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/loginpage.class differ
diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/registration.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/registration.class
new file mode 100644
index 00000000..a64e8621
Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/registration.class differ
diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/thankyou.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/thankyou.class
new file mode 100644
index 00000000..e2d3b57e
Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/thankyou.class differ
diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/vote.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/vote.class
new file mode 100644
index 00000000..a484556a
Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/vote.class differ
diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/DBUtilR.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/DBUtilR.java
new file mode 100644
index 00000000..3e1e94ba
--- /dev/null
+++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/DBUtilR.java
@@ -0,0 +1,30 @@
+package vote.com.servlet;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+public class DBUtilR {
+ static Connection conn = null;
+ static
+ {
+ try {
+ Class.forName("com.mysql.jdbc.Driver");
+
+ conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/votingdb", "Vaishnavi", "Nelavetla@537");
+
+ if(!conn.isClosed()) {
+ System.out.println("Connection established");
+ }
+
+ } catch (ClassNotFoundException | SQLException e) {
+ System.out.println("Error in DBUtilFile");
+ e.printStackTrace();
+ }
+ }
+
+ public static Connection getDBConnection() {
+ // TODO Auto-generated method stub
+ return conn;
+ }
+}
\ No newline at end of file
diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/againvote.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/againvote.java
new file mode 100644
index 00000000..e5cf1b2f
--- /dev/null
+++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/againvote.java
@@ -0,0 +1,18 @@
+package vote.com.servlet;
+
+import java.io.IOException;
+
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+public class againvote extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ doGet(request, response);
+ }
+
+}
diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/loginpage.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/loginpage.java
new file mode 100644
index 00000000..aeb579ad
--- /dev/null
+++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/loginpage.java
@@ -0,0 +1,71 @@
+package vote.com.servlet;
+
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+public class loginpage extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ final static Connection con=DBUtilR.getDBConnection();
+ static PreparedStatement ps = null;
+
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ PrintWriter out = response.getWriter();
+ String card=request.getParameter("cardno");
+ Integer pin=Integer.parseInt(request.getParameter("pin"));
+
+ try {
+ if(check(card,pin))
+ {
+ out.print("Successful Login...You Can Vote Now");
+ RequestDispatcher rd=request.getRequestDispatcher("vote.html");
+ rd.include(request,response);
+ }
+ else {
+ out.print("Sorry username or password error , Make new account");
+ RequestDispatcher rd=request.getRequestDispatcher("registration.html");
+ rd.include(request,response);
+ }
+ }
+ catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+
+ }
+ static boolean check(String card,Integer pin) throws SQLException
+ {
+ boolean r=false;
+ ps=con.prepareStatement("Select * from register where cardno=? and pin=?");
+ ps.setString(1,card);
+ ps.setInt(2,pin);
+ ResultSet rs=ps.executeQuery();
+ r=rs.next();
+
+ return r;
+ }
+
+ static boolean checkvote(String card) throws SQLException
+ {
+ boolean r=false;
+ ps=con.prepareStatement("Select * from vote where cardno=?");
+ ps.setString(1,card);
+
+ ResultSet rs=ps.executeQuery();
+ r=rs.next();
+
+ return r;
+ }
+
+}
diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/registration.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/registration.java
new file mode 100644
index 00000000..43a43dfc
--- /dev/null
+++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/registration.java
@@ -0,0 +1,75 @@
+package vote.com.servlet;
+
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+
+public class registration extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ response.setContentType("text/html");
+ PrintWriter out = response.getWriter();
+
+
+ String f=request.getParameter("fname");
+
+ String c=request.getParameter("cardno");
+ String cn=request.getParameter("cono");
+ String ad=request.getParameter("add");
+ String dob=request.getParameter("dob");
+ String email=request.getParameter("email");
+ String pin=request.getParameter("pin");
+ try
+ {
+
+ Class.forName("com.mysql.jdbc.Driver");
+ Connection con=(Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/votingdb","Vaishnavi","Nelavetla@537");
+ PreparedStatement ps=con.prepareStatement("insert into register values(?,?,?,?,?,?,?)");
+ ps.setString(1,f);
+
+ ps.setString(2,c);
+ ps.setString(3,cn);
+ ps.setString(4,ad);
+ ps.setString(5,dob);
+ ps.setString(6,email);
+ ps.setString(7,pin);
+ int i=ps.executeUpdate();
+ if(i>0)
+ {
+ out.print("Successfully your account has been created...PLEASE LOGIN");
+ RequestDispatcher rd=request.getRequestDispatcher("loginpage.html");
+ rd.include(request,response);
+ }
+ else
+ {
+ out.print("Failed account creation try again");
+ RequestDispatcher rd=request.getRequestDispatcher("registration.html");
+ rd.include(request,response);
+ }
+
+ }
+ catch (Exception e2) {
+ out.print("Invalid , Failed account creation try again "+e2);
+ RequestDispatcher rd=request.getRequestDispatcher("registration.html");
+ rd.include(request,response);
+ }
+
+ out.close();
+
+}
+ protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ doPost(request, response);
+ }
+
+}
diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/thankyou.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/thankyou.java
new file mode 100644
index 00000000..ab05b987
--- /dev/null
+++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/thankyou.java
@@ -0,0 +1,17 @@
+package vote.com.servlet;
+
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class thankyou extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+
+ }
+
+}
diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/vote.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/vote.java
new file mode 100644
index 00000000..4134f5c3
--- /dev/null
+++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/vote.java
@@ -0,0 +1,97 @@
+package vote.com.servlet;
+
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.SQLIntegrityConstraintViolationException;
+
+public class vote extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ final static Connection con=DBUtilR.getDBConnection();
+ static PreparedStatement ps = null;
+
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ response.setContentType("text/html");
+ PrintWriter out = response.getWriter();
+
+
+ String f=request.getParameter("cardno");
+ String l=request.getParameter("party");
+ try
+ {
+
+ Class.forName("com.mysql.jdbc.Driver");
+ Connection con=(Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/votingdb","Vaishnavi","Nelavetla@537");
+
+ if(checkLogin(f))
+ {
+
+ ps=con.prepareStatement("insert into vote values(?,?)");
+ ps.setString(1,f);
+ ps.setString(2,l);
+ int i=ps.executeUpdate();
+ if(i>0)
+ {
+ out.print("Your Vote has been submitted successfully...");
+ RequestDispatcher rd=request.getRequestDispatcher("thankyou.html");
+ rd.include(request,response);
+ }
+ else
+ {
+ out.print("Failed to submit vote, try again");
+ RequestDispatcher rd=request.getRequestDispatcher("vote.html");
+ rd.include(request,response);
+ }
+ }
+ else
+ {
+ out.print("Please enter correct card number");
+ RequestDispatcher rd=request.getRequestDispatcher("vote.html");
+ rd.include(request,response);
+ }
+ }
+ catch (SQLIntegrityConstraintViolationException e2) {
+ out.print("Please select any party");
+ RequestDispatcher rd=request.getRequestDispatcher("vote.html");
+ rd.include(request,response);
+ }
+ catch(Exception e)
+ {
+ out.print(" " +e);
+ RequestDispatcher rd=request.getRequestDispatcher("vote.html");
+ rd.include(request,response);
+ }
+ out.close();
+
+
+}
+ protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ doPost(request, response);
+}
+
+
+
+static boolean checkLogin(String card) throws SQLException
+{
+ boolean r=false;
+ ps=con.prepareStatement("Select * from register where cardno = ?");
+ ps.setString(1,card);
+
+ ResultSet rs=ps.executeQuery();
+ r=rs.next();
+
+ return r;
+}
+}
diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/META-INF/MANIFEST.MF b/Online Voting System/Online_Voting_System/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..254272e1
--- /dev/null
+++ b/Online Voting System/Online_Voting_System/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.28.jar b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.28.jar
new file mode 100644
index 00000000..ac8904ee
Binary files /dev/null and b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.28.jar differ
diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/servlet-api.jar b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/servlet-api.jar
new file mode 100644
index 00000000..11cd71a7
Binary files /dev/null and b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/servlet-api.jar differ
diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/web.xml b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 00000000..a07d6d82
--- /dev/null
+++ b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,71 @@
+
+