IT Community - Software Programming, Web Development and Technical Support

What is the Servlet Interface?

This is a discussion on What is the Servlet Interface? within the Java Programming forums, part of the Software Development category; What is the Servlet Interface?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Java Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-18-2007, 08:14 AM
Arun Arun is offline
D-Web Trainee
 
Join Date: Mar 2007
Posts: 43
Arun is on a distinguished road
Default What is the Servlet Interface?

What is the Servlet Interface?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-20-2007, 06:51 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Thumbs up Re: What is the Servlet Interface?

Servlet Interface


The servlet interface can be used to start the network server remotely. To use the servlet interface, the servlet must be registered with a web server and derby.system.home must be known to the web server.
A Web application archive (WAR) file, derby.war, for the IBM Cloudscape Network Server is available in $CLOUDSCAPE_INSTALL/frameworks/NetworkServer/war. This WAR registers the Network Server's servlet at the relative path /derbynet. Please see the documentation for your Application Server for instructions on how to install it.
For example, if derby.war is installed in Websphere Application Server with a context root of cns, then the URL of the server is:
http://server[ort]/cns/derbynet
Note:
A servlet engine is not part of the Network Server.
The servlet takes the following optional configuration parameters:
• portNumber
specifies the port number to be used by the network server.
• startNetworkServerOnInit
specifies that the network server is to be started when the servlet is initialized.
• tracingDirectory
specifies the location for trace files. If the tracing directory is not specified, the traces are placed in derby.system.home.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-10-2007, 04:35 AM
leoraja8 leoraja8 is offline
D-Web Sr.Programmer
 
Join Date: May 2007
Posts: 194
leoraja8 is on a distinguished road
Post Re: What is the Servlet Interface?

Interface Servlet

All servlets implement this interface. Servlet writers typically do this by subclassing either GenericServlet, which implements the Servlet interface, or by subclassing GenericServlet's descendent, HttpServlet. Developers need to directly implement this interface only if their servlets cannot (or choose not to) inherit from GenericServlet or HttpServlet. For example, RMI or CORBA objects that act as servlets will directly implement this interface.

The Servlet interface defines methods to initialize a servlet, to receive and respond to client requests, and to destroy a servlet and its resources. These are known as life-cycle methods, and are called by the network service in the following manner:

1. Servlet is created then initialized.
2. Zero or more service calls from clients are handled
3. Servlet is destroyed then garbage collected and finalized

Initializing a servlet involves doing any expensive one-time setup, such as loading configuration data from files or starting helper threads. Service calls from clients are handled using a request and response paradigm. They rely on the underlying network transport to provide quality of service guarantees, such as reordering, duplication, message integrity, privacy, etc. Destroying a servlet involves undoing any initialization work and synchronizing persistent state with the current in-memory state.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we write Construcror in Servlet? leoraja8 Java Programming 1 11-23-2007 09:51 PM
How to send data from servlet to javascript variables Pvinothkumar HTML, CSS and Javascript Coding Techniques 0 10-09-2007 11:05 PM
Servlet creation and servlet loading........ leoraja8 Java Programming 4 09-25-2007 12:22 AM
How to pass data (including JavaBeans) to a JSP from a servlet? anbuchezhians Java Server Pages (JSP) 1 08-01-2007 11:47 PM
Do we have interface to schedule a task like ITaskscheduler interface for desktop.... theone Mobile Software Development 1 07-24-2007 11:29 PM


All times are GMT -7. The time now is 10:53 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0