Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doGet or doPost: to servlet from JSP

 
Nelson Nadal
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I just redirect my JSP to servlet what does the servlet execute? doGet or doPost? Thanks.
 
Brian Smith
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i believe it should execute doGet unless you explicitly specify doPost. others might want to comment if i am wrong.
 
Tim Baker
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
doGet is default, or should be, unless you have a very wierd and strange browser.
 
Nelson Nadal
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just issue a request.sendRedirect(req,res) command.
I don't know how can I send it by POST or GET, I only know that it can pass its request attributes automatically.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic