• Post Reply Bookmark Topic Watch Topic
  • New Topic

determine request type

 
sweety mehra
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While submitting page from Html to Servlet,
how can i determine the request type whether it is get/post
[ February 09, 2007: Message edited by: Bear Bibeault ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpServletRequest has a method called getMethod()
Also, you can override both doPost and doGet from HttpServlet, so that the right method will be called for the right type.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the client side also you can know this.

check the method attribute of form html element.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!