• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in Marcus Quiz-3 question  RSS feed

 
Maya Dolas
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the option to a question is

ctx.getServletConfig().getInitParameter("bestwebsite"); will cause a compile time error

where ctx is a valid ServletContext object.

I checked the option, however the answer section stated it to be wrong. I checked the api and there is not method as getServletConfig() in ServletContext interface.

Correct me if I am mistaken.
 
Kumar Garlapati
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
question was tying to mislead,

correct one is :
getServletConfig().getServletContext().getInitParameter("bestwebsite");
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!