File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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


S Majumder
Ranch Hand

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

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Have you read the javadoc of that class? All your questions are answered in there

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

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

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 ?

I agree. Here's the link:
subject: GenericServlet
It's not a secret anymore!