• Post Reply Bookmark Topic Watch Topic
  • New Topic

regarding retrieval of init param in a servlet  RSS feed

 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in a question in mock test in Study kit,they have asked a question which method can be used to retrieve an init param in servlet and answers are getInitParameter(name) and getServletConfig().getInitparameter(name).But I had selected getServletContext().getInitParameter(name) also as they have not specified which initialization parameter to get?Can anyone explain me why this is not included?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the exact question. How did they formulate it ?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!