• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in Marcus Quiz-3 question

 
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");
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!