Good morning sir, I tried to follow your tutorial on registration page using jsp and mysql. Although the registration part is working successfully but in the database I am getting null values in the firstname,lastname and contactname columns. I tried to add latest version of jar dependency file of jsp-api and servlet-api but no change. I would be grateful if you resolve this issue
If you are using mysql connector for My SQL 8.0 later, you should code like this. Class.forName("com.mysql.cj.jdbc.Driver"); If not, you will see class.forname error. Any how, This video is useful. Thank you for your contribution!
Dude this is the best Java video on the internet. Ok I need to follow this guy because the way he did the initial explanation and then the follow up was perfect 10 out of 10 mate. 10 out of 10👏🏿👏🏿👏🏿👏🏿👏🏿
Thanks for uploaded bro......most important and usefull information i suffered min 2 months..... i leared core java and advance java i did not connect to mysql server ..in servelet pages .... your video seen i learned so many information......and i jain the knowledge .....thank you bro............
It was well explain and wondorful...its what i was looking for ... I wanted to do this kind of application with two severs .there is a lot to learn .... I will be looking forwards to see more of this kind...Thanks Manohar
Perfect way of learning and you are the only one who make it easy to understand the structure of working this which no was explaining and they just jump to the coding. Thanks
Hi HTTP Status 404 - Not Found Type Status Report Message The requested resource [/registration-jsp-servlet-jdbc-example/] is not available Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Apache Tomcat/9.0.62 (getting this error help me)
🎯 Key Takeaways for quick navigation: 00:00 🌐 The video focuses on creating a web application with a registration form using JSP, Servlet, and MySQL technology stack. 01:32 🏗️ Model-View-Controller (MVC) design pattern separates application logic from the user interface, with layers for model, view, and controller. 03:46 🧰 Tools and technologies used include Eclipse IDE, JDK 1.8, Apache Tomcat, JSP, Servlets, and MySQL JDBC Connector. 06:05 🏗️ Development steps include creating an Eclipse dynamic web project, adding dependencies, setting up the MySQL database, creating Java classes (Employee, EmployeeDao, EmployeeServlet), and designing JSP pages. 13:46 ⚙️ Configuring Apache Tomcat server in Eclipseand handling HTTP POST requests in the Servlet. 20:17 📝 Designing JSP pages for user interaction and displaying success messages. 21:35 🔄 Handling HTTP GET requests in the Servlet, forwarding requests to corresponding JSP pages using RequestDispatcher. 24:48 🚀 Demonstrating the application by submitting the registration form, storing data in MySQL, and verifying the record in MySQL Workbench. Made with HARPA AI
Really sir thank youuu soo much....I tried a lot to understand what exactly the flow of those doget and dopost methods but I failed many times..but this tym I got some clarification...thank you so much and hope ur videos will give us more knowledge in different technical platforms.....
Hi dear HTTP Status 404 - Not Found Type Status Report Message The requested resource [/registration-jsp-servlet-jdbc-example/] is not available Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Apache Tomcat/9.0.62 (getting this error help me)
@@kirankhandade1387 the path for jsp is not correct, click on jsp file , do a right click and select copy qualified name in eclipse and paste in on place of /registration-jsp-servlet-jdbc-example/. hope it helps
If u r refreshing the sql database and its not inserting any new rows make sure to : -add the suffix ?useSSL=false&serverTimezone=UTC at the end of the database link which starts with localhost:3306... -auto index the id in the creation of the database. -in the database link use ur own database name meaning replace mysql_database with ur own database name in mysqlworkbench.
HTTP Status 404 - Not Found Type Status Report Message The requested resource [/jsp-servlet-jdbc-mysql-example/register] is not available Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Apache Tomcat/9.0.71
idk if you're still checking comments but is there a reason you write your own servlet because I thought that JSP would automatically translate the Java code in the HTML to a servlet script
I am getting error HTTP Status 404 - Not Found Type Status Report Message The requested resource [/registration-jsp-servlet-jdbc-example/register] is not available Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Apache Tomcat/9.0.50
@@trishaannbrown-santos472 Yes, in project preferences project facets version have to be the same than in web.xml file and java compiler should be 1.8 version. Also, clean tomcat server, it keeps the wrong data.
such a great work sir .Im following hard coded aspect using jsp but this is to easy than previous as i following it. feeling like i studied new thing using opps concept.
Very helpful tutorial. Thank you. As I am new to dynamic web development I have a query, I already have static HTML web pages and as I want to convert it into dynamic page so can I use servlet with my existing HTML pages or do I have to convert all my pages to PHP?
HI Sir, can you also add one installation and setup guide for IDE setup and connecting to database and adding tomcat server in eclipse for development setup
The data is stored on the database. The table should be created like this. AUTO_INCREMENT should be used for the id. CREATE TABLE employee ( id INT(11) AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(250) NOT NULL, last_name VARCHAR(250) NOT NULL, username VARCHAR(250) NOT NULL, PASSWORD VARCHAR(250) NOT NULL, address VARCHAR(250) NOT NULL, contact VARCHAR(250) NOT NULL ); DAO class should be like this. *********************** public class EmployeeDao { public int registerEmployee(Employee employee) throws ClassNotFoundException { String INSERT_USERS_SQL = "INSERT INTO employee " + "(first_name, last_name, username, password, address, contact) values " + "(?, ?, ?, ?, ?, ?);";
In the EmployeeDao, remove id from the Insert_User_SQL. Then remove one of the ? place holders so that there is one less and change your preparedStatement indexing so that getFirstName is at index 1 and not 2 as it is currently. Else, you'll be getting an error because id should be auto incrementing but we've hardcoded it as 1
i am trying to create table in workbench but it's gives me errors i don't know why. this is the error 00:37:27 CREATE TABLE `employee` ( 'id'int(3) NOT NULL AUTO_INCREMENT, 'first_name' varchar(20) DEFAULT NULL, 'last_name' varchar(20) DEFAULT NULL, 'username' varchar(20) DEFAULT NULL, 'address' varchar(50) DEFAULT NULL, 'contact' varchar(40) DEFAULT NULL, PRIMARY KEY ('id') ), ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE-utf8mb4_0900_ai_ci Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''id'int(3) NOT NULL AUTO_INCREMENT, 'first_name' varchar(20) DEFAULT NULL, 'last' at line 2 0.000 sec
Why are you using setters instead of using the contractor? A contractor is used to create objects while the setters are used to update an object. Right?
Hi Ramesh , Getting below error , my tomcat server running fine but this path is not accessible via tomcat server Error: HTTP Status 404 - Not Found/[/employeeregister.jsp] not found
@@rickmorty9057 if you are using servlet, make sure that the annotation or the path you gave in xml are proper! Yea page might be there but see in which folder is the page present exactly!
may I ask why does my sql workbench not update when I register? It says that I registered successfully but when I checked my workbench the user data is still not there.
This video is very helpful to learn how JSP, Servlet orJDBC work...Sir i have tried same example but I'm unable to insert the data into Mysql DB or redirect it on successful page. I have replicate same code as it is as you have done in this video. Sir ,can you please help me to resolve my issue :how to redirect the page after successfully insert the data into db.
very helpful tutorial....Thank you sir ........sir can you make crime record management system project using mysql databse and STS/Eclipse ..like this project step by step...please sir
Recommended video tutorials: Login Form using JSP + Servlet + JDBC + MySQL Example at ua-cam.com/video/UBOZgNxsiwA/v-deo.html
Good morning sir, I tried to follow your tutorial on registration page using jsp and mysql. Although the registration part is working successfully but in the database I am getting null values in the firstname,lastname and contactname columns. I tried to add latest version of jar dependency file of jsp-api and servlet-api but no change. I would be grateful if you resolve this issue
@@manutyagi8019 8i88iiiiiiiiiiiiiiiiiiiiiiiiiiiijiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiilo9uii
@@manutyagi8019 bro i am dealing with the same problem right now , have u rseolved it??
Perfect example to begin with developing JSP and servlet web application. Audio is excellent and thanks for improving audio quality.
If you are using mysql connector for My SQL 8.0 later, you should code like this. Class.forName("com.mysql.cj.jdbc.Driver"); If not, you will see class.forname error. Any how, This video is useful. Thank you for your contribution!
Dude this is the best Java video on the internet.
Ok I need to follow this guy because the way he did the initial explanation and then the follow up was perfect 10 out of 10 mate.
10 out of 10👏🏿👏🏿👏🏿👏🏿👏🏿
mere bhai apne aaj maze maze mein poora sikha diya.....god bless you
You´re a great teacher and person!!, finally i does work this program in JEE. Thank you very much.
Thanks for uploaded bro......most important and usefull information i suffered min 2 months..... i leared core java and advance java i did not connect to mysql server ..in servelet pages .... your video seen i learned so many information......and i jain the knowledge .....thank you bro............
खरोखर उत्कृष्ट....tutorial ... Keep it up ...
Notes for self:
5:25 - database
10:40 dao - user repo
12:30 13:38 - Servlet
17:20 error
18:23 JSP frontend
Dao implementation done in servlet ? Why not dao impl.? Can you pls let me know
Ty man i think Indians are on a different level
It was well explain and wondorful...its what i was looking for ... I wanted to do this kind of application with two severs .there is a lot to learn .... I will be looking forwards to see more of this kind...Thanks Manohar
Thank you sir i completed my first ever servelt project,yes i did copy paste but I will learn end to end and build my own project❤
I love it all, thank you very much for the lessons. Am so happy getting these concepts. Glory be to God Almighty.
This tutorial is fantastic! I want to express my gratitude to you, mate!
worst tutorial
@@Atulkumar-hi4tf Kyu bhai nahi samjh raha?
@@shubhamdarge2267 for biginners its difficult to understand ur coding.
10 line :-
ENGINE=InnoDB..............
Line ka mtlb kya hai ?
@@Atulkumar-hi4tf Google it, not that difficult to understand, didnt even need to write that ENGINE=.... statement.
CTt,ঐ,্ন@05871
,
Perfect way of learning and you are the only one who make it easy to understand the structure of working this which no was explaining and they just jump to the coding. Thanks
Hi
HTTP Status 404 - Not Found
Type Status Report
Message The requested resource [/registration-jsp-servlet-jdbc-example/] is not available
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.62 (getting this error help me)
You are the best sirr!!!! This tutorial series is perfect , highly recommended. Your website also very important. Keep it up sir
🎯 Key Takeaways for quick navigation:
00:00 🌐 The video focuses on creating a web application with a registration form using JSP, Servlet, and MySQL technology stack.
01:32 🏗️ Model-View-Controller (MVC) design pattern separates application logic from the user interface, with layers for model, view, and controller.
03:46 🧰 Tools and technologies used include Eclipse IDE, JDK 1.8, Apache Tomcat, JSP, Servlets, and MySQL JDBC Connector.
06:05 🏗️ Development steps include creating an Eclipse dynamic web project, adding dependencies, setting up the MySQL database, creating Java classes (Employee, EmployeeDao, EmployeeServlet), and designing JSP pages.
13:46 ⚙️ Configuring Apache Tomcat server in Eclipseand handling HTTP POST requests in the Servlet.
20:17 📝 Designing JSP pages for user interaction and displaying success messages.
21:35 🔄 Handling HTTP GET requests in the Servlet, forwarding requests to corresponding JSP pages using RequestDispatcher.
24:48 🚀 Demonstrating the application by submitting the registration form, storing data in MySQL, and verifying the record in MySQL Workbench.
Made with HARPA AI
Thank you mate, this video is super helpful for me, literally saved me hours of learning how to build a similar function for my project!
Glad it helped
HI! Bro, clear explanations on how to register webpage in JSP with step by step.keep it up and post more videos on further
Really sir thank youuu soo much....I tried a lot to understand what exactly the flow of those doget and dopost methods but I failed many times..but this tym I got some clarification...thank you so much and hope ur videos will give us more knowledge in different technical platforms.....
Hi dear
HTTP Status 404 - Not Found
Type Status Report
Message The requested resource [/registration-jsp-servlet-jdbc-example/] is not available
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.62 (getting this error help me)
@@kirankhandade1387 the path for jsp is not correct, click on jsp file , do a right click and select copy qualified name in eclipse and paste in on place of /registration-jsp-servlet-jdbc-example/. hope it helps
Thanks for this video.God bless you&your family.This is useful to improve my knowledge in this word
thank u so much.. for such nice video and the source code
Hlo
Aapne kon se IDE pe code kiya hai...???
Awesome content i am starting jsp from now
Thanks for helping us 🥰
Going to give an interview tomorrow, this has been like a crash course to me, thanks a lot haha
Awesome teaching sir way of explaination is simply super sir
Excellent vídeo .... Congratulations
great video helped me to understand jsp,servlet,jdbc, mvc pattern and mysql database
Thank you for this tutorial although I got stucked most of the time running the tomcat in eclipse. Still managed to finish and run the form. Thanks!
Try this for an alternative: Login form online without hosting with google apps script ua-cam.com/video/zbH-6r2QjP4/v-deo.html
Very good job done...i will try and keep u posted
Thank you so much , this is the only thing I can say now :))) your videos are so helpful
this video is very helpful my first task
Thanks bhai great tutorial ❤
Very good video. It helped me a lot during my Master's project.
If u r refreshing the sql database and its not inserting any new rows make sure to :
-add the suffix ?useSSL=false&serverTimezone=UTC at the end of the database link which starts with localhost:3306...
-auto index the id in the creation of the database.
-in the database link use ur own database name meaning replace mysql_database with ur own database name in mysqlworkbench.
same issue
i have followed all the mentioned steps..but it is again not working
Really this video' is more useful to me
Thanks, I went straight into JSF + Hibernate from another language so this was all very informative.
HTTP Status 404 - Not Found
Type Status Report
Message The requested resource [/jsp-servlet-jdbc-mysql-example/register] is not available
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.71
Getting same error bro, have you resolved
Change dependency to Jakarta servlet api
It will work
idk if you're still checking comments but is there a reason you write your own servlet because I thought that JSP would automatically translate the Java code in the HTML to a servlet script
It Helped me alot such a great vedio keep going 👍
Thanks for wonderful video 🙂🙂🙂
Tqq for clear explanation.....keep doing
Thank you brother! Amazing work
You are very amazing, thanks for your nice tutorial.
For learning propouses it's ok however it's stuck in time so my advice is go learn spring and spring boot tho
thank you for this video, it helped me to solve my problem. Like!
Its very useful ..Thankyou
Great content and thanks for sharing.
Why do you thing might be the issue when data are not being stored in the db
coz I have this probleme. Thanks
Thanks a ton! Your tutorial helped me a lot.. :)
Thank you so much it was so helpful sir
I am getting error
HTTP Status 404 - Not Found
Type Status Report
Message The requested resource [/registration-jsp-servlet-jdbc-example/register] is not available
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.50
have you resolved it yet? I have the same problem
@@trishaannbrown-santos472 Yes, in project preferences project facets version have to be the same than in web.xml file and java compiler should be 1.8 version. Also, clean tomcat server, it keeps the wrong data.
thanks for the video. please can you tell me how did you add the four dependencies to the lib file?
such a great work sir .Im following hard coded aspect using jsp but this is to easy than previous as i following it. feeling like i studied new thing using opps concept.
Great. Keep leaning 👍
Thank you for the VIDEO
Very helpful tutorial. Thank you. As I am new to dynamic web development I have a query, I already have static HTML web pages and as I want to convert it into dynamic page so can I use servlet with my existing HTML pages or do I have to convert all my pages to PHP?
Have u got the answer can u share it?
This is good explanation with the mapping where the puzzle put it together, thanks once again.
Provide me link for downloading required jar files. Its urgent
Tysm sir , well explained.
is it me or you can just add one employee?
Your video helped me a lot, thaaaaanks!
yah the id is duplicating with hard coded 1, dm me if you find a way to to this
where do I get the jar files from and how do I add them to the lib folder?
why you have 2 employeservlet? i don't know why you just skips the video.
HI Sir, can you also add one installation and setup guide for IDE setup and connecting to database and adding tomcat server in eclipse for development setup
Hi..,
I'm not getting that WebContent folder automatically when I create dynamic web project..?
Thanks for the tutorial
Please make a video on SpringMVCCRUD example with mysql jdbc
The details are not showing in the table at workbench.
The data is stored on the database. The table should be created like this. AUTO_INCREMENT should be used for the id.
CREATE TABLE employee
(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(250) NOT NULL,
last_name VARCHAR(250) NOT NULL,
username VARCHAR(250) NOT NULL,
PASSWORD VARCHAR(250) NOT NULL,
address VARCHAR(250) NOT NULL,
contact VARCHAR(250) NOT NULL
);
DAO class should be like this.
***********************
public class EmployeeDao {
public int registerEmployee(Employee employee) throws ClassNotFoundException
{
String INSERT_USERS_SQL = "INSERT INTO employee "
+ "(first_name, last_name, username, password, address, contact) values "
+ "(?, ?, ?, ?, ?, ?);";
int result = 0;
Class.forName("com.mysql.jdbc.Driver");
try(
Connection connection = DriverManager.
getConnection("jdbc:mysql://localhost:3306/java", "root", "");
PreparedStatement preparedStatement = connection.prepareStatement(INSERT_USERS_SQL);
)
{
preparedStatement.setString(1, employee.getFirstName());
preparedStatement.setString(2, employee.getLastName());
preparedStatement.setString(3, employee.getUsername());
preparedStatement.setString(4, employee.getPassword());
preparedStatement.setString(5, employee.getAddress());
preparedStatement.setString(6, employee.getContact());
System.out.println(preparedStatement);
result = preparedStatement.executeUpdate();
}
catch(SQLException e)
{
e.printStackTrace();
}
return result;
}
}
why most of the java devs prefer Eclipse IDE. why not VSCode ?
Because Eclipse is Mainly Designed only for Java developer so...this platform is very efficient
@@shreelakshmi4416 And What about intelliji idle
Perfect example.
I followed each and every step there is no error in code but I get 404 error.. please help me..
I run thruogh other browser by putting 'register' name then also it fails.
You may have probably missed a / in your code before register.
Great content, thanks, helped a lot
In the EmployeeDao, remove id from the Insert_User_SQL. Then remove one of the ? place holders so that there is one less and change your preparedStatement indexing so that getFirstName is at index 1 and not 2 as it is currently. Else, you'll be getting an error because id should be auto incrementing but we've hardcoded it as 1
Yes, The id in the table should be auto increment. Else we'll get an error stating duplicate entry as we declared id as primary.
very nyc video thanks alot
nice good video for everyone
i am trying to create table in workbench but it's gives me errors i don't know why. this is the error
00:37:27 CREATE TABLE `employee` ( 'id'int(3) NOT NULL AUTO_INCREMENT, 'first_name' varchar(20) DEFAULT NULL, 'last_name' varchar(20) DEFAULT NULL, 'username' varchar(20) DEFAULT NULL, 'address' varchar(50) DEFAULT NULL, 'contact' varchar(40) DEFAULT NULL, PRIMARY KEY ('id') ), ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE-utf8mb4_0900_ai_ci Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''id'int(3) NOT NULL AUTO_INCREMENT, 'first_name' varchar(20) DEFAULT NULL, 'last' at line 2 0.000 sec
CREATE TABLE `employee` (
`id` int(3) NOT NULL AUTO_INCREMENT,
`first_name` varchar(20) DEFAULT NULL,
`last_name` varchar(20) DEFAULT NULL,
`username` varchar(250) DEFAULT NULL,
`password` varchar(20) DEFAULT NULL,
`address` varchar(50) DEFAULT NULL,
`contact` varchar(40) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
thanks so much for the video
davvero utile grazie mille!
Thanks for this video sir
Please sir what of one field does not contain value.will it still load to the database or it throws an exception
i am thankfull to this tutorial
nice explanation
Why are you using setters instead of using the contractor? A contractor is used to create objects while the setters are used to update an object. Right?
This tutorial is fantastic! Thank you for this tutorial
but sir i m not download from github whole code so plz tel me how to download
There is option to clone or download the GitHub project
@@JavaGuides Hi, I don't see any data in the table in SQL workbench after running the project in Eclipse.
Hi Ramesh ,
Getting below error , my tomcat server running fine but this path is not accessible via tomcat server Error: HTTP Status 404 - Not Found/[/employeeregister.jsp] not found
that page might not be present!
@@akshaypendyala Page exist on path bro but still not able to access on server
@@rickmorty9057 if you are using servlet, make sure that the annotation or the path you gave in xml are proper!
Yea page might be there but see in which folder is the page present exactly!
@@akshaypendyala where is XML in video??
@@FoodLover1309 Actually you need to provide the redirect in an XML file! Otherwise, you cannot go from one page to another!
Sir please make a video big new java project using jdbc ,java ,servlet mysql, jsp.
do you know in eclipse dynamic project how to enable option of view source & design same time
I like it. But where is link to download the project?
Check video description for GitHub link.
Thanks for your project.
Thank you so much Sir.
may I ask why does my sql workbench not update when I register? It says that I registered successfully but when I checked my workbench the user data is still not there.
Sir jsp servet se koi web application banate hn then is ko host krni parti ha ya automatically host ho jate h through tomcat server?
This tutorial is really good for beginners.. but i am not able to insert into my database though it's not showing any error... pl guide
same
same
its not working its showing error
This video is very helpful to learn how JSP, Servlet orJDBC work...Sir i have tried same example but I'm unable to insert the data into Mysql DB or redirect it on successful page. I have replicate same code as it is as you have done in this video. Sir ,can you please help me to resolve my issue :how to redirect the page after successfully insert the data into db.
same issue...did it resolved for you?
same issue plz help i m a beginner
How do we read from database and display the same on JSP
my mysql database is not getting updated like yours? what could i be doing wrong
very helpful tutorial....Thank you sir ........sir can you make crime record management system project using mysql databse and STS/Eclipse ..like this project step by step...please sir
Sir, .jsp portal secured or .net portal secured (For Transactional purpose) please suggest..
How to add jar files in lib folder
C: Apache : lib: servelet.jar copy path and paste in lib of webapp
Sir the form is also made and while entering data also it is showing Employee successfully registered but in MySql the date is not showing
Then how to make the appearance of the web have CSS ? can u tll us?
why we should we add register in the last at the browser