what is the difference between doGet() and doPost()?
Answer Posted / giridhar gangapatnam
doGet() doPost()
1)doGet() method can send 1)doPost() method can send
limited amount of data large amount of data.
i.e.upto 256 characters
only.
2)In doGet() method when we 2)In doPost() methodrequest
send request then in Request is passed along withbody
Format there is no body part, part of theRequestFormat.
the request is passed along doPost() method Request
with only Request Format header Format has both body and
part only. header part.
3)doGet() method send limited 3)large amount data has
data because it has only header sent through body part
part,header part has limited of the RequestFormat.
memory to carry the data.
4)doGet() method support book 4)doPost() method doesn't
marks. support book marks.
5)when we send request parameters 5)The requested parameter
in doGet() it will display the in doPost() will not dis
information in URL as a query play the information as
string.so in doGet() data there a query string in URL.so
is no data security. data is secured.
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
When to use doget() and when dopost()?
How can we perform any action at the time of deploying the project?
What is servlet used for?
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 main purpose of java servlets?
What are the features added in Servlet 2.5?
When servlet object is created?
What is a web application and what is it’s directory structure?
What are the important functions of filters?
What is ServletContext object?
What is http servlet?
How is a servlet implemented in code?
What are the functions of the servlet container?
Which java framework is most popular?
List the Different types of servlet?