=UTF-8
3 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.compliance=17
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
9 | org.eclipse.jdt.core.compiler.release=enabled
10 | org.eclipse.jdt.core.compiler.source=17
11 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/build/classes/ControllerServlet/ControllerServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 7/Experiment_7/build/classes/ControllerServlet/ControllerServlet.class
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/build/classes/LoginBean/ControllerServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 7/Experiment_7/build/classes/LoginBean/ControllerServlet.class
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/build/classes/LoginBean/LoginBean.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 7/Experiment_7/build/classes/LoginBean/LoginBean.class
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/src/main/java/LoginBean/LoginBean.java:
--------------------------------------------------------------------------------
1 | package LoginBean;
2 |
3 | import java.lang.*;
4 |
5 | public class LoginBean {
6 |
7 | private String name,password;
8 |
9 | public String getName() {
10 |
11 | return name;
12 |
13 | }
14 |
15 | public void setName(String name) {
16 |
17 | this.name = name;
18 |
19 | }
20 |
21 | public String getPassword() {
22 |
23 | return password;
24 |
25 | }
26 |
27 | public void setPassword(String password) {
28 |
29 | this.password = password;
30 |
31 | }
32 |
33 | public boolean validate(){
34 |
35 | if(password.equals("admin")){
36 |
37 | return true;
38 |
39 | }
40 |
41 | else{
42 |
43 | return false;
44 |
45 | }
46 |
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 7/Experiment_7/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/src/main/webapp/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 |
19 |
20 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/src/main/webapp/login-error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 | Sorry! username or password error
11 |
12 | <%@ include file="index.jsp" %>
13 |
14 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/Experiment_7/src/main/webapp/login-success.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 | <%@page import="LoginBean.LoginBean"%>
11 |
12 | You are successfully logged in!
13 |
14 | <%
15 |
16 | LoginBean bean=(LoginBean)request.getAttribute("bean");
17 |
18 | out.print("Welcome, "+bean.getName());
19 |
20 | %>
21 |
22 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/build/classes/ControllerServlet/ControllerServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 7/build/classes/ControllerServlet/ControllerServlet.class
--------------------------------------------------------------------------------
/EXPERIMENT 7/build/classes/LoginBean/ControllerServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 7/build/classes/LoginBean/ControllerServlet.class
--------------------------------------------------------------------------------
/EXPERIMENT 7/build/classes/LoginBean/LoginBean.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 7/build/classes/LoginBean/LoginBean.class
--------------------------------------------------------------------------------
/EXPERIMENT 7/src/main/java/LoginBean/ControllerServlet.java:
--------------------------------------------------------------------------------
1 | package LoginBean;
2 |
3 | import java.io.IOException;
4 | import java.io.PrintWriter;
5 | import java.sql.Connection;
6 | import java.sql.DriverManager;
7 | import java.sql.PreparedStatement;
8 | import java.sql.ResultSet;
9 |
10 | import jakarta.servlet.RequestDispatcher;
11 | import jakarta.servlet.ServletException;
12 | import jakarta.servlet.http.HttpServletRequest;
13 | import jakarta.servlet.http.HttpServletResponse;
14 |
15 | public class ControllerServlet {
16 | void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
17 | response.setContentType("text/html");
18 |
19 | PrintWriter out=response.getWriter();
20 |
21 | String name=request.getParameter("name");
22 |
23 | String password=request.getParameter("password");
24 | try{
25 | Class.forName("com.mysql.jdbc.Driver");
26 | Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3308/project","root","Akash@123");
27 | PreparedStatement st = con.prepareStatement("select * from register where name=? and password=?");
28 |
29 |
30 | st.setString(1, name);
31 | st.setString(2, password);
32 |
33 |
34 | LoginBean bean=new LoginBean();
35 |
36 | bean.setName(name);
37 |
38 | bean.setPassword(password);
39 |
40 | request.setAttribute("bean",bean);
41 |
42 | boolean status=bean.validate();
43 |
44 | ResultSet rs = st.executeQuery();
45 | if (rs.next()) {
46 | response.setContentType("text/html");
47 | out.print("Welcome " + name);
48 | RequestDispatcher rd = request.getRequestDispatcher("/login-success.jsp");
49 | rd.include(request, response);
50 |
51 |
52 | } else {
53 | response.setContentType("text/html");
54 | out.print("Invalid email or password");
55 | RequestDispatcher rd = request.getRequestDispatcher("/login-error.jsp");
56 | rd.include(request, response);
57 |
58 | }
59 |
60 | }
61 | catch (Exception e) {
62 | System.out.println(e);
63 | response.setContentType("text/html");
64 | out.print("Invalid email or password");
65 | RequestDispatcher rd = request.getRequestDispatcher("/login-error.jsp");
66 | rd.include(request, response);
67 |
68 |
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/src/main/java/LoginBean/LoginBean.java:
--------------------------------------------------------------------------------
1 | package LoginBean;
2 |
3 | import java.lang.*;
4 |
5 | public class LoginBean {
6 |
7 | private String name,password;
8 |
9 | public String getName() {
10 |
11 | return name;
12 |
13 | }
14 |
15 | public void setName(String name) {
16 |
17 | this.name = name;
18 |
19 | }
20 |
21 | public String getPassword() {
22 |
23 | return password;
24 |
25 | }
26 |
27 | public void setPassword(String password) {
28 |
29 | this.password = password;
30 |
31 | }
32 |
33 | public boolean validate(){
34 |
35 | if(password.equals("admin")){
36 |
37 | return true;
38 |
39 | }
40 |
41 | else{
42 |
43 | return false;
44 |
45 | }
46 |
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/EXPERIMENT 7/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 7/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar
--------------------------------------------------------------------------------
/EXPERIMENT 7/src/main/webapp/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 |
19 |
20 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/src/main/webapp/login-error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 | Sorry! username or password error
11 |
12 | <%@ include file="index.jsp" %>
13 |
14 |
--------------------------------------------------------------------------------
/EXPERIMENT 7/src/main/webapp/login-success.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 | <%@page import="LoginBean.LoginBean"%>
11 |
12 | You are successfully logged in!
13 |
14 | <%
15 |
16 | LoginBean bean=(LoginBean)request.getAttribute("bean");
17 |
18 | out.print("Welcome, "+bean.getName());
19 |
20 | %>
21 |
22 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | exp_8
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.m2e.core.maven2Builder
15 |
16 |
17 |
18 |
19 | org.hibernate.eclipse.console.hibernateBuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.jdt.core.javanature
26 | org.eclipse.m2e.core.maven2Nature
27 | org.hibernate.eclipse.console.hibernateNature
28 |
29 |
30 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding//src/main/java=UTF-8
3 | encoding//src/test/java=UTF-8
4 | encoding/=UTF-8
5 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
3 | org.eclipse.jdt.core.compiler.compliance=1.8
4 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
5 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
6 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
7 | org.eclipse.jdt.core.compiler.release=disabled
8 | org.eclipse.jdt.core.compiler.source=1.8
9 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/.settings/org.hibernate.eclipse.console.prefs:
--------------------------------------------------------------------------------
1 | default.configuration=exp_8
2 | eclipse.preferences.version=1
3 | hibernate3.enabled=true
4 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.spring.hibernate
6 | Spring-Hibernate
7 | 0.0.1-SNAPSHOT
8 | jar
9 |
10 | Spring-Hibernate
11 | http://maven.apache.org
12 |
13 |
14 | UTF-8
15 |
16 |
17 |
18 |
19 | junit
20 | junit
21 | 3.8.1
22 | test
23 |
24 |
25 |
26 |
27 | org.hibernate
28 | hibernate-core
29 | 4.2.7.Final
30 |
31 |
32 |
33 |
34 |
35 |
36 | mysql
37 | mysql-connector-java
38 | 5.1.21
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/src/main/java/com/pu/exp_8/App.java:
--------------------------------------------------------------------------------
1 | package com.pu.exp_8;
2 |
3 | import org.hibernate.Session;
4 | import org.hibernate.SessionFactory;
5 | import org.hibernate.Transaction;
6 | import org.hibernate.cfg.Configuration;
7 | /**
8 | * Hello world!
9 | *
10 | */
11 | public class App
12 | {
13 | public static void main( String[] args )
14 | {
15 | Student student = new Student();
16 | student.setRoll(1);
17 | student.setName("god");
18 | student.setMarks(100);
19 | //1. create Configuration object
20 | Configuration configuration=new Configuration().configure().addAnnotatedClass(Student.class);
21 | //2. create Session Factroy object
22 | SessionFactory sessionFactory=configuration.buildSessionFactory();
23 | //3. Create Session object
24 | Session session=sessionFactory.openSession();
25 | //4. Begin your transaction
26 | Transaction transaction=session.beginTransaction();
27 | //5.Save your object to database
28 | session.save(student);
29 | //6/ Commit your transaction
30 | transaction.commit();
31 | session.close();
32 | sessionFactory.close();
33 | }
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/src/main/java/com/pu/exp_8/Student.java:
--------------------------------------------------------------------------------
1 | package com.pu.exp_8;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Id;
5 |
6 | @Entity
7 | public class Student {
8 | @Id
9 | private int roll;
10 | private String name;
11 | private int marks;
12 | public int getRoll() {
13 | return roll;
14 | }
15 | public void setRoll(int roll) {
16 | this.roll = roll;
17 | }
18 | public String getName() {
19 | return name;
20 | }
21 | public void setName(String name) {
22 | this.name = name;
23 | }
24 | public int getMarks() {
25 | return marks;
26 | }
27 | public void setMarks(int marks) {
28 | this.marks = marks;
29 | }
30 |
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/src/main/java/hibernate.cfg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/src/test/java/com/pu/exp_8/AppTest.java:
--------------------------------------------------------------------------------
1 | package com.pu.exp_8;
2 |
3 | import junit.framework.Test;
4 | import junit.framework.TestCase;
5 | import junit.framework.TestSuite;
6 |
7 | /**
8 | * Unit test for simple App.
9 | */
10 | public class AppTest
11 | extends TestCase
12 | {
13 | /**
14 | * Create the test case
15 | *
16 | * @param testName name of the test case
17 | */
18 | public AppTest( String testName )
19 | {
20 | super( testName );
21 | }
22 |
23 | /**
24 | * @return the suite of tests being tested
25 | */
26 | public static Test suite()
27 | {
28 | return new TestSuite( AppTest.class );
29 | }
30 |
31 | /**
32 | * Rigourous Test :-)
33 | */
34 | public void testApp()
35 | {
36 | assertTrue( true );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/target/classes/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Build-Jdk-Spec: 17
3 | Created-By: Maven Integration for Eclipse
4 |
5 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/target/classes/META-INF/maven/com.spring.hibernate/Spring-Hibernate/pom.properties:
--------------------------------------------------------------------------------
1 | #Generated by Maven Integration for Eclipse
2 | #Fri May 03 23:09:31 IST 2024
3 | m2e.projectLocation=C\:\\Users\\Admin\\eclipse-workspace\\exp_8
4 | m2e.projectName=exp_8
5 | groupId=com.spring.hibernate
6 | artifactId=Spring-Hibernate
7 | version=0.0.1-SNAPSHOT
8 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/target/classes/META-INF/maven/com.spring.hibernate/Spring-Hibernate/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.spring.hibernate
6 | Spring-Hibernate
7 | 0.0.1-SNAPSHOT
8 | jar
9 |
10 | Spring-Hibernate
11 | http://maven.apache.org
12 |
13 |
14 | UTF-8
15 |
16 |
17 |
18 |
19 | junit
20 | junit
21 | 3.8.1
22 | test
23 |
24 |
25 |
26 |
27 | org.hibernate
28 | hibernate-core
29 | 4.2.7.Final
30 |
31 |
32 |
33 |
34 |
35 |
36 | mysql
37 | mysql-connector-java
38 | 5.1.21
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/target/classes/com/pu/exp_8/App.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 8/target/classes/com/pu/exp_8/App.class
--------------------------------------------------------------------------------
/EXPERIMENT 8/target/classes/com/pu/exp_8/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 8/target/classes/com/pu/exp_8/Student.class
--------------------------------------------------------------------------------
/EXPERIMENT 8/target/classes/hibernate.cfg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/EXPERIMENT 8/target/test-classes/com/pu/exp_8/AppTest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/EXPERIMENT 8/target/test-classes/com/pu/exp_8/AppTest.class
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 AKASH KOBAL
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/LoginForm/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/LoginForm/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | LoginForm
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.common.project.facet.core.builder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.validation.validationbuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.jem.workbench.JavaEMFNature
26 | org.eclipse.wst.common.modulecore.ModuleCoreNature
27 | org.eclipse.wst.common.project.facet.core.nature
28 | org.eclipse.jdt.core.javanature
29 | org.eclipse.wst.jsdt.core.jsNature
30 |
31 |
32 |
--------------------------------------------------------------------------------
/LoginForm/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/LoginForm/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/LoginForm/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.compliance=17
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
9 | org.eclipse.jdt.core.compiler.release=enabled
10 | org.eclipse.jdt.core.compiler.source=17
11 |
--------------------------------------------------------------------------------
/LoginForm/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/LoginForm/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/LoginForm/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/LoginForm/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/LoginForm/build/classes/login/login.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/LoginForm/build/classes/login/login.class
--------------------------------------------------------------------------------
/LoginForm/src/main/java/login/login.java:
--------------------------------------------------------------------------------
1 | package login;
2 |
3 | import java.io.IOException;
4 | import java.io.PrintWriter;
5 |
6 | import jakarta.servlet.ServletException;
7 | import jakarta.servlet.annotation.WebServlet;
8 | import jakarta.servlet.http.HttpServlet;
9 | import jakarta.servlet.http.HttpServletRequest;
10 | import jakarta.servlet.http.HttpServletResponse;
11 |
12 |
13 | @WebServlet("/loginForm")
14 | public class login extends HttpServlet{
15 | @Override
16 | protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
17 | // TODO Auto-generated method stub
18 | // super.doGet(req, resp);
19 |
20 |
21 | String my_name = req.getParameter("name");
22 | String my_password = req.getParameter("password");
23 |
24 | PrintWriter out = resp.getWriter();
25 |
26 | out.print("Your Details
");
27 | out.print("Your Name :"+my_name+"
");
28 | out.print("Your Passowrd :"+my_password+"
");
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/LoginForm/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/LoginForm/src/main/webapp/login.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Login Form
8 |
9 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/RegistrationForm/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/RegistrationForm/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | RegistrationForm
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.common.project.facet.core.builder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.validation.validationbuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.jem.workbench.JavaEMFNature
26 | org.eclipse.wst.common.modulecore.ModuleCoreNature
27 | org.eclipse.wst.common.project.facet.core.nature
28 | org.eclipse.jdt.core.javanature
29 | org.eclipse.wst.jsdt.core.jsNature
30 |
31 |
32 |
--------------------------------------------------------------------------------
/RegistrationForm/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/RegistrationForm/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/RegistrationForm/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.compliance=17
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
9 | org.eclipse.jdt.core.compiler.release=enabled
10 | org.eclipse.jdt.core.compiler.source=17
11 |
--------------------------------------------------------------------------------
/RegistrationForm/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RegistrationForm/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RegistrationForm/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/RegistrationForm/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/RegistrationForm/build/classes/register/register.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/RegistrationForm/build/classes/register/register.class
--------------------------------------------------------------------------------
/RegistrationForm/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/RegistrationForm/src/main/webapp/register.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/insert_data_into_database/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/insert_data_into_database/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | insert_data_into_database
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/insert_data_into_database/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/insert_data_into_database/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/insert_data_into_database/README.md:
--------------------------------------------------------------------------------
1 | # Insert data into database using JDBC.
2 | ```
3 | package insertData;
4 |
5 | import java.sql.Connection;
6 | import java.sql.DriverManager;
7 | import java.sql.PreparedStatement;
8 | import java.util.Scanner;
9 |
10 | public class insertData {
11 |
12 | private static Scanner sc;
13 |
14 | public static void main(String[] args) throws Exception { // throws Exception is used to handle the exception without using try-catch block
15 |
16 | sc = new Scanner(System.in);
17 | System.out.println("Enter the student details: ");
18 | System.out.print("Enter the student id: ");
19 | int id = sc.nextInt();
20 | System.out.print("Enter the student name: ");
21 | String name = sc.next();
22 | System.out.print("Enter the student branch: ");
23 | String branch = sc.next();
24 |
25 | Class.forName("com.mysql.cj.jdbc.Driver"); // load and register the driver
26 |
27 | Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3308/jdbc_db", "root", "Akash@123"); // establish the connection
28 |
29 | PreparedStatement ps = connection.prepareStatement("insert into student values('"+id+"','"+name+"','"+branch+"')"); // execute the query")
30 |
31 | int i = ps.executeUpdate(); // execute the query
32 | if (i > 0) // if the record is inserted successfully then it will return 1 else 0
33 | System.out.println("Record inserted successfully");
34 | else
35 | System.out.println("Record not inserted successfully");
36 |
37 | }
38 |
39 | }
40 | ```
41 |
--------------------------------------------------------------------------------
/insert_data_into_database/bin/insertData/insertData.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/insert_data_into_database/bin/insertData/insertData.class
--------------------------------------------------------------------------------
/insert_data_into_database/bin/module-info.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/insert_data_into_database/bin/module-info.class
--------------------------------------------------------------------------------
/insert_data_into_database/src/insertData/insertData.java:
--------------------------------------------------------------------------------
1 | package insertData;
2 |
3 | import java.sql.Connection;
4 | import java.sql.DriverManager;
5 | import java.sql.PreparedStatement;
6 | import java.util.Scanner;
7 |
8 | public class insertData {
9 |
10 | private static Scanner sc;
11 |
12 | public static void main(String[] args) throws Exception { // throws Exception is used to handle the exception without using try-catch block
13 |
14 | sc = new Scanner(System.in);
15 | System.out.println("Enter the student details: ");
16 | System.out.print("Enter the student id: ");
17 | int id = sc.nextInt();
18 | System.out.print("Enter the student name: ");
19 | String name = sc.next();
20 | System.out.print("Enter the student branch: ");
21 | String branch = sc.next();
22 |
23 | Class.forName("com.mysql.cj.jdbc.Driver"); // load and register the driver
24 |
25 | Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3308/jdbc_db", "root", "Akash@123"); // establish the connection
26 |
27 | PreparedStatement ps = connection.prepareStatement("insert into student values('"+id+"','"+name+"','"+branch+"')"); // execute the query")
28 |
29 | int i = ps.executeUpdate(); // execute the query
30 | if (i > 0) // if the record is inserted successfully then it will return 1 else 0
31 | System.out.println("Record inserted successfully");
32 | else
33 | System.out.println("Record not inserted successfully");
34 |
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/insert_data_into_database/src/module-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | /**
5 | *
6 | */
7 | module insertData {
8 | requires java.sql;
9 | }
--------------------------------------------------------------------------------
/labsheet5/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/labsheet5/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | labsheet5
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.common.project.facet.core.builder
15 |
16 |
17 |
18 |
19 | org.jboss.tools.jst.web.kb.kbbuilder
20 |
21 |
22 |
23 |
24 | org.jboss.tools.cdi.core.cdibuilder
25 |
26 |
27 |
28 |
29 | org.eclipse.wst.validation.validationbuilder
30 |
31 |
32 |
33 |
34 |
35 | org.eclipse.jem.workbench.JavaEMFNature
36 | org.eclipse.wst.common.modulecore.ModuleCoreNature
37 | org.eclipse.wst.common.project.facet.core.nature
38 | org.eclipse.jdt.core.javanature
39 | org.jboss.tools.jst.web.kb.kbnature
40 | org.jboss.tools.cdi.core.cdinature
41 | org.eclipse.wst.jsdt.core.jsNature
42 |
43 |
44 |
--------------------------------------------------------------------------------
/labsheet5/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/labsheet5/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/labsheet5/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.compliance=17
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
9 | org.eclipse.jdt.core.compiler.release=enabled
10 | org.eclipse.jdt.core.compiler.source=17
11 |
--------------------------------------------------------------------------------
/labsheet5/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/labsheet5/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/labsheet5/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/labsheet5/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/labsheet5/build/classes/DispData/DispData.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/labsheet5/build/classes/DispData/DispData.class
--------------------------------------------------------------------------------
/labsheet5/build/classes/InsertData/InsertData.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/labsheet5/build/classes/InsertData/InsertData.class
--------------------------------------------------------------------------------
/labsheet5/build/classes/InsertDataa/InsertDataa.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/labsheet5/build/classes/InsertDataa/InsertDataa.class
--------------------------------------------------------------------------------
/labsheet5/src/main/java/InsertData/InsertData.java:
--------------------------------------------------------------------------------
1 | package InsertData;
2 |
3 | import java.io.IOException;
4 | import java.io.PrintWriter;
5 | import java.sql.Connection;
6 | import java.sql.DriverManager;
7 | import java.sql.PreparedStatement;
8 |
9 | import jakarta.servlet.ServletException;
10 | import jakarta.servlet.annotation.WebServlet;
11 | import jakarta.servlet.http.HttpServlet;
12 | import jakarta.servlet.http.HttpServletRequest;
13 | import jakarta.servlet.http.HttpServletResponse;
14 |
15 | /**
16 | * Servlet implementation class InsertData
17 | */
18 | public class InsertData extends HttpServlet {
19 | private static final long serialVersionUID = 1L;
20 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
21 | // TODO Auto-generated method stub
22 | try{
23 | Class.forName("com.mysql.jdbc.Driver");
24 | Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3308/god","root","Akash@123");
25 | PreparedStatement st = con.prepareStatement("insert into mark values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
26 | st.setInt(1, Integer.valueOf(request.getParameter("rollno")));
27 | st.setString(2, request.getParameter("name"));
28 | st.setString(3, request.getParameter("section"));
29 | st.setInt(4, Integer.valueOf(request.getParameter("sub1")));
30 | st.setInt(5, Integer.valueOf(request.getParameter("sub2")));
31 | st.setInt(6, Integer.valueOf(request.getParameter("sub3")));
32 | st.setInt(7, Integer.valueOf(request.getParameter("sub4")));
33 | st.setInt(8, Integer.valueOf(request.getParameter("sub5")));
34 | st.setInt(9, Integer.valueOf(request.getParameter("sub6")));
35 | st.setInt(10, Integer.valueOf(request.getParameter("lab1")));
36 | st.setInt(11, Integer.valueOf(request.getParameter("lab2")));
37 | st.executeUpdate();
38 | st.close();
39 | con.close();
40 | PrintWriter out = response.getWriter();
41 | out.println("Successfully Inserted"
42 | + "");
43 | }catch(Exception e){
44 | System.out.println(e);}
45 | }
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/labsheet5/src/main/java/InsertDataa/InsertDataa.java:
--------------------------------------------------------------------------------
1 | package InsertDataa;
2 |
3 | import jakarta.servlet.annotation.WebServlet;
4 | import jakarta.servlet.http.HttpServlet;
5 |
6 | public class InsertDataa extends HttpServlet {
7 | private static final long serialVersionUID = 1L;
8 |
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/labsheet5/src/main/webapp/Insert.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 | Insert title here
7 |
8 |
9 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/labsheet5/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/labsheet5/src/main/webapp/Search.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labsheet5/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/labsheet5/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar
--------------------------------------------------------------------------------
/labsheet5/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | InsertData
6 | InsertData
7 | InsertData.InsertData
8 |
9 |
10 | InsertData
11 | /InsertData
12 |
13 | labsheet5
14 |
15 | index.html
16 | index.htm
17 | index.jsp
18 | default.html
19 | default.htm
20 | default.jsp
21 |
22 |
23 |
24 | DispData
25 | DispData
26 | DispData.DispData
27 |
28 |
29 | DispData
30 | /DispData
31 |
32 |
33 |
34 | InsertDataa
35 | InsertDataa
36 | InsertDataa.InsertDataa
37 |
38 |
39 | InsertDataa
40 | /InsertDataa
41 |
42 |
--------------------------------------------------------------------------------
/labsheet6/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/labsheet6/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | labsheet6
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.common.project.facet.core.builder
15 |
16 |
17 |
18 |
19 | org.jboss.tools.jst.web.kb.kbbuilder
20 |
21 |
22 |
23 |
24 | org.jboss.tools.cdi.core.cdibuilder
25 |
26 |
27 |
28 |
29 | org.eclipse.wst.validation.validationbuilder
30 |
31 |
32 |
33 |
34 |
35 | org.eclipse.jem.workbench.JavaEMFNature
36 | org.eclipse.wst.common.modulecore.ModuleCoreNature
37 | org.eclipse.wst.common.project.facet.core.nature
38 | org.eclipse.jdt.core.javanature
39 | org.jboss.tools.jst.web.kb.kbnature
40 | org.jboss.tools.cdi.core.cdinature
41 | org.eclipse.wst.jsdt.core.jsNature
42 |
43 |
44 |
--------------------------------------------------------------------------------
/labsheet6/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/labsheet6/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/labsheet6/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.compliance=17
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
9 | org.eclipse.jdt.core.compiler.release=enabled
10 | org.eclipse.jdt.core.compiler.source=17
11 |
--------------------------------------------------------------------------------
/labsheet6/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/labsheet6/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/labsheet6/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/labsheet6/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/labsheet6/src/main/webapp/Disp.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 | <%@ page import="java.sql.*" %>
5 | <%@ page import="java.io.*" %>
6 |
7 |
8 |
9 | Insert title here
10 |
11 |
12 | Employee Details
13 | <%
14 | try {
15 | Class.forName("com.mysql.jdbc.Driver");
16 | Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3308/god","root","Akash@123");
17 | Statement st = con.createStatement();
18 | ResultSet rs = st.executeQuery("select * from employee");
19 | %>
20 |
21 | E.No | Name | Gender | Department | Salary |
---|
22 | <%
23 | while (rs.next()) {
24 | %>
25 |
26 | <%=rs.getInt(1)%> |
27 | <%=rs.getString(2)%> |
28 | <%=rs.getString(3)%> |
29 | <%=rs.getString(4)%> |
30 | <%=rs.getFloat(5)%> |
31 |
32 | <% } %>
33 | <%
34 | // close all the connections.
35 | rs.close();
36 | st.close();
37 | con.close();
38 | } catch (Exception ex) {
39 | %>
40 |
41 | <%
42 | out.println("Unable to connect to database.");
43 | }
44 | %>
45 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/labsheet6/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/labsheet6/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/labsheet6/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar
--------------------------------------------------------------------------------
/labsheet7/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/labsheet7/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | labsheet7
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.common.project.facet.core.builder
15 |
16 |
17 |
18 |
19 | org.jboss.tools.jst.web.kb.kbbuilder
20 |
21 |
22 |
23 |
24 | org.jboss.tools.cdi.core.cdibuilder
25 |
26 |
27 |
28 |
29 | org.eclipse.wst.validation.validationbuilder
30 |
31 |
32 |
33 |
34 |
35 | org.eclipse.jem.workbench.JavaEMFNature
36 | org.eclipse.wst.common.modulecore.ModuleCoreNature
37 | org.eclipse.wst.common.project.facet.core.nature
38 | org.eclipse.jdt.core.javanature
39 | org.jboss.tools.jst.web.kb.kbnature
40 | org.jboss.tools.cdi.core.cdinature
41 | org.eclipse.wst.jsdt.core.jsNature
42 |
43 |
44 |
--------------------------------------------------------------------------------
/labsheet7/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/labsheet7/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/labsheet7/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.compliance=17
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
9 | org.eclipse.jdt.core.compiler.release=enabled
10 | org.eclipse.jdt.core.compiler.source=17
11 |
--------------------------------------------------------------------------------
/labsheet7/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/labsheet7/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/labsheet7/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/labsheet7/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/labsheet7/build/classes/ControllerServlet/ControllerServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/labsheet7/build/classes/ControllerServlet/ControllerServlet.class
--------------------------------------------------------------------------------
/labsheet7/build/classes/LoginBean/LoginBean.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/labsheet7/build/classes/LoginBean/LoginBean.class
--------------------------------------------------------------------------------
/labsheet7/src/main/java/ControllerServlet/ControllerServlet.java:
--------------------------------------------------------------------------------
1 | package ControllerServlet;
2 |
3 | import jakarta.servlet.RequestDispatcher;
4 | import jakarta.servlet.ServletException;
5 | import jakarta.servlet.annotation.WebServlet;
6 | import jakarta.servlet.http.HttpServlet;
7 | import jakarta.servlet.http.HttpServletRequest;
8 | import jakarta.servlet.http.HttpServletResponse;
9 | import java.io.IOException;
10 | import java.io.PrintWriter;
11 |
12 | import LoginBean.LoginBean;
13 |
14 | public class ControllerServlet extends HttpServlet {
15 | private static final long serialVersionUID = 1L;
16 |
17 |
18 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
19 | // TODO Auto-generated method stub
20 | response.setContentType("text/html");
21 | PrintWriter out=response.getWriter();
22 | String name=request.getParameter("name");
23 | String password=request.getParameter("password");
24 | LoginBean bean=new LoginBean();
25 | bean.setName(name);
26 | bean.setPassword(password);
27 | request.setAttribute("bean",bean);
28 | boolean status=bean.validate();
29 | if(status){
30 | RequestDispatcher rd=request.getRequestDispatcher("login-success.jsp");
31 | rd.forward(request,response);
32 | }
33 | else{
34 | RequestDispatcher rd=request.getRequestDispatcher("login-error.jsp");
35 | rd.forward(request,response);
36 | }
37 |
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/labsheet7/src/main/java/LoginBean/LoginBean.java:
--------------------------------------------------------------------------------
1 | package LoginBean;
2 | import java.lang.*;
3 | public class LoginBean {
4 | private String name,password;
5 | public String getName() {
6 | return name;
7 | }
8 | public void setName(String name) {
9 | this.name = name;
10 | }
11 | public String getPassword() {
12 | return password;
13 | }
14 | public void setPassword(String password) {
15 | this.password = password;
16 | }
17 | public boolean validate(){
18 | if(password.equals("admin")){
19 | return true;
20 | }
21 | else{
22 | return false;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/labsheet7/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/labsheet7/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ControllerServlet
6 | ControllerServlet
7 | ControllerServlet.ControllerServlet
8 |
9 |
10 | ControllerServlet
11 | /ControllerServlet
12 |
13 | labsheet7
14 |
15 | index.html
16 | index.htm
17 | index.jsp
18 | default.html
19 | default.htm
20 | default.jsp
21 |
22 |
--------------------------------------------------------------------------------
/labsheet7/src/main/webapp/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/labsheet7/src/main/webapp/login-error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 | Sorry! username or password error
11 | <%@ include file="index.jsp" %>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/labsheet7/src/main/webapp/login-success.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 | <%@page import="LoginBean.LoginBean"%>
11 | You are successfully logged in!
12 | <%
13 | LoginBean bean=(LoginBean)request.getAttribute("bean");
14 | out.print("Welcome, "+bean.getName());
15 | %>
16 |
17 |
18 |
--------------------------------------------------------------------------------
/labsheets/Exp1_M1.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/labsheets/Exp1_M1.docx
--------------------------------------------------------------------------------
/labsheets/Exp2_M1.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/labsheets/Exp2_M1.docx
--------------------------------------------------------------------------------
/labsheets/Exp3_M1.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/labsheets/Exp3_M1.docx
--------------------------------------------------------------------------------
/labsheets/Exp4_M1.txt:
--------------------------------------------------------------------------------
1 | import java.util.*;
2 | class Student{
3 | int rno;
4 | String name;
5 | int age;
6 | float fees;
7 |
8 | public Student(int rno, String name, int age, float fees) {
9 | super();
10 | this.rno = rno;
11 | this.name = name;
12 | this.age = age;
13 | this.fees = fees;
14 | }
15 |
16 |
17 | @Override
18 | public String toString() {
19 | return rno + " " + name + " " + age + " " + fees;
20 | }
21 | }
22 | class Exp4 {
23 | public static void main(String[] args) {
24 | List s = new ArrayList();
25 | s.add(new Student(1,"abc",20,20000.00f));
26 | s.add(new Student(2,"xyz",15,15000.00f));
27 | s.add(new Student(3,"def",10,10000.00f));
28 |
29 | System.out.println("Sorting on the basis of name...");
30 |
31 | // implementing lambda expression
32 | Collections.sort(s,(s1,s2)->{return s1.name.compareTo(s2.name);});
33 | for(Student l:s){
34 | System.out.println(l);
35 | }
36 | System.out.println("Sorting by age");
37 |
38 | Collections.sort(s,(s1,s2)-> s1.age - s2.age);
39 | s.forEach((l)->System.out.println(l));
40 |
41 | System.out.println("Sorting by Fees");
42 |
43 | Collections.sort(s,(s1,s2)-> (int)s1.fees - (int)s2.fees);
44 | s.forEach((l)->System.out.println(l));
45 |
46 | }
47 | }
--------------------------------------------------------------------------------
/module/JavaAllComponents/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/module/JavaAllComponents/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | JavaAllComponents
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/module/JavaAllComponents/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/module/JavaAllComponents/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/module/JavaAllComponents/bin/allcompo/allcompo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/JavaAllComponents/bin/allcompo/allcompo.class
--------------------------------------------------------------------------------
/module/JavaAllComponents/src/allcompo/allcompo.java:
--------------------------------------------------------------------------------
1 | package allcompo;
2 |
3 | import java.sql.Connection;
4 | import java.sql.DriverManager;
5 | import java.sql.PreparedStatement;
6 | import java.util.Scanner;
7 |
8 | public class allcompo{
9 |
10 | public static void main(String[] args) throws Exception{
11 | // TODO Auto-generated method stub
12 | System.out.println("Enter Your Details :");
13 | Scanner sc = new Scanner(System.in);
14 | System.out.println("Enter Your Name :");
15 | String name = sc.nextLine();
16 | System.out.println("Enter Your Roll No :");
17 | String rollNo = sc.nextLine();
18 | System.out.println("Enter Your Email :");
19 | String email = sc.nextLine();
20 | System.out.println("Enter Your Password :");
21 | String password = sc.nextLine();
22 | System.out.println("Enter Your Date of Birth :");
23 | String dob = sc.nextLine();
24 | System.out.println("Enter Your Phone No :");
25 | String phoneNo = sc.nextLine();
26 | System.out.println("Enter Your Gender :");
27 | String gender = sc.nextLine();
28 | System.out.println("Enter Your Address:");
29 | String address = sc.nextLine();
30 |
31 |
32 | try {
33 | Class.forName("com.mysql.cj.jdbc.Driver");
34 | Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3308/allCompo","root","Akash@123");
35 |
36 | PreparedStatement ps = con.prepareStatement("INSERT INTO allCompo values(?,?,?,?,?,?,?,?)");
37 | ps.setString(1,name);
38 | ps.setString(2,rollNo);
39 | ps.setString(3,email);
40 | ps.setString(4,password);
41 | ps.setString(5,dob);
42 | ps.setString(6,phoneNo);
43 | ps.setString(7,gender);
44 | ps.setString(8,address);
45 |
46 | ps.executeUpdate();
47 | System.out.println("Data Inserted Successfully");
48 | }
49 | catch (Exception e) {
50 | System.out.println("Failed to insert data"+e);
51 | }
52 |
53 |
54 | }
55 | }
56 |
57 | /*
58 | create database allCompo;
59 |
60 | use allCompo;
61 |
62 | create table allCompo(name varchar(255),rollNo varchar(255),email varchar(255),password varchar(255),dob varchar(
63 | 255),phoneNo varchar(255),gender varchar(255),address varchar(255));
64 |
65 | select * from allCompo;
66 |
67 | */
68 |
69 |
--------------------------------------------------------------------------------
/module/JavaAllComponents/src/module-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | /**
5 | *
6 | */
7 |
--------------------------------------------------------------------------------
/module/Project With All Components/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/module/Project With All Components/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | Project With All Components
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.common.project.facet.core.builder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.validation.validationbuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.jem.workbench.JavaEMFNature
26 | org.eclipse.wst.common.modulecore.ModuleCoreNature
27 | org.eclipse.wst.common.project.facet.core.nature
28 | org.eclipse.jdt.core.javanature
29 | org.eclipse.wst.jsdt.core.jsNature
30 |
31 |
32 |
--------------------------------------------------------------------------------
/module/Project With All Components/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/module/Project With All Components/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/module/Project With All Components/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.compliance=17
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
9 | org.eclipse.jdt.core.compiler.release=enabled
10 | org.eclipse.jdt.core.compiler.source=17
11 |
--------------------------------------------------------------------------------
/module/Project With All Components/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/module/Project With All Components/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/module/Project With All Components/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/module/Project With All Components/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/module/Project With All Components/build/classes/allCompo/allCompo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/Project With All Components/build/classes/allCompo/allCompo.class
--------------------------------------------------------------------------------
/module/Project With All Components/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/module/Project With All Components/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/Project With All Components/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar
--------------------------------------------------------------------------------
/module/Project With All Components/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Project With All Components
4 |
5 | index.html
6 | index.jsp
7 | index.htm
8 | default.html
9 | default.jsp
10 | default.htm
11 |
12 |
--------------------------------------------------------------------------------
/module/Project With All Components/src/main/webapp/allComponents.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 | All Components
11 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/module/Student Registration Form/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/module/Student Registration Form/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | Student Registration Form
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.common.project.facet.core.builder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.validation.validationbuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.jem.workbench.JavaEMFNature
26 | org.eclipse.wst.common.modulecore.ModuleCoreNature
27 | org.eclipse.wst.common.project.facet.core.nature
28 | org.eclipse.jdt.core.javanature
29 | org.eclipse.wst.jsdt.core.jsNature
30 |
31 |
32 |
--------------------------------------------------------------------------------
/module/Student Registration Form/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/module/Student Registration Form/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/module/Student Registration Form/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.compliance=17
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
9 | org.eclipse.jdt.core.compiler.release=enabled
10 | org.eclipse.jdt.core.compiler.source=17
11 |
--------------------------------------------------------------------------------
/module/Student Registration Form/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/module/Student Registration Form/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/module/Student Registration Form/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/module/Student Registration Form/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/module/Student Registration Form/build/classes/studentInfo/register.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/Student Registration Form/build/classes/studentInfo/register.class
--------------------------------------------------------------------------------
/module/Student Registration Form/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/module/Student Registration Form/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/Student Registration Form/src/main/webapp/WEB-INF/lib/mysql-connector-j-8.3.0.jar
--------------------------------------------------------------------------------
/module/Student Registration Form/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Student Registration Form
4 |
5 | index.html
6 | index.jsp
7 | index.htm
8 | default.html
9 | default.jsp
10 | default.htm
11 |
12 |
--------------------------------------------------------------------------------
/module/Student Registration Form/src/main/webapp/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 | Student Registration Form
11 |
18 |
19 |
--------------------------------------------------------------------------------
/module/experimentFour/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/module/experimentFour/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | experimentFour
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/module/experimentFour/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/module/experimentFour/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/module/experimentFour/bin/experimentFour/expFour.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experimentFour/bin/experimentFour/expFour.class
--------------------------------------------------------------------------------
/module/experimentFour/bin/module-info.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experimentFour/bin/module-info.class
--------------------------------------------------------------------------------
/module/experimentFour/src/experimentFour/expFour.java:
--------------------------------------------------------------------------------
1 | package experimentFour;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Collections;
5 |
6 | public class expFour {
7 | int rno;
8 | String name;
9 | int age;
10 | float fees;
11 |
12 | public expFour(int rno, String name, int age, float fees) {
13 | this.rno = rno;
14 | this.name = name;
15 | this.age = age;
16 | this.fees = fees;
17 | }
18 | @Override
19 | public String toString() {
20 | return rno + " " + name + " " + age + " " + fees;
21 | }
22 |
23 | public static void main(String[] args) {
24 | // TODO Auto-generated method stub
25 | ArrayList s = new ArrayList();
26 | s.add(new expFour(101, "Vijay", 23, 5600));
27 | s.add(new expFour(102, "Ajay", 27, 7800));
28 | s.add(new expFour(103, "Jai", 21, 4500));
29 | System.out.println("Sorting on the basis of name...");
30 |
31 | // implementing lambda expression
32 | Collections.sort(s,(s1,s2)->{return s1.name.compareTo(s2.name);});
33 | for(expFour l:s){
34 | System.out.println(l);
35 | }
36 | System.out.println("Sorting by age");
37 |
38 | Collections.sort(s,(s1,s2)-> s1.age - s2.age);
39 | s.forEach((l)->System.out.println(l));
40 |
41 | System.out.println("Sorting by Fees");
42 |
43 | Collections.sort(s,(s1,s2)-> (int)s1.fees - (int)s2.fees);
44 | s.forEach((l)->System.out.println(l));
45 | }
46 |
47 | }
48 |
49 |
--------------------------------------------------------------------------------
/module/experimentFour/src/module-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | /**
5 | *
6 | */
7 | module experimentFour {
8 | }
--------------------------------------------------------------------------------
/module/experimentThree/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/module/experimentThree/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | experimentThree
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/module/experimentThree/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/module/experimentThree/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/module/experimentThree/bin/experimentThree/jdbc.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experimentThree/bin/experimentThree/jdbc.class
--------------------------------------------------------------------------------
/module/experimentThree/bin/module-info.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experimentThree/bin/module-info.class
--------------------------------------------------------------------------------
/module/experimentThree/src/module-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | /**
5 | *
6 | */
7 | module experimentThree {
8 | requires java.sql;
9 | }
--------------------------------------------------------------------------------
/module/experiment_one/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/module/experiment_one/.idea/aws.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/module/experiment_one/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/module/experiment_one/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/module/experiment_one/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/module/experiment_one/module1.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/module/experiment_one/out/production/module1/module1/experiment1/Deserial.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_one/out/production/module1/module1/experiment1/Deserial.class
--------------------------------------------------------------------------------
/module/experiment_one/out/production/module1/module1/experiment1/Serial.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_one/out/production/module1/module1/experiment1/Serial.class
--------------------------------------------------------------------------------
/module/experiment_one/out/production/module1/module1/experiment1/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_one/out/production/module1/module1/experiment1/Student.class
--------------------------------------------------------------------------------
/module/experiment_one/out/production/module1/module1/experiment1/file.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_one/out/production/module1/module1/experiment1/file.txt
--------------------------------------------------------------------------------
/module/experiment_one/src/module1/experiment1/Deserial.java:
--------------------------------------------------------------------------------
1 | package module1.experiment1;
2 |
3 | import java.io.FileInputStream;
4 | import java.io.FileOutputStream;
5 | import java.io.ObjectInputStream;
6 |
7 | public class Deserial {
8 | public static void main(String[] args) {
9 | try {
10 | FileInputStream fileInputStream = new FileInputStream("C:\\Users\\Admin\\IdeaProjects\\module1\\src\\module1\\experiment1\\file.txt");
11 | ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);
12 | Student student = (Student) objectInputStream.readObject();
13 | System.out.println(student);
14 | objectInputStream.close();
15 |
16 | }
17 | catch (Exception e){
18 | System.out.println(e);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/module/experiment_one/src/module1/experiment1/Serial.java:
--------------------------------------------------------------------------------
1 | package module1.experiment1;
2 |
3 | import java.io.FileOutputStream;
4 | import java.io.ObjectOutputStream;
5 |
6 | public class Serial {
7 | public static void main(String[] args) {
8 | try {
9 | Student s1 = new Student(1,"Akash",115000);
10 | FileOutputStream fileOutputStream = new FileOutputStream("C:\\Users\\Admin\\IdeaProjects\\module1\\src\\module1\\experiment1\\file.txt");
11 | ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);
12 | objectOutputStream.writeObject(s1);
13 | objectOutputStream.flush();
14 | objectOutputStream.close();
15 | System.out.println("Sucess");
16 |
17 | }
18 | catch (Exception e){
19 | System.out.println(e);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/module/experiment_one/src/module1/experiment1/Student.java:
--------------------------------------------------------------------------------
1 | package module1.experiment1;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Student implements Serializable {
6 | int rollNo;
7 | String name;
8 | float fees;
9 | public Student(int id, String name, float fees){
10 | this.rollNo = id;
11 | this.name = name;
12 | this.fees = fees;
13 | }
14 | public String toString(){
15 | return "RollNo : "+rollNo+"\n"+
16 | "Name : "+name+"\n"+
17 | "Fees : "+fees;
18 | }
19 |
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/module/experiment_one/src/module1/experiment1/file.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_one/src/module1/experiment1/file.txt
--------------------------------------------------------------------------------
/module/experiment_two/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/module/experiment_two/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/module/experiment_two/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/module/experiment_two/experiment_two.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/module/experiment_two/out/production/experiment_two/AgeComparator.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_two/out/production/experiment_two/AgeComparator.class
--------------------------------------------------------------------------------
/module/experiment_two/out/production/experiment_two/FeesComprator.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_two/out/production/experiment_two/FeesComprator.class
--------------------------------------------------------------------------------
/module/experiment_two/out/production/experiment_two/Main$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_two/out/production/experiment_two/Main$1.class
--------------------------------------------------------------------------------
/module/experiment_two/out/production/experiment_two/Main$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_two/out/production/experiment_two/Main$2.class
--------------------------------------------------------------------------------
/module/experiment_two/out/production/experiment_two/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_two/out/production/experiment_two/Main.class
--------------------------------------------------------------------------------
/module/experiment_two/out/production/experiment_two/NameComprator.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_two/out/production/experiment_two/NameComprator.class
--------------------------------------------------------------------------------
/module/experiment_two/out/production/experiment_two/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/experiment_two/out/production/experiment_two/Student.class
--------------------------------------------------------------------------------
/module/insert_data_into_database/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/module/insert_data_into_database/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | insert_data_into_database
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/module/insert_data_into_database/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/module/insert_data_into_database/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/module/insert_data_into_database/bin/insertData/insertData.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/insert_data_into_database/bin/insertData/insertData.class
--------------------------------------------------------------------------------
/module/insert_data_into_database/bin/module-info.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/module/insert_data_into_database/bin/module-info.class
--------------------------------------------------------------------------------
/module/insert_data_into_database/src/insertData/insertData.java:
--------------------------------------------------------------------------------
1 | package insertData;
2 |
3 | import java.sql.Connection;
4 | import java.sql.DriverManager;
5 | import java.sql.PreparedStatement;
6 | import java.util.Scanner;
7 |
8 | public class insertData {
9 |
10 | private static Scanner sc;
11 |
12 | public static void main(String[] args) throws Exception { // throws Exception is used to handle the exception without using try-catch block
13 |
14 | sc = new Scanner(System.in);
15 | System.out.println("Enter the student details: ");
16 | System.out.print("Enter the student id: ");
17 | int id = sc.nextInt();
18 | System.out.print("Enter the student name: ");
19 | String name = sc.next();
20 | System.out.print("Enter the student branch: ");
21 | String branch = sc.next();
22 |
23 | Class.forName("com.mysql.cj.jdbc.Driver"); // load and register the driver
24 |
25 | Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3308/jdbc_db", "root", "Akash@123"); // establish the connection
26 |
27 | PreparedStatement ps = connection.prepareStatement("insert into student values('"+id+"','"+name+"','"+branch+"')"); // execute the query")
28 |
29 | int i = ps.executeUpdate(); // execute the query
30 | if (i > 0) // if the record is inserted successfully then it will return 1 else 0
31 | System.out.println("Record inserted successfully");
32 | else
33 | System.out.println("Record not inserted successfully");
34 |
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/module/insert_data_into_database/src/module-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | /**
5 | *
6 | */
7 | module insertData {
8 | requires java.sql;
9 | }
--------------------------------------------------------------------------------
/mysql-connector-j-8.3.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/mysql-connector-j-8.3.0.jar
--------------------------------------------------------------------------------
/serializationAndDeseralization/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/serializationAndDeseralization/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | serializationAndDeseralization
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/serializationAndDeseralization/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/serializationAndDeseralization/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=17
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=17
15 |
--------------------------------------------------------------------------------
/serializationAndDeseralization/bin/module-info.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/serializationAndDeseralization/bin/module-info.class
--------------------------------------------------------------------------------
/serializationAndDeseralization/bin/serializationAndDeseralization/deserial.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/serializationAndDeseralization/bin/serializationAndDeseralization/deserial.class
--------------------------------------------------------------------------------
/serializationAndDeseralization/bin/serializationAndDeseralization/serial.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/serializationAndDeseralization/bin/serializationAndDeseralization/serial.class
--------------------------------------------------------------------------------
/serializationAndDeseralization/bin/serializationAndDeseralization/student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AkashKobal/java-full-stack-developement/47d7451db83ae9e00c8a1708ac75c26edda5e262/serializationAndDeseralization/bin/serializationAndDeseralization/student.class
--------------------------------------------------------------------------------
/serializationAndDeseralization/src/module-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | /**
5 | *
6 | */
7 | module serializationAndDeseralization {
8 | }
--------------------------------------------------------------------------------
/serializationAndDeseralization/src/serializationAndDeseralization/deserial.java:
--------------------------------------------------------------------------------
1 | package serializationAndDeseralization;
2 |
3 | import java.io.FileInputStream;
4 | import java.io.FileOutputStream;
5 | import java.io.ObjectInputStream;
6 |
7 | public class deserial {
8 | public static void main(String[] args) {
9 | try {
10 | FileInputStream fileInputStream = new FileInputStream("C:\\Users\\Admin\\IdeaProjects\\module1\\src\\module1\\experiment1\\file.txt");
11 | ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);
12 | student s1 = (student) objectInputStream.readObject();
13 | student s2 = (student) objectInputStream.readObject();
14 | student s3 = (student) objectInputStream.readObject();
15 | student s4 = (student) objectInputStream.readObject();
16 | student s5 = (student) objectInputStream.readObject();
17 |
18 | System.out.println(s1);
19 | System.out.println(s2);
20 | System.out.println(s3);
21 | System.out.println(s4);
22 | System.out.println(s5);
23 | objectInputStream.close();
24 |
25 | }
26 | catch (Exception e){
27 | System.out.println(e);
28 | }
29 | }
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/serializationAndDeseralization/src/serializationAndDeseralization/serial.java:
--------------------------------------------------------------------------------
1 | package serializationAndDeseralization;
2 | import java.io.FileOutputStream;
3 | import java.io.ObjectOutputStream;
4 |
5 | public class serial {
6 | public static void main(String[] args) {
7 | try {
8 | student s1 = new student(1,116,"Akash","CSE","PU");
9 | student s2 = new student(2,117,"Rahul","CSE","PU");
10 | student s3 = new student(3,118,"Rohit","CSE","PU");
11 | student s4 = new student(4,119,"Raj","CSE","PU");
12 | student s5 = new student(5,120,"Ravi","CSE","PU");
13 |
14 | FileOutputStream fileOutputStream = new FileOutputStream("C:\\Users\\Admin\\IdeaProjects\\module1\\src\\module1\\experiment1\\file.txt");
15 | ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);
16 | objectOutputStream.writeObject(s1);
17 | objectOutputStream.writeObject(s2);
18 | objectOutputStream.writeObject(s3);
19 | objectOutputStream.writeObject(s4);
20 | objectOutputStream.writeObject(s5);
21 | objectOutputStream.flush();
22 | objectOutputStream.close();
23 | System.out.println("Sucess");
24 |
25 | }
26 | catch (Exception e){
27 | System.out.println(e);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/serializationAndDeseralization/src/serializationAndDeseralization/student.java:
--------------------------------------------------------------------------------
1 | package serializationAndDeseralization;
2 |
3 | import java.io.Serializable;
4 |
5 | public class student implements Serializable {
6 | int id;
7 | int rollNo;
8 | String name;
9 | String branch;
10 | String college;
11 |
12 | public student(int id, int rollNo, String name, String branch, String college) {
13 | super();
14 | this.id = id;
15 | this.rollNo = rollNo;
16 | this.name = name;
17 | this.branch = branch;
18 | this.college = college;
19 | }
20 | public String toString(){
21 | return "Student [id=" + id + ", rollNo=" + rollNo + ", name=" + name + ", branch=" + branch + ", college=" + college + "]";
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------