Find jobs | Jobseekers
Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Career Services Resume Services Interview questions Articles Books
Content
Java interview part 1
Java interview part 2
Java interview part 3
Java interview part 4
Java interview part 5
Core java
JDBC
JSP
EJB
JNI
Servlets
Struts
Java threading
Java web services
J2EE
J2ME
JMS
Internationalization
JavaScript
RMI
 
ASP.NET | ADO.NET | AJAX
C#.NET | VB.NET | PHP
NET Remoting | NET Interview
  
C | C++ | Java | Oops
Data Structure | OS
   
Database concepts | Oracle
SQL Server | Biztalk | Sharepoint
Notification services
Reporting Services
Service-oriented architecture
Data warehousing | MySQL
  
Project Management 
Linux | Testing | Networking
Software engineering 
  
UML | XML | HTML | SOAP 
CSS | VBScript  | Web Services
   
CV Cover letter | Interview 
HR | Soft skills | GD 
Working from Home 
Tutorial
ASP.NET | VB.NET | C#.NET     
Remoting.NET | Web service
Remoting overview | ADO.NET
UML | Sql server 
More links
JavaServer Faces 
OpenCms Application Overview 
EJB 3 Entities 
Oracle Web RowSet 
Books on Java
Java EE 5 Development with NetBeans 6 
OpenCms 7 Development 
EJB 3 Developer Guide 
JDBC 4.0 and Oracle JDeveloper for J2EE Development 

Servlet - GenericServlet and HTTPServlet


Explain why HttpServlet is declared abstract.

Answer
The Constructor HttpServlet() does nothing because this is an abstract class. Default implementations in a few Java classes like HttpServlet don’t really do anything. Hence, they need to be overridden.

Usually one of the following methods of HttpServlet must be overridden by a subclass:

doGet, if the servlet supports HTTP GET requests
doPost, HTTP POST requests
doPut, HTTP PUT requests
doDelete, HTTP DELETE requests
init and destroy, to manage resources
getServletInfo, to provide information

However, there doesn’t seem to be any reason why the service method should be overridden because it eventually dispatches the task to one of the doXXX methods.

What is the GenericServlet class?

Answer
GenericServlet makes writing servlets easier. To write a generic servlet, all you need to do is to override the abstract service method.



NEXT>>

More Servlets links

Explain why HttpServlet is declared abstract.

Answer - The Constructor HttpServlet() does nothing because this is an abstract class.........

Is possible to have a constructor for a servlet?

Answer - Yes, it is possible to have a constructor for a servlet.......

What is the difference between an Applet and a Servlet?

Answer - Applets are applications designed to be transmitted over the network......

Define HTTP Tunneling?

Answer - In some organizations, the intranet is blocked by a firewall to the internet..........

 
Today's Hot Jobs
C++  SQL Server
.NET  Java  Oracle
Finance  Marketing
Seekers  Employers
Copyright © 2008 CareerRide.com. All rights reserved.