• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getInitParameter

 
muthu moorthy
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any body can help me to find out the two possible answers ?

One is, B other one ?

Thank you


Problem

Which of the following lines can be used to retrieve a servlet initialization parameter "dbname" from the init() method of a servlet?



Code

public void init()
{
String dbname = //1 : Insert line here
}




Options

Select 2 correct options.

a. getServletConfig().getParameter("dbname");

b. getServletConfig().getInitParameter("dbname");

c. getServletContext().getInitParameter("dbname");

d. getInitParameter("dbname");

e. getInitParameterValue("dbname");
 
Rohitt Vermaa
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
d
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic