#5 Servlet and JSP Tutorial | Create Servlet and web.xml Config
Vložit
- čas přidán 5. 08. 2024
- 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 : czcams.com/channels/xmk.html...
Telusko Hindi :
czcams.com/channels/itz.html...
Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
www.telusko.com/contactus - Věda a technologie
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. CZcamsr 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.
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 💯
the best teaching technique i have ever seen. appreciate your time . thank a lot
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!
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 😂
Thanks , man for your all tutorials and videos ! You are exactly person who we are looking for !
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!!
Yeah. That comes thru practice. But I knew Sysout prints to the console so I caught that one!
your videos always provides the best information .....thank you
This is hands down the best. End of story
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?
i was struglling for last 4 hrs, finally tqqqqqqqq
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😍👍🏻
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 :)
I really like of your classes, very good!
Do you use servelets in your projects?
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?
Thanks, I really need to understand how web.xml works so this was a help
Thank you soo much sir!!! I was trying to run servlets for 2 days!!
Hi....Naveen Sir, why do we write "/add" instead of "add" at the tag in web.xml file
Best video on servlet, simple and clear.
You are a very good teacher sir.
thankyou bhaiya your playlist are amazing..u really teach well
THANK YOU SIR, you Cleared this Concept in Java ....
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.
its coming error while importing java servlet.http.HttpServlet can anyone help me
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. "
Have you resolved it?
Wow.... your Explanation is great sir
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.
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?
This was a very helpful video indeed.. thank you
Awesome tutorial, thanks!
very clear explanation ..great tutorial
Super tutorials by superman! Lol
Excellent Content, well explained, well programmed
thanks sir for this lucid way of teaching....
Awesome channel for me .
Salute to you Sir..
you have amazing knowlegde sir...hatts off to you and thanks for sharing...
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()
Great explanation dear navin. thanks
You helped me a lot. Thank you!
Thank you very much, very well explained.
Sir Please help me, does index.html is the one where program started running ? Who initiated the program ?
Jeez Thanks a lot I owe my life to this vid
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
Thank you Navin... It's truely amazing and thanks again
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?
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?
Great Lecture sir!
HTTP status 500 - internal Server error
How to resolve this error
Did you found that error solution... If you got the solution then pls help me..
@@ganivicky8383 no i did not get!
Resolved my error 500. Paste the error here. i could help.
Thank you sir very well explain you make it very easy to learn
It says unable to resolve javax.servlet. Also while trying to add external jar the button is greyed out. This is very frustrating
Keep teaching bro❤️🙂
Thanks, that helped a lot!
Iam always Thanking You Sir❤
Thanks you so much sir for your efforts and dedicated to teach 🔥🔥🔥🔥🔥🔥
so far soo good sir ji , thanks a lot
It is very helpful....thank u very very much!!!
Really you are so amazing sir
Amazing tutorial helped a lot
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
why i cant click generate deployment descriptor stub?
thank you man
thanks
@@erickresurreccion5716 hey did you get how to do?
hey can you tell me why internal browser is desabled in eclipse .by the way i am using ubuntu.please solve my issue
sir,
thank you for your great tutorial
Sir You're awesome ❤️
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..
Problem solved:
Edit your url-pattern "/***" to exact keyword what it is, if it is case sensitive.
@@jayeshkhosla5710 sorry i can't get you
Thankyou sir its really awesome.
lots of love sir
thank you so much, bro. It helped me a lot
sir i got a exception like com.telusko.AddServlet cannot be cast to javax.servlet.Servlet
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.
you are the best one !
superb 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
i m facing class not found exception on this code . Please tell me how to resolve it .
How we can call service with multiple url , like I want same functionality with different url. Ex. /add and /service/V2/add
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
Very helpful🤗
Sir instead of javax ....
Eclipse showing Jakarta
And showing warning as
Javax can not be resolved ....
Can u please tell any solution to this?
i have no option of HttpServlet class extendable so what can do for it
Amazing teaching
i didnt get web.xml file in my eclipse environment . what should i do?
you make it everything easy
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 can you please help me I am getting "Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase this warning" sir.. 🙏🙏🙏
Hello sir,
In my project explorer java resource file is not shown, how to add that? Could you plz help me sir
My project doesn't have this web.xml file. I tried to created by myself but it's full of errors
i'm getting http status 500 what to do sir?? the output is also not displaying in console......
It is an Internal Server Error. The reason for that can be your server is not yet started or not properly configured.
Superb tutorials
💞💞💞Awesome sir
I love servlets 🌹💞💞💞
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"
use /add in the HTML file you created
Why it doesn't work when we don't do web.xml code here and write instead?
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
Thank you sir !
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 ?