Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getMethod()

 
agrah upadhyay
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Help me clear following doubts:
(1).What is the retutn type of getMethod() of HttpServletRequest?
(2).GenericServlet has method getInitParameter().What parameter does it return?-one in ServletConfig or of ServletContext?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Returns the name of the HTTP method of your request
For example, if you call your servlet with a POST method, getMethod() will return "POST".

2. ServletConfig
 
Balasubramani Dharmalingam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Return type of the getMethod() of HttpServletRequest is String. It will return the name of the HTTP method.(ie GET , POST , HEAD ...).

2)getInitParameter() of GenericServlet returns the servlet config init parameter.
 
agrah upadhyay
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Satou and Balasubramaniam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic