> When do we use doGet() and when do we use doPost()?
Hi
doGet ()
when client calls (method="get") doGet() method will execute,
all passing datas are visible in address bar,
we cant send or pass large amount of datas,
doPost()
when cilent calls (method="post") doPost() method will execute,
all passing datas are invisible,
we can pass large amount of data's,
ex:
login check,(or any confidential data's)
> can anybody tell me why do we call the doPost()
> method with in doGet()?
suppose we doesnt know what method will call from client or user means,
we have to code in doGet() and doPost(),
so two times we repeating the same logic,
for best to avoid
write ur logic in one method and just calls from another method...
ex:
doGet ( )
{
doPost(request,response);
}
or vice versa