File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

do we need to know to this depth ?

 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • 0
  • 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 !
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • 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
  • 0
  • 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
 
Rohitt Vermaa
Ranch Hand
Posts: 232
  • 0
  • 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.
 
Sayak Banerjee
Ranch Hand
Posts: 292
  • 0
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic