Find jobs | Company-wise 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 Interview Q&A Tutorials .NET Java Soft skills CV GD Work from home IT practice test MBA practice test FAQs in PDF Books Jobs FAQs
Interview questions                                 
Java interview questions
Java frequently asked questions
Test your Java skills!
Test your JDBC skills!
Test your EJB skills!
 
Java objects, classes & methods
Java operator  Java variables
Java overloading and overriding
Java abstract classes
Java data types  Java arrays
Java exception  Java events
Java virtual machine
Java input and output
Java URL connections
Java sockets  JNDI
Java applets  Java AWT
Java drawing AWT components
Core java  JDBC  JSP  EJB
J2EE  JNI  Servlets  Struts
Java threading  J2ME  JMS
Java web services  RMI
Internationalization  JavaScript
EJB Architecture  Spring
Java Transaction API – JTA  JBOSS
Java transaction services, JTS
Java GUI Framework interview
SWT/JFace interview
MVC and Jface  JavaServer Faces
Hibernate interview  JAAS
JavaMail interview  Tomcat
MIDP interview
Weblogic interview
Ant interview
Websphere interview
Ruby interview
jQuery interview
Aspect Oriented Programming, AOP
Java design patterns
Java localization
More links
JavaServer Faces 
OpenCms Application Overview 
EJB 3 Entities 
Oracle Web RowSet 
 

Servlets Interview Questions

Servlets Interview questions with answers

What is Servlets and explain the advantages of Servlet life cycle?

Servlets are modules that run within the server and receive and respond to the requests made by the client. Servlets retrieve most of the parameters using the input stream and send their responses using an output stream............
Read answer

Explain life cycle of Servlet.

Servlets life cycle involve three important methods, i.e. init, service and destroy.
Init() : Init method is called when Servlet first loaded in to the web server memory............
Read answer

What are different Authentication options available in Servlets.

There are four ways of Authentication options available in servlets
HTTP basic authentication: In this, server uses the username and password provided by the client and these credentials are transmitted using simple base64 encoding..........
Read answer

Explain why HttpServlet is declared abstract.

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.............
Read answer

Is possible to have a constructor for a servlet?

Yes, it is possible to have a constructor for a servlet. However, it is not practiced usually. The operations with the constructor can be performed as usual just that it cannot be called explicitly using the ‘new’ keyword.............
Read answer

What is the difference between an Applet and a Servlet?

Applets are applications designed to be transmitted over the network and executed by Java compatible web browsers.
An Applet is a client side java program that runs within a Web browser on the client machine.............
Read answer

Define HTTP Tunneling?

In some organizations, the intranet is blocked by a firewall to the internet. It is exposed to the outer networks only by means of webserver port that accept only Http requests...........
Read answer

List out the difference between ServletConfig and ServletContext?

Both are interfaces in the package javax.servlet. ServletConfig is a servlet configuration object. It is used by a servlet container to pass information to a servlet during initialization. The ServletConfig parameters are specified for a particular servlet and are unknown to other servlets................
Read answer

What is the difference between doGet() and doPost()?

doGet() and doPost() are HTTP requests handled by servlet classes.
In doGet(), the parameters are appended to the URL and sent along with header information. This does not happen in case of doPost(). In doPost(), the parameters are sent separately..............
Read answer

What is the difference between using getSession(true) and getSession(false) methods?

getSession(true) will check whether a session already exists for the user. If yes, it will return that session object else it will create a new session object and return it...........
Read answer

List out the difference between a JavaBean from a Servlet?

Servlets are Java based analog to CGI programs, implemented by means of a servlet container associated with an HTTP server. Servlets run on the server side..............
Read answer

Explain how servlets differ from RMI. Explain the advantages and disadvantages of each technology.

RMI (Remote Method Invocation) are a means of client server communication. In this, the client invokes a method on the server machine and the server machine process returns the result back to the client. We need to run RMI registry to use RMI.............
Read answer

Define servlet mapping.

Servlet mapping controls how you access a servlet. It is recommended that you don’t use absolute URLs. Instead usage of relative URLs should be done.............
Read answer

Explain javax.servlet.http package.
What is Java Servlet?

A servlet is a java class / a program that is a server side component and runs in web container.............
Read answer

Explain the life cycle of Servlet, i.e. Instantiation, Initialization, Service, Destroy, Unavailable.

The life cycle is managed by the Servlet container in which the servlet is deployed,.................
Read answer

Explain the purpose of Servlet interface.

The javax.servlet.HttpServlet / javax.servlet.Servlet is the interface that is to be implemented by all the servlets. The servlet’s code / actions / implementation is done by implementing this interface....................
Read answer

Explain the underlying method of Servlet interface.

The init() method
The service() method
The destroy() method
The getServletConfig()
The getServletInfo() method........................
Read answer

What is GenericServlet class?

This class implements Servlet and ServletConfig interfaces. This class can be extended by a servlet. It is a common practice that a servlet class extends protocol-specific,.................
Read answer

What is HTTPServlet class?

The HTTPServlet class provides an abstract class that is to be sub classed which is suitable for a web site. The subclass of HTTPServlet class must override any one of the following methods:....................
Read answer

What is Servlet context?

Servlet context is created by the container and can be viewed as a shared memory resource for all the servlets for a web application.................
Read answer

Explain session tracking in Java Servlet.

The state of requests for the same user is being maintained by the session of a servlet. Session tracking is a mechanism that is tracked and maintained by such requests by the user.................
Read answer

Describe Servlet collaboration.

Servlet collaboration is all about sharing information among the servlets. Collaborating servlets is to pass the common information that is to be shared directly by one servlet to another through various invocations of the methods.................
Read answer

Describe the basics of Servlets.

Servlets are java classes which run on a web server. The results produced by the servlet are viewed on a remote web server. Servlet is a server side component in web applications. The servlets performs the request / response paradigm using the web container. Servlets is the best alternative for CGI..............
Read answer

What are the important items in javax.servlets. Explain them

Servlets : Defines all the methods that a servlets implements. Servlets receives and responds to a request from the web clients. This interface has the methods that are to initialize a servlets, service a request and removal of a servlets from the server..............
Read answer

Describe the main purpose of servlets.

A java enabled server’s functionality can be extended by a servlets. Usually a servlets is used to develop web applications in a web server................
Read answer

Test your servlets knowledge with our multiple choice questions!

Also read

OFBiz Service Engine

Defining and creating a Java service
Service parameters
Special unchecked (unmatched) IN/OUT parameters
Security-related programming
Calling services from code (using dispatcher)
IN/OUT parameter mismatch when calling services
Sending feedback; standard return codes success, error and fail
Implementing Service Interfaces
Synchronous and asynchronous services
Using the Service Engine tools
ECAs: Event Condition Actions

 
Want to be hunted by potential employers? Just submit your key skills!

Popular FAQs

.NET .Net Architecture ADO.NET Java Oracle C#.NET
VB.NET DOT.NET AJAX ASP.NET NET Framework OOPS in .NET
C++ Sql Server Data warehousing EJB MySQL Linux
PHP UML Networking Testing XML  
 
Copyright © 2008 - 2010 CareerRide.com. All rights reserved.