Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GenericServlet

 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody ,

Can we extend the GenericServlet Class ?
What type of request/response a GenericServlet can handle ?
Can it be possible for GenericServlet to handle HTTP kind of request /response ?


regards,
S
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read the javadoc of that class? All your questions are answered in there http://download.oracle.com/javaee/6/api/javax/servlet/GenericServlet.html
 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jaikiran Pai for your valuable comments .

In the Interface ServletContext I have seen one method named log


public void log(java.lang.String message,
java.lang.Throwable throwable)

Writes an explanatory message and a stack trace for a given Throwable exception to the servlet log file. The name and type of the servlet log file is specific to the servlet container, usually an event log.

Parameters:
message - a String that describes the error or exception
throwable - the Throwable error or exception




My question is, which one is better to implement here ?

the log4J or the above mentioned log method or the java.util.Logger ?


regards,
S
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic