filmov
tv
JSP Tutorial #29 - Read HTML Form Data with Servlets - Part 1

Показать описание
FULL COURSE: JSP, Servlets and JDBC (80+ videos)
----
This JSP tutorial series will help you quickly get up to speed with JSP.
----
Closed-Captioning and English subtitles available for this JSP Tutorial.
----
Follow luv2code for more JSP tutorial:
---
If you liked my JSP tutorial, then join my mailing list: Get exclusive access to new Java tutorials.
---
Questions or problems about this JSP tutorial? Post them in the comments section below.
---
Want to suggest a video for my JSP tutorial? Leave a comment below. I'm always looking for new video ideas.
Let me know what video you'd like for me to create.
---
Premium JSP Course
Need More Details on JSP?
- See my Premium JSP and Servlets course (80+ videos)
---
JSP Tutorial Transcript
All right. Let's walk through this step by step. The first step is building the HTML form. We've seen most of this before, so we start off with our form. Now, the action equals StudentServlet, so that's the name of the servlet that we're calling. Then we set up method equals GET because we want to make use of a GET request to that servlet. Then from there, we simply set up the HTML form fields. We set up First Name field, Last Name field, and also a Submit button. Again, we've seen a lot of this stuff before. Just a basic form that we're setting up for our example.
The one thing that's different here or unique that I want to point out here is that since this form is going to send the data using method=GET, this actually calls the doGet method in our servlet. Method=GET will call the doGet method in your servlet, so you have to make sure that you override the appropriate handler method or make sure you override the doGet method.
That's basically it here for our servlet example. What we're going to do in the next video is we're going to move into eclipse. We're going to get some hands-on practice. We'll actually build this example from scratch, so I'll see you in the next video.
End of JSP tutorial transcript.
----
This JSP tutorial series will help you quickly get up to speed with JSP.
----
Closed-Captioning and English subtitles available for this JSP Tutorial.
----
Follow luv2code for more JSP tutorial:
---
If you liked my JSP tutorial, then join my mailing list: Get exclusive access to new Java tutorials.
---
Questions or problems about this JSP tutorial? Post them in the comments section below.
---
Want to suggest a video for my JSP tutorial? Leave a comment below. I'm always looking for new video ideas.
Let me know what video you'd like for me to create.
---
Premium JSP Course
Need More Details on JSP?
- See my Premium JSP and Servlets course (80+ videos)
---
JSP Tutorial Transcript
All right. Let's walk through this step by step. The first step is building the HTML form. We've seen most of this before, so we start off with our form. Now, the action equals StudentServlet, so that's the name of the servlet that we're calling. Then we set up method equals GET because we want to make use of a GET request to that servlet. Then from there, we simply set up the HTML form fields. We set up First Name field, Last Name field, and also a Submit button. Again, we've seen a lot of this stuff before. Just a basic form that we're setting up for our example.
The one thing that's different here or unique that I want to point out here is that since this form is going to send the data using method=GET, this actually calls the doGet method in our servlet. Method=GET will call the doGet method in your servlet, so you have to make sure that you override the appropriate handler method or make sure you override the doGet method.
That's basically it here for our servlet example. What we're going to do in the next video is we're going to move into eclipse. We're going to get some hands-on practice. We'll actually build this example from scratch, so I'll see you in the next video.
End of JSP tutorial transcript.
Комментарии