Answer Posted / om shastri
doGet is called in response to an HTTP GET request. This
happens when users click on a link, or enter a URL into the
browser's address bar. It also happens with some HTML FORMs
(those with METHOD="GET" specified in the FORM tag).
doPost is called in response to an HTTP POST request. This
happens with some HTML FORMs (those with METHOD="POST"
specified in the FORM tag).
Both methods are called by the default (superclass)
implementation of service in the HttpServlet base class.
You should override one or both to perform your servlet's
actions. You probably shouldn't override service().
| Is This Answer Correct ? | 9 Yes | 5 No |
Post New Answer View All Answers
What are the uses of servlet
What is servletconfig?
What are the drawbacks of cgi?
What is a servlet?
What do you mean by filter in servlet?
How do I know if java is running on linux?
How native code can be used in a servlet?
What is context in servlet?
Explain the lifecycle of a servlet?
What are the different methods involved in generic servlet?
What is meant by servlet? What are the parameters of the service method?
List the Different types of servlet?
What is java servlet?
Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!
What is the process to implement doget and dopost methods?