Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

do we need to know to this depth ?

 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given the following code, which of the following statements is required at line 9 to write the name of the servlet and the command to the log file?

Answer 1 is correct. The log methods declared in javax.servlet.GenericServlet write the specified message to a servlet log file, prepended by the servlet's name.

Answers 2 and 4 are incorrect because the log methods declared in javax.servlet.ServletContext only write the specified message to a servlet log file. Answer 3 is incorrect because there are no log methods declared in javax.servlet.ServletConfig

??? this is from j2eecertificate.com !
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without seeing either the code, or the 4 possible answers, it's hard to say anything...
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i meant do we need to know the differnce between the log methods in GenericServlet and ServeltContext ...as shon in the bold text ?

hope that we dont need to know this
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not needed in the current exam. I think this was for 310-080.
 
Ranch Hand
Posts: 292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You just need to know the difference between the two.....the one in GenericServlet prepends the Servlet name
 
A feeble attempt to tell you about our stuff that makes us money
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic