|
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
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
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
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
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
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
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
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
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
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
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
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
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
A servlet is a java class / a program that is a server side
component and runs in web container.............
Read
answer
The life cycle is managed by the Servlet container in which
the servlet is deployed,.................
Read
answer
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
The init() method
The service() method
The destroy() method
The getServletConfig()
The getServletInfo() method........................
Read answer
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
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
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
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
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
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
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
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
Also read
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
|