Back to Top

Monday, 5 March 2012

JAVA: What is the superclass of Exception

java.lang.Throwable is the superclass of all the errors and exceptions in java.

Monday, 5 March 2012 by Anijit Sarkar · 6 Read more »

JAVA: Why Errors are Unchecked?


Error is unpredictable. It can occur at any point and recover is also quite impossible. So it is meaningless to declare such exception. That’s why, in java, error is unchecked.

by Anijit Sarkar · 6 Read more »

Thursday, 1 March 2012

J2EE: SERVLET: Class GenericServlet vs Class HttpServlet


·                    It is an abstract class which defines a generic and protocol independent servlet. Here, protocol independent means, by default, it doesn’t contain inherent support for any particular type of protocol, but it can be extended to provide implementation of any protocol.

·                    Class GenericServlet implements Interface Servlet and Interface ServletConfig  and it belongs to javax.servlet package.

·                    It offers simpler version of the servlet life cycle methods init() and destroy() and the methods of ServletConfig. That’s why, it makes writing a servlet easier.

·                    Here, the method service(ServletRequest req, ServletResponse res) is abstract, so the subclasses must override it. And this is also the reason why the GenericServlet is an abstract class.

Thursday, 1 March 2012 by Anijit Sarkar · 3 Read more »

Wednesday, 29 February 2012

J2EE: SERVLET: What is Servlet Interface?


Interface javax.servlet.Servlet is that interface which defines the ServletLife Cycle methods. So, all servlets must implement this interface, either directly or by extending a class which implements this interface. Instead of directly implementing the Servlet Interface, a servlet can also extend Class GenericServlet (which implements Servlet Interface), or can extend HttpServlet Class (which extends the GenericServlet class).


Wednesday, 29 February 2012 by Anijit Sarkar · 6 Read more »

Monday, 27 February 2012

J2EE: SERVLET: What is Servlet?


Servlet:

Servlet is a server-side (runs within a Web server), Java Programming Language Class which interacts with clients via request-response programming model (example, HTTP Request-Response model).

It can respond to any type of request, but, generally, it is used to extend the application hosted by Web Server by providing dynamic web content.

It has build-in threading capability and provides a secure environment for programming.

Monday, 27 February 2012 by Anijit Sarkar · 200 Read more »

Popular Posts

All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar