0
what is the need of doPost and DoGet method?
if service can work in both type of request then why ?
3 Respuestas
+ 5
Then you should override and use service.
+ 4
The service method calls doGet or doPost depending on request method. Of course you can handle everything in service. With doGet and doPost you can avoid checking request method. But why to do that?
My opinion is it is better for security reasons that accept a request only in post or get, not both. For example don't accept login information via GET because sending sensitive parameters in the URL is not secure.
0
ok...but if client can sent request in post and get both...then should i use service method Or should i use both method(dopost and doget) in servlet class?