#5 Servlet and JSP Tutorial | Create Servlet and web.xml Config
Ғылым және технология
Check out our courses:
Spring and Microservices Weekend Live Batch : bit.ly/spring-live-weekend
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : bit.ly/java-spring-cloud
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusko.com/
Instagram : / navinreddyofficial
Linkedin : / navinreddy20
TELUSKO Android App : bit.ly/TeluskoApp
Discord : / discord
Complete Servlet and JSP playlist : goo.gl/pKFeSv
In this video will see the handelling of request and response objects using servlet.
We will see :
- Form handling
- Create new Servlet class which extends HttpsServlet
- service() method
- Request object
- Response object
- Passing value
- request.getParameter method
- Query String
- Deployment Descriptor
- web.xml file
- servlet and servlet-mapping tags
- Fully qualified name
- Accepting values from user
- Printing the result on page
A servlet is a Java programming language class that is used to extend the capabilities of servers that host applications accessed by means of a request-response programming model.
Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by web servers. For such applications, Java Servlet technology defines HTTP-specific servlet classes.
The javax.servlet and javax.servlet.http packages provide interfaces and classes for writing servlets.
All servlets must implement the Servlet interface, which defines life-cycle methods. When implementing a generic service, you can use or extend the GenericServlet class provided with the Java Servlet API.
The HttpServlet class provides methods, such as doGet and doPost, for handling HTTP-specific services.
Java and Spring Framework For beginners with Spring Boot : - bit.ly/3LDMj8D
Java Tutorial for Beginners (2023) :- bit.ly/3yARVbN
Editing Monitors :
amzn.to/2RfKWgL
amzn.to/2Q665JW
amzn.to/2OUP21a.
Subscribe to our other channel:
Navin Reddy : kzread.info/dron/xmk.html...
Telusko Hindi :
kzread.info/dron/itz.html...
Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
www.telusko.com/contactus
Пікірлер: 365
I've been looking for someone to teach me how to deploy java programs that we learned in school into a website. this channel is exactly what I was looking for. THANK YOU SO MUCH
I don’t understand why lecturer’s in clg make this simple topic look so complicated with their teaching . Really your teaching helped sir . Thank you ❤️
I cant thank you enough for putting up these videos for us to learn. There's no other video in the whole of youtube that is as useful and good as this. Thank you is all I can say.
seriously you are my SAVIOR 😭 I had been struggling a lot from understanding how to do these codings... THANK YOU SO MUCH!!!!!
I dont even know what I will do without you my dear teacher....!!!! I started practicing servlet and getting error out of the world. I searched all websites, stackoverflow,stackexchange,etc.... and lot of unknown name websites.... After that I watched your playlist and started practicing ... THE END!!!!!!!! No words can describe my thank to you. You are the BEST!!!!!!!!!!!!!!!!!!!!!!!
Thank you very much sir... because of your tutorial,I am able to understand better these concepts otherwise, I have spend lakhs of rupees on my degree but not interested in classroom lectures. KZreadr like you and other are making a good software developer who has good concepts of the subject. love you sir....♥️♥️♥️♥️
I am coming from .Net background! Needed to learn JSP to work on in one of the project, I felt Servalet and web.xml is so funny ! You are great teacher and have real good teaching method. I love the way you explain in depth. I enjoyed it. Thank you for making this video.
Amazing. This was hands down the best video I have seen on your channel. Keep up the good work. I will surely meet you if you're in Mumbai!
Sir u are really splendid. Your explanation is simplified and crystal clear. Also ur communication skill is damn good. Thanks for such tutorials which makes learning a fun.
Now Java Servlet make sense to me big thanks on your step-by-step playlist 💯
Thanks , man for your all tutorials and videos ! You are exactly person who we are looking for !
the best teaching technique i have ever seen. appreciate your time . thank a lot
Very clear, thank you. My database professor simply said final project is a web application, use whatever. :'D I used some javascript last year but I don't remember much, we've just finished a project using jdbc, so I understand that well enough, but for the in-between I had no idea.
Thank you very much. The way to create the problem intentionally and tell the solution was best!!
@lodashnotebook5390
4 жыл бұрын
Yeah. That comes thru practice. But I knew Sysout prints to the console so I caught that one!
Best video series for Adv. java. Just learning in advance so that i can laze around in class and only do practicals instead of theory hahaha 😂
I really like of your classes, very good! Do you use servelets in your projects?
You are a blessing, sir. Keep doing the good work ❤️
Thank you so so so much Sir.....I don't understand this at the class ....but after watching this video I understand all this things.....😍 keep doing sir😍👍🏻
your videos always provides the best information .....thank you
Hi Naveen , great tuts.. Thanks for helping us... Had a small confusion.. Coming to servlet mapping , i do not have the tags in web.xml, yet my servlet deployed properly. Also while creating the servlet, in deployment description window, i mentioned a vague path to test like "/anything/test" , but it deployed again properly.. How was that?
Thank you soo much sir!!! I was trying to run servlets for 2 days!!
This is hands down the best. End of story
Thanks, I really need to understand how web.xml works so this was a help
i was struglling for last 4 hrs, finally tqqqqqqqq
THANK YOU SIR, you Cleared this Concept in Java ....
thankyou bhaiya your playlist are amazing..u really teach well
Best video on servlet, simple and clear.
Hello sir I have got 1 error of 404. Says that, " the origin server did not find a current representation for the target resource or is not willing to disclose that one exists. "
@sita476
2 жыл бұрын
Have you resolved it?
Hi....Naveen Sir, why do we write "/add" instead of "add" at the tag in web.xml file
you have named your texts num1 and num2 and in AddServlet class when you request parameter you write "num1" and "num2" are those have to be the same?
You are a very good teacher sir.
Sir you are amazing i understand very much from your tutorials and in my college there are faculties which have nothing knowledge to teach us Even they don't know how to print hello world in any programming language
The origin server did not find a current representation for the target source or is not willing to disclose that one exists. I had that kind of problem and I solved it. I deleted eclipse and tomcat. and again I downloaded and installed them and it finally works. cheers :)
Thank you Navin... It's truely amazing and thanks again
Wow.... your Explanation is great sir
Jeez Thanks a lot I owe my life to this vid
In my web.xml file there is a predefine code of 4726 lines but in your case there are only 16 line how to resolve this?
Super tutorials by superman! Lol
I have one doubt. in this tutorial, u created one HTML file under web content. so it's default location. if I have many HTML files how I host the all HTML files from separate folder .ex webcontent/html/index.html is possible .if possible how to do that.
Awesome tutorial, thanks!
This was a very helpful video indeed.. thank you
Awesome channel for me . Salute to you Sir..
you have amazing knowlegde sir...hatts off to you and thanks for sharing...
Excellent Content, well explained, well programmed
Sir i'm doing this same thing PrintWriter out = res.getWriter(); out.println("REsult"); but result is still showing on console. what should i do now sir help me.
thanks sir for this lucid way of teaching....
PLZZZ HELP ME WITH THE DOUBT!! We can use doGet() instead of using service() right?? if yes then how is using service() different from using doGet()
Sir Please help me, does index.html is the one where program started running ? Who initiated the program ?
Thank you very much, very well explained.
very clear explanation ..great tutorial
im trying to do the same, servlets with jsp in tomcat, but using maven aswell, i have this problem at the beginning were i couldnt get to the servlet, i tried putting the servlet and the servlet -mapping in the xml, but whe i run it on the server i got an error, then i deleted what i put in the xml, saved, and then run it normally, after it i tried to get to the servlet and it worked..., so, to make sure it worked, i put more responses on it, but i wasnt gettig the new responses, even when i did what i did in the xml, any solution?
You helped me a lot. Thank you!
Thank you sir very well explain you make it very easy to learn
Eclipse: Missing web.xml file? How can I create web.xml in Eclipse? DemoApp Right Click Java EE Tools Generate Deployment Descriptor Stub after that you got the web.xml file
@erickresurreccion5716
3 жыл бұрын
why i cant click generate deployment descriptor stub?
@dogukanteber4007
3 жыл бұрын
thank you man
@amanjethaniya7011
3 жыл бұрын
thanks
@nirbhay6638
3 жыл бұрын
@@erickresurreccion5716 hey did you get how to do?
It says unable to resolve javax.servlet. Also while trying to add external jar the button is greyed out. This is very frustrating
Great explanation dear navin. thanks
Thanks you so much sir for your efforts and dedicated to teach 🔥🔥🔥🔥🔥🔥
hi.. Navin sir.. thanks a lot for your wonderful videos. I have been following you quite a lot. But I do have some problems in mycode, just like you, I used the PrintWriter object to print the result in the browser, but for some reason, it is not printing out anything on the browser. However, it prints in the console. It didn't work even after I used the flush method. So, please help me out figure the mistakes, if i did any. Thanks and looking forward to hearing from you soon.
i am getting the error... The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. i have tried all the possible solutions.. but still getting the Error Please help..
@jayeshkhosla5710
5 жыл бұрын
Problem solved: Edit your url-pattern "/***" to exact keyword what it is, if it is case sensitive.
@sushmithar9343
4 жыл бұрын
@@jayeshkhosla5710 sorry i can't get you
you make it everything easy
Thanks, that helped a lot!
It is very helpful....thank u very very much!!!
Iam always Thanking You Sir❤
If HttpServlet is an inteface then why we are extending it we should impliment it but rater than using impliment key we are using extends keyword reason behind it?
hey can you tell me why internal browser is desabled in eclipse .by the way i am using ubuntu.please solve my issue
How we can call service with multiple url , like I want same functionality with different url. Ex. /add and /service/V2/add
i'm getting http status 500 what to do sir?? the output is also not displaying in console......
@amitrathod1134
3 жыл бұрын
It is an Internal Server Error. The reason for that can be your server is not yet started or not properly configured.
thank you so much, bro. It helped me a lot
Can't we print the result on the same page where we gave the input?If yes, then how?
Great Lecture sir!
i m facing class not found exception on this code . Please tell me how to resolve it .
Keep teaching bro❤️🙂
sir, thank you for your great tutorial
Thankyou sir its really awesome.
you are the best one !
I am still getting error in web.xml page It says 'The Value of 2.5 of attribute version on element web app is not valid with respect to its type How to solve this error ?
i have no option of HttpServlet class extendable so what can do for it
so far soo good sir ji , thanks a lot
Amazing tutorial helped a lot
Sir You're awesome ❤️
sir i got a exception like com.telusko.AddServlet cannot be cast to javax.servlet.Servlet
Can you please help me with the problem i am facing. After writing all exactly as told in the tutorial web.xml is creating the error if I give the name under url pattern exactly as in html files action. the error i get is: "starting Tomcat V9.0 server at localhost has encountered a problem. Tomcat V9.0 server at localhost failed to start"
@wholeegg
4 жыл бұрын
use /add in the HTML file you created
When I am refreshing it is not taking me to the index page...it is staying on the same page with that addition output...any idea how to fix it???
Sir please share the complete playlist of java networking too.
My project doesn't have this web.xml file. I tried to created by myself but it's full of errors
Why it doesn't work when we don't do web.xml code here and write instead?
@tejaswibhargava8745
4 жыл бұрын
for that, you need to select version 2.5 while creating the dynamic web app so it will automatically generate the .XML file and later you can use the tag
Sir instead of javax .... Eclipse showing Jakarta And showing warning as Javax can not be resolved .... Can u please tell any solution to this?
Sir can you please help me I am getting "Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase this warning" sir.. 🙏🙏🙏
hllo sir program run krne pe numberformatexception aa rha h on firefox browser why ??
sir when i use com.myname.AddServlet in tag in web.xml my apache server is giving error...its showing localhost failed to start..when i use only AddServlet server starts without any problem. and after using only AddServlet its showing Error instantiating servlet class...so how can i use com.myname.AddServlet and start the server withour any problem plz help.
Really you are so amazing sir
boss httpservlet is not there, and if I try to add a jar from outside then the annotation part doesn't work... please help
great tutorial sir, I request you to provide the source code you are writing.
hi naveenwhat is that "abc" in servlet name tag it isnot mentioned anywhere othrthan that servlet name tag
Instead of taking server rather than class how can we write program with servlet
i didnt get web.xml file in my eclipse environment . what should i do?
The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. plss help ,me why i m getting error
lots of love sir
Even after mapping in web.xml file, it is not jumping into next page to show output, it is just showing 404 error after clicking in submit button
What exactly do we have to put in web-app config?Is it based on which version of tomcat we use?
@leonelnascimento5078
6 жыл бұрын
There you just map the servlets to call with each request...