#6 Servlet and JSP Tutorial | Get and Post

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ต.ค. 2024
  • Complete Servlet and JSP tutorial playlist : goo.gl/pKFeSv
    In this video we will see :
    Http methods
    Get
    Post
    When to use get method and when to use post method
    Controlling the method of request in servlet
    doGet() method in Servlet
    doPost() method in Servlet
    service() method in Serrvlet
    working example of doGet() method
    working example of doPost() method
    HTTP works as a request-response protocol between a client and server.
    Two commonly used methods for a request-response between a client and server are: GET and POST.
    GET - Requests data from a specified resource.
    POST - Submits data to be processed to a specified resource.
    Editing Monitors :
    amzn.to/2RfKWgL
    amzn.to/2Q665JW
    amzn.to/2OUP21a.
    Check out our website: www.telusko.com
    Follow Telusko on Twitter: / navinreddy20
    Follow on Facebook:
    Telusko : / teluskolearn. .
    Navin Reddy : / navintelusko
    Follow Navin Reddy on Instagram: / navinreddy20
    Subscribe to our other channel:
    Navin Reddy : www.youtube.co....
    Telusko Hindi :
    www.youtube.co....
    Donation:
    PayPal Id : navinreddy20
    Patreon : navinreddy20
    www.telusko.com...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 116

  • @tanush809
    @tanush809 2 ปีที่แล้ว +2

    After being into Management for long time I am planning to get back to technical stream. Listening to your videos is very refreshing and can recall what I learnt a decade back. Your communication is great - clear and crisp. Thank you so much 🙏

  • @AkashSharma-gn8xb
    @AkashSharma-gn8xb 2 ปีที่แล้ว

    There are many tutorials about servlet but only after watching your videos i am able to run my first servlet program. Thanks.....

  • @VaralakshmiAllu-g5t
    @VaralakshmiAllu-g5t หลายเดือนก่อน

    Your are such an incredible tutor. I would say that your channel is the best channel for tec students. A lot of respect from Andhra Pradesh

  • @akhilraj9334
    @akhilraj9334 6 ปีที่แล้ว +7

    Found your channel today, pretty quick and precise.

  • @orz5516
    @orz5516 6 ปีที่แล้ว +8

    your tutorials are amazing and so clear.
    thank you!

  • @yt.user-zull
    @yt.user-zull 5 ปีที่แล้ว +7

    You didn't tell us how to attach the Tomcat source file (the src zip file that you downloaded) so that we could check the details of a class e.g. HttpServlet by using "Ctrl+Click". How do we do that? You should make a video for it and add it to this playlist at the correct position.
    Edit:
    Wow, I tried and finally I did it!
    It's quite simple.
    1. Press and hold the Ctrl key and click on a predefined class name whose source file isn't attached.
    2. A new tab will open with a button "Attach Source...", just click that button.
    3. A dialogue box will open asking for the location of the zip/jar file which contains the source.
    (a) If the zip/jar file is inside your workspace folder, simply click on the "Browse..." button.
    (b) If the file is saved at another location, select/check the "External location" radio button and click on the "External File..." button.
    And finally, navigate to the zip/jar file and click the Open > OK > Finish > OK buttons.
    Done!
    Now, you can Ctrl+Click on the class name and see the source. 😊

    • @molekuax8646
      @molekuax8646 5 ปีที่แล้ว

      Thanks !!!!!!!!!!!

    • @rksCraze
      @rksCraze 5 ปีที่แล้ว

      Hi Zulfequar did you got the answer ? Any one know how to see class details by Ctrl+Click then please reply.

    • @md.ashikulislam8284
      @md.ashikulislam8284 3 ปีที่แล้ว

      Thankssssssssssssssss

  • @DoubtedBuddy
    @DoubtedBuddy 4 ปีที่แล้ว +2

    Happy teacher day sir . i am thankful that you are here for everyone of us keep doing your work and may god bless with success that you are expecting in your life

  • @osmanforhad7220
    @osmanforhad7220 2 ปีที่แล้ว

    you are best java teacher ever i seen thank you

  • @chinmaydas4053
    @chinmaydas4053 6 ปีที่แล้ว +6

    Thanks sir.we want complete servlet,jsp video series..

  • @ayahyasser9995
    @ayahyasser9995 6 ปีที่แล้ว +5

    Thanks a lot for this playlist! The theoretical & coding explanation is just amazing and very understandable :)

  • @dharmang
    @dharmang 4 ปีที่แล้ว +1

    Your teaching is soooo good that i created multiplication servlet on top of add servlet @3:20 and will direct the webpage for any of the submit buttons clicked :D 👌👌
    The addservlet is post method and the other is get :D

    • @tusharkadam7471
      @tusharkadam7471 4 ปีที่แล้ว

      Nice bro. Keep building small things. You will rock. All the best.

    • @tusharkadam7471
      @tusharkadam7471 4 ปีที่แล้ว

      Bro Have you done this using two different forms?

  • @varunpatil3936
    @varunpatil3936 3 ปีที่แล้ว +1

    Reallly Amazing Explanation SIR!!!!

  • @holydoggo8979
    @holydoggo8979 3 ปีที่แล้ว

    bruh you literally explain stuff better than my teacher :")

  • @naveendev7689
    @naveendev7689 10 หลายเดือนก่อน

    Such a very good explanation.

  • @nilsmetzler4302
    @nilsmetzler4302 6 ปีที่แล้ว +1

    Thank you very much! I really enjoy all of your tutorials!

  • @Harsh-fd4ml
    @Harsh-fd4ml 2 ปีที่แล้ว

    Thanks You, and telusko channel actually educate people.

  • @ushasharma1841
    @ushasharma1841 3 ปีที่แล้ว +1

    Thank you so much 😀 I even watch your tutorials in udemy as well.❤️

  • @gowthamivallabhadasu2523
    @gowthamivallabhadasu2523 6 หลายเดือนก่อน

    Thank you Navin Reddy

  • @-indeed8285
    @-indeed8285 6 ปีที่แล้ว +1

    thank you so much ❤.... we need full series of videos.

  • @manirajs4658
    @manirajs4658 ปีที่แล้ว

    Hi sir, thank you so much for making amazing videos 🙏
    I have few doubts
    1) How service method is called without calling from AddServlet?
    2) How child class methods (doGet/doPost methods) can be called from parent class (HttpServlet) ?
    Thanks in advance sir! 🙏

  • @saral2836
    @saral2836 3 หลายเดือนก่อน

    service()method is soo cool

  • @VRDailly7142
    @VRDailly7142 2 ปีที่แล้ว

    thanks for your tutorials

  • @vaibhavmoharkar2349
    @vaibhavmoharkar2349 ปีที่แล้ว

    Thank You bro.
    You are best.

  • @me_manish_prajapati
    @me_manish_prajapati 5 ปีที่แล้ว +1

    Sir, in last few minutes you say if we want both two methods than we have to create doGet and doPost.. instead of this can we simply create service method and it will work with get and post... i can't find difference btw them

  • @MdGulab-s4w
    @MdGulab-s4w ปีที่แล้ว +1

    Thank you sir 👍🏼

  • @db1542
    @db1542 3 ปีที่แล้ว +1

    Naveen please attatch the demo project folders in the description...

  • @HimanshuSingh2009
    @HimanshuSingh2009 4 ปีที่แล้ว +5

    Navin's favourite line : " Hey Programmer"

    • @zaidronin646
      @zaidronin646 3 ปีที่แล้ว

      i realize I'm kind of randomly asking but do anybody know a good site to stream new series online?

    • @kalebforrest5918
      @kalebforrest5918 3 ปีที่แล้ว

      @Zaid Ronin lately I have been using flixzone. Just search on google for it :)

    • @johanemerson307
      @johanemerson307 3 ปีที่แล้ว

      @Kaleb Forrest yea, have been watching on flixzone for months myself :)

    • @kalebtheodore7700
      @kalebtheodore7700 3 ปีที่แล้ว

      @Kaleb Forrest Definitely, I've been using Flixzone for since march myself :D

    • @larryalan3078
      @larryalan3078 3 ปีที่แล้ว

      @Kaleb Forrest thank you, signed up and it seems like a nice service =) I really appreciate it!!

  • @prachishinde6408
    @prachishinde6408 6 ปีที่แล้ว +1

    thanks you very much....your explaination method is too good..

  • @nageshchendake
    @nageshchendake 5 ปีที่แล้ว +7

    The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
    how could i solve this issue?

    • @koshaltrivedi4240
      @koshaltrivedi4240 11 วันที่ผ่านมา

      Save the resources and Right click on Project and Run On server

    • @koshaltrivedi4240
      @koshaltrivedi4240 11 วันที่ผ่านมา

      Else, you skipped tag

  • @abhaykulkarni6869
    @abhaykulkarni6869 2 ปีที่แล้ว

    very well explained... Thank you

  • @realhealthywater7135
    @realhealthywater7135 3 ปีที่แล้ว

    Clearly explained. thanks

  • @varunsharma2026
    @varunsharma2026 5 ปีที่แล้ว

    Sir, as you have said, if we only make a doGET() method, it will be able to handle only get request from the client side, and similarly for doPost as well. But, again, it does not matter what type of request is coming from client side. It will always going to call a service method, and internally service method will call its already implemented doGET or doPost, depending on the type of incoming request. However, if I make only doPost () method inside my servlet, that means my servlet will not be able to handle get requests. But ideally, the first call will be of service method, and in that case my service method should be able to handle that get request as well, regardless I have created doGet() method in my servlet or not. ..Confusing......!!

  • @piyushagarwal1542
    @piyushagarwal1542 6 ปีที่แล้ว +1

    Hello sir.
    I wanted to ask whether javascript is better than servlet jsp for creating websites?
    Please do reply.

  • @srirammohan6943
    @srirammohan6943 6 ปีที่แล้ว +1

    Sir, your explanations are fabulous really helping me a lot in my career.I have a doubt sir, Once we send the request based on the URL the corresponding class provided In the web.xml file will be called that's fine.But httpservlet being a super class to the class we have called,how does the service method in the httpservlet gets called automatically ? We are not intiating our subclass and the service method is also not in the httpservlet constructor part and also the method is not inside a static block of httpservlet class.So how does that method gets called ??

    • @akhilraj9334
      @akhilraj9334 6 ปีที่แล้ว +2

      It will be called during the lifecycle of the servlet by the container. The method is a lifecycle method, not like a random method we write in a POJO.

  • @gustavosanchez5899
    @gustavosanchez5899 4 ปีที่แล้ว +1

    I love you man you are the best !

  • @mr_shamanth_m
    @mr_shamanth_m 5 ปีที่แล้ว +1

    i didn't get exact difference between service() , doGet() and doPost() methods. which methods to use in which scenarios?

    • @prabhabaskar1985
      @prabhabaskar1985 3 ปีที่แล้ว +1

      Wheather you know it is" get " or " post " then use separate methods ( doPost() / doGet() )
      Incase you dont know what it is exactly then go with service().

  • @shaifaliagarwal1749
    @shaifaliagarwal1749 3 ปีที่แล้ว

    awsm explanation . Thanks sir

  • @sanjanakapoor1165
    @sanjanakapoor1165 6 ปีที่แล้ว

    Thank you sir.These are Very helpfull

  • @digitalnomadg
    @digitalnomadg 6 ปีที่แล้ว

    Sir, what if we use more than one servlet class and how we can acheive that situation?

  • @rameshsagar1293
    @rameshsagar1293 5 ปีที่แล้ว

    Hi, in this session, you have used 'class' to create a servlet. Can't we directly make use of 'servlet' option that is being shown when we do right-click on the project? If we can, please explain the same with an example.

    • @sthitaprajnamishra9831
      @sthitaprajnamishra9831 5 ปีที่แล้ว +1

      We can directly make use of the 'servlet' option too. The difference in using it is that it comes with pre-written code like import statements, the extension of HttpServlet class and doGet(), doPost() methods.

    • @rameshsagar1293
      @rameshsagar1293 5 ปีที่แล้ว +1

      @@sthitaprajnamishra9831 oh yeah, I observed those methods. Thanks for the clarification, mate!

    • @komaljain4352
      @komaljain4352 4 ปีที่แล้ว

      You may have to use annotations like @WebServlet() at top of class that extends HttpServlet and need ro import it too and you then do not need to update web.xml file.

  • @komaljain4352
    @komaljain4352 4 ปีที่แล้ว

    How can create another method for putting the common code? As in doGet() and doPost() , as it will need access to HttpRequest and HttpResponse object for fetching and rendering from and to browser and explosing objects is not recommended.

  • @harirajan1393
    @harirajan1393 2 ปีที่แล้ว

    if i create multiple tags with method ="post" in a html file and linked it with servlets using web.xml file , then how can i execute multiple doPost() in a single servlet ? ..Is there any option to use multiple doPost methods in a single servlet class....Pls reply

  • @TarekFaham
    @TarekFaham 6 ปีที่แล้ว

    How can we develop a json service using JSP? Basically, the JSP will access the data, format json string, and send back the response to the client as json. How is this possible?

  • @manshachandna2968
    @manshachandna2968 6 ปีที่แล้ว

    superb video. But I am not able to make changes in "web.xml" file because there is no source folder. It only has "xml editor" which is different from what i saw in this video. Please let me know how can i resolve that so that I can make changes in my web.xml file!! Thank you.

  • @_R3ap3R_.
    @_R3ap3R_. 3 ปีที่แล้ว

    Neatly explained!!

  • @rudram4534
    @rudram4534 2 ปีที่แล้ว

    thank you sir

  • @raadheshkannan6559
    @raadheshkannan6559 5 ปีที่แล้ว

    Sir, how to get the HttpServlet class? what shortcut or key did you press before clicking it?

    • @prabhabaskar1985
      @prabhabaskar1985 3 ปีที่แล้ว

      ctrl + HttpServlet ( double click on that word / select that portion)

  • @thekrazystuff5807
    @thekrazystuff5807 3 ปีที่แล้ว

    in (web.xml) and action attribute in (.html) file should have same value?
    Please answer sir

  • @beticogerenense
    @beticogerenense 5 ปีที่แล้ว +1

    Eres un crackóvido.

  • @rragul3850
    @rragul3850 4 หลายเดือนก่อน

    Please give some updated vedios on servlet concepts seems to be old everything changed now

  • @subhasishchakraborty7099
    @subhasishchakraborty7099 4 ปีที่แล้ว

    How can we create another method in addservlet other than doget or dopost? It's not possible, right?
    By that logic we can't actually create another method which will have common properties of both the doget and dopost methods.

  • @satyad87
    @satyad87 4 ปีที่แล้ว

    a little slow down in your talking pace will make the video perfect

  • @snehaamin8609
    @snehaamin8609 4 ปีที่แล้ว +1

    I'm getting error 405 method not allowed if i change method to doPost

  • @tako20247
    @tako20247 3 ปีที่แล้ว

    Awesome - Thanks !

  • @turab_0
    @turab_0 6 ปีที่แล้ว

    Sir , please complete data structures videos (trees,graphs...)

    • @turab_0
      @turab_0 6 ปีที่แล้ว

      Thanks sir

  • @084_sakshamgupta3
    @084_sakshamgupta3 4 ปีที่แล้ว

    with all due respect sir i want to thank you for such an amazing content but sir i am facing one problem with servlets that when i start they being called twice i have done some R&D also but still servlet is calling twice how can fix this bug

    • @bhaveshsharma2624
      @bhaveshsharma2624 4 ปีที่แล้ว

      Yes I'm also facing same problem in my project. Due to this my SQL queries are getting executed twice with null values second time. Did you find any solution to it??

  • @myprofile702
    @myprofile702 6 ปีที่แล้ว

    Thnx sir very helpful

  • @TofikAsmamaw
    @TofikAsmamaw ปีที่แล้ว

    special one!!

  • @bijenadhikari
    @bijenadhikari ปีที่แล้ว

    you are awesome

  • @techbuddy1519
    @techbuddy1519 5 ปีที่แล้ว

    why am i getting error here -->package com.manith;
    as configure build path when using throws Exception please clease my dought.thank u

  • @pratikgupta7373
    @pratikgupta7373 6 ปีที่แล้ว +1

    Thanks sir

  • @umar1099
    @umar1099 5 ปีที่แล้ว

    Printwriter out= res.getWriter();
    What is the concept of above code snippet in Java please reply

    • @arnabbhattacharya607
      @arnabbhattacharya607 5 ปีที่แล้ว +1

      getwriter() is a method under printwriter() class which here is getting passed through the object "out".

  • @siddarthkumar5941
    @siddarthkumar5941 5 ปีที่แล้ว

    sir what happens if in the html code we do not mention method=get or post but int the addservlet jabva class we use the do post and do get method
    in short while using doget or dopost if we do not specify the method type in htmlcode would it be fine? please do reply

    • @yt.user-zull
      @yt.user-zull 5 ปีที่แล้ว

      If you define both the doGet() and doPost() methods in the servlet and you do not mention any method attribute in the form (in the index.html file) then by default the doGet() method will be called.

    • @siddarthkumar5941
      @siddarthkumar5941 5 ปีที่แล้ว

      system.out.println('thank u so much sir");

    • @siddarthkumar5941
      @siddarthkumar5941 5 ปีที่แล้ว

      system.out.println('thank u so much sir");

  • @soldadopreciso
    @soldadopreciso 5 ปีที่แล้ว +1

    hello pals, why automatic completion is not working with "doPost" word in eclipse? anybody there with the same issue

  • @amanvarshney5555
    @amanvarshney5555 5 ปีที่แล้ว

    What is a use of sarvlet ???plz tell me

  • @prabhabaskar1985
    @prabhabaskar1985 3 ปีที่แล้ว

    How to add javadocs for java EE applications,
    ctrl + HttpServlet click shows no source ..,
    How to add ?? Anybody knows ??

  • @mohammadhosseini61
    @mohammadhosseini61 2 ปีที่แล้ว

    hi dear my English is not good but about this video , Can you introduce me to the English text of the above tutorial?

  • @hellomytube99
    @hellomytube99 5 ปีที่แล้ว

    tq u

  • @sandeepkunwr1178
    @sandeepkunwr1178 2 ปีที่แล้ว

    sir my post method is not working??????

  • @suchitravani7575
    @suchitravani7575 5 ปีที่แล้ว

    I am getting 405 -method not allowed error,HTTP method GET not supported by this URL,pls anyone can help ...I did the exact same coding,I not able to solve the issue

    • @kovicivan
      @kovicivan 5 ปีที่แล้ว

      I had the same issue. I just cleared my browser (firefox) cache and everything worked fine.

  • @ayushanand2022
    @ayushanand2022 5 ปีที่แล้ว

    HTTP Status 405 - Method Not Allowed
    Message : HTTP method GET is not supported by this URL
    Anyone else facing this issue.?

    • @88saifu
      @88saifu 5 ปีที่แล้ว

      I was having the same issue.
      What you'll have to do is to run your program twice. First, you add method="post" in html, restart the server and run it. Then, in your AddServlet class. change the service method to doPost and restart and run. Now, it should not give you any error messages and display the correct result.

    • @pranayasingh449
      @pranayasingh449 5 ปีที่แล้ว

      same here how did you fix it

    • @nerdalert6578
      @nerdalert6578 4 ปีที่แล้ว

      @@88saifu that fixes it..thanks bro !! :)

  • @sagarmeena0210
    @sagarmeena0210 5 ปีที่แล้ว

    awesome

  • @darogajee3286
    @darogajee3286 6 ปีที่แล้ว

    Post video easily... Post either.. Core.. Or just post advance at once....

  • @kmsabbir007
    @kmsabbir007 3 ปีที่แล้ว

    who did get error in this part?
    Arise hand or hit the like button !

  • @rameshwari
    @rameshwari 6 ปีที่แล้ว

    I use ecllipse.....nd u

  • @goldenbroccoli2267
    @goldenbroccoli2267 5 ปีที่แล้ว

    Thank you so much sir.

  • @ankitaggarwal8556
    @ankitaggarwal8556 5 ปีที่แล้ว

    The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
    How can i solve ?