wood burning stoves 2.0*
The moose likes Servlets and the fly likes GenericServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "GenericServlet" Watch "GenericServlet" New topic
Author

GenericServlet

S Majumder
Ranch Hand

Joined: Jun 03, 2009
Posts: 244
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

Joined: Jul 20, 2005
Posts: 10142
    
165

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

[My Blog] [JavaRanch Journal]
S Majumder
Ranch Hand

Joined: Jun 03, 2009
Posts: 244
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
 
GeeCON Prague 2014
 
subject: GenericServlet