A Simple Jsp Servlet Jdbc User Registration Example using Tomcat Mysql and Eclipse
ฝัง
- เผยแพร่เมื่อ 8 ก.ย. 2024
- A Simple Jsp Servlet Jdbc User Registration Example using mysql database, tomcat server and eclipse. Registration using jsp and mysql.
Step by Step User Registration tutorial using Jsp, servlets and database connectivity.
The control goes from the jsp registration page to a servlet on submiting the form. The servlet further talks with a dao class which contains jdbc code to insert data into the mysql database server.
For Source code with stpe by step instruction of this example check www.javatutoro...
For personal online java training please visit www.javatutoro...
A Simple Jsp Servlet Login Form Example • A Simple Jsp Servlet L...
ServletConfig & ServletContext Practical Example on a Project • ServletConfig & Servle...
A Simple Servlet example using Tomcat and Eclipse. • A Simple Servlet examp...
SendRedirect Vs RequestDispatcher • SendRedirect vs Reques...
Currently running 2022 and javax is replace to jakarta but your code is perfectly run without single error so special thanks to you... 🙏
Thanks
The only video I watched in the past 1 month that gave clear explanation and is actually working!! Thanks a lot sir. Keep up your good work.
Thanks
No words ....Thanks a lot
NICE, EXPLANATION, THANKS
Thank you so much for the to-the-point explanation and walking through the coding process. This is the best video I've seen after learning about Servlets and JSP.
Thanks a lot sir....your explanation is very cleared....this is the best TH-cam video
i stuck in simple syntax of connecting jdbc..............after watching ur video its resolved tq so much
I had understand better than my class 👌👌 Thnx sir
Keep going on
Sir,Thank you soo much sir with help of this code i had connected mysql successfully with help of jdbc.
Instablaster.
Bro can I get the code once....
Bro PlZz can u tell me how did u do ??
@@abhilashreddy0072 first connect the ecillipse idle to tomcat server and connect to MySQL server with help of JDBC then try to connect abhilash
Thank you so much for the beautiful explanation
Thanks a lot sir 😇😇😇
I used Oracle instead of MySQL … it worked perfectly fine
Thanks
this works fine...thumbs up to Sir. Brilliant explanation..
Will uh share me the code once...
Thank you so much sir
Super .....Pls make more vedios
I am having the error "registration/Register not found" can anybody tell me why the memberRegister.jsp page is not able to find the servlet page?
Awesome video🎥
Awesome sir worked perfectly 👍
Can you send the code...
You just saved me! Thanks. Please keep doing more videos.
Nice
Your videos are really good...do start your tutorials..it will be a great help
i got will be a great help... So Thank you so much
Thank you so much sir 🙏🙏🙏🙏🙏
Thank you this video is really helpful
I got following error HTTP status 500- Internal server error (Cannot invoke "java.sql.Connection.prepareStatement(String)" because "con" is null) How to solve this? plz help me.
very good explaination thx
u are my hero
This is GOLD!!!
Thanks
Anyone help i have error in con. Is null
Cannot invoke "Java.sql.Connection.prepareStatement(String) because con is null
Please tell me wt to do to solve this error
Thanks alot!!!!!!
Thank you very helpfull
superb sir
Thanks
Thank you so much sir, :))
hi sir why do we get served at: / register error? Looking forward for a reply, Thank YOU!!!
i have created dynamic web project but java resource folder is not available there plz if anyone know what to do then plz tell me
All is good, And Also after registering it also shows the data entered successfully message but the details are not able to save in my sql....
Pls reply
In member class when u created constructor using field
And deselected all
How the getUname and further set method are automatically generated?
While in my code only super(); is created after the procedure.
Can u help me with that.?
Right click, Go to Source>>Generate Getters and Setters
prepareStatement(sql) undifined?how i fix?thank you . this will work/(java.sql.Connection) con)
Thank you
hi sir ur explanation is wonderful sir. i want to practice this example can u please share this code if possible in any of ur github or anything.
Error .. resource Register is not available
Register is not available. How to resolve it?
I have a small doubt, After Successfully entering the data in to a my SQL , if I come back , my form data is as it is , so the form should be clear .
For that what can I do????
Thanks a lot..just a request- could you please share source code please?
Nice explanation but you didn't explain about web.xml file ,which is one that maps the servlet with jsp
The method prepareStatement(String) is undefined for the type Connection
I'm getting this error
some one hlep me
you have to add a libraby for that, click on 'x' and it will suggest you the required library
Very good video and explanation and i follow what you did but i get message data not entered.Error "Column count doesn't match value count at row 1". Can you help me please?
sir can you please tell me, which eclipse you are used
While running the final project, I am getting internal server error. What should I do?
I am getting an error:
SEVERE: Servlet.service() for servlet [Register] in context with path [/Registration] threw exception
java.lang.NullPointerException
at RegisterDao.insert(RegisterDao.java:40)
same for me.. did you resolve?
@@rajshekar1922 I am getting the same error, did anyone resolve this error?
I think this error is due to request.getParameter() throwing a null pointer exception, if you handle the null pointer exception by checking if the value is null or not it should work
@@sayan1193 How do you handle the null pointer exception? Can you provide the code?
Sir i got an error after entering data in web page that "requested resources is not available"
Can u keep unit testing also for these
it displaying data not entered i tried every possible way i hope so
even though java connectors jar file is in classpath, i am getting this exception - java.lang.ClassNotFoundException: com.mysql.jdbc.driver
Any suggestion to resolve that?
Change the sql statement as follows and try:
String sql = "insert into table_name(column1,column2,column3,column4,column5) values(?,?,?,?,?)"
It works for me
Same happens with me
"com.mysql.cj.jdbc.Driver" try this
Sir could you please help us to deploy this code on online platform so that it can be accessible using the link.
How an Http request coming at port 80 is forwarded to port 8080 of tomcat
How to use xampp's tomcat as server on eclipse?
java.lang.NullPointerException: Cannot invoke "java.sql.Connection.prepareStatement(String)" because "con" is null how can i fix this error?
r u clear this error bro
please help me :
Message Cannot invoke "java.sql.Connection.prepareStatement(String)" because "con" is null
@@sujeevanvengat7914 I fixed 5 months ago but I didn't remember :(
Hlo sir could u PlZz tell how it's going and storing in MySQL database it's urgent sir
Here is used my sql or not?
Sir, can u send the source code .
thx sir,
please link to download MysqlWorkbench
It's good but why are doing it so fast
How to solve this problem:
Cannot invoke "java.sql.Connection.prepareStatement(String)" because "con" is null
Same??
@@manishgowdans136 yeah boy!
U got the solution??
@@manishgowdans136 yes.
Can you share it please
Hlo sir I have a small dout
I don't really understand why you created the member class :(
just to use OOPs concepts and send a single object instead of calling the insert function with 4 parameters. Both methods are valid.
Sir m facing 404 error in server ....I have checked evry possibility of solving it I did also but also it's showing...
Please give any suggestions
Type the name of your jsp file at the end of url tom cat server. Hope it helps.:-):-)
Con is null showing error
I have 404 errorwhile run these code
can you do it without using java file.. use jsp files only
Yes can be done
@@JavaTution i did but i couldn't able to use mysql properly.. i created a table in mysql and inserted some random entry like user name and password and I tried to login using that data but it was showing me the class file name only on a web page maybe something wrong in coding or mysql connection
Sir dynamic web project ka option hi nhi arha
Use eclipse for EE developers
sir i need this program please give me sir 🧡🧡🧡🧡🧡
public String insert(Member member)
{
loadDriver(dbdriver);
Connection con=getConnection();
String result="Data Entered successfully";
String sql="insert into userdb.member values(?,?,?,?) ";
try {
PreparedStatement ps = con.prepareStatement(sql);
ps.setString(1,member.getUname());
ps.setString(2, member.getPassword());
ps.setString(3, member.getEmail());
ps.setString(4, member.getPhone());
ps.executeUpdate();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
result="Data not entered";
}
return result;
I used the same code...
but still getting this error
Sir source code mill skta???
import com.sun.java.util.jar.pack.Package.Class.Member;
this file is not getting imported , so Member class isn't working, I tried to find this jar file but couldn't.
Import java.lang.reflect.Member
Error while getting member.getuname
import member class
user member instead of Member
Thank u so much sir