Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


In servlets, Why do we need both GET and POST method
implementations?

Answers were Sorted based on User's Feedback



In servlets, Why do we need both GET and POST method implementations?..

Answer / upender

I agree the above two answers. Here is my view.
HTTP Get method perform the following scenarios.

1) By default form submission without specifying method
name
2)if you click on hyperlinkS or images
3) or if you type url in address bar in brower

and Get there is no side effect. simple it get the resource
form serverside. Some time we require to deal with headers

Get can send only character data and limited data.and also
It can't support binary data.

POST method can support binary data and bulk data.

Is This Answer Correct ?    8 Yes 2 No

In servlets, Why do we need both GET and POST method implementations?..

Answer / abhijitbaji

if you are using HttpServlet then you have to implement
doGet() and or doPost() as per the method specified in jsp.
by default method type is "GET"

if you are using GenericServlet, you have to implement
servive()

Is This Answer Correct ?    8 Yes 4 No

In servlets, Why do we need both GET and POST method implementations?..

Answer / amit pandey

In servlet, the default method is doget(), which has
various limitations like the request length shuld be < than
1024 characters, all the information r send as URL, which
is not secure, large data like images cannot be send in URL.
Hence the POST method is implementated that overcome all
this issues w.r.t. the GET method.
Hence, in order that application shuld be more secure &
user orientated, both the methods are impelmentated.

Is This Answer Correct ?    5 Yes 4 No

Post New Answer

More Servlets Interview Questions

Can we define constructor in Servlet class?

10 Answers   Accenture, Yugma,


Explain the role of dispatcherservlet and contextloaderlistener.

0 Answers  


How to create war file?

0 Answers  


How to make sure a servlet is loaded at the application startup?

0 Answers  


What is called servlet mapping?

0 Answers  


Differentiate between the get and post method

0 Answers  


How do you create a cookie using servlet?

0 Answers  


Which method is called when reference variable is passed in system.net?

0 Answers   HCL,


What is setattribute in servlet?

0 Answers  


What do you mean by annotations in servlet?

0 Answers  


explain filters in java?

2 Answers   TCS,


What do you mean by httpservlet?

0 Answers  


Categories