Java Servlets
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
computer science crazy
Super Moderator
******

Posts: 3,048
Joined: Dec 2008
#1
22-09-2008, 10:20 AM


Definition
Servlets are modules that extend request/response-oriented servers, such as Java-enabled web servers. For example, a servlet might be responsible for taking data in an HTML order-entry form and applying the business logic used to update a company's order database. Servlets are to servers what applets are to browsers. Unlike applets, however, servlets have no graphical user interface. Servlets can be embedded in many different servers because the servlet API, which you use to write servlets, assumes nothing about the server's environment or protocol. Servlets have become most widely used within HTTP servers; many web servers support Java Servlet technology.

Use Servlets instead of CGI Scripts.
Servlets are an effective replacement for CGI scripts. They provide a way to generate dynamic documents that is both easier to write and faster to run. Servlets also address the problem of doing server-side programming with platform-specific APIs: they are developed with the Java Servlet API, a standard Java extension.
So use servlets to handle HTTP client requests. For example, have servlets process data POSTed over HTTPS using an HTML form, including purchase order or credit card data. A servlet like this could be part of an order-entry and processing system, working with product and inventory databases, and perhaps an on-line payment system.

Other Uses for Servlets
Here are a few more of the many applications for servlets:
" Allowing collaboration between people. A servlet can handle multiple requests concurrently, and can synchronize requests. This allows servlets to support systems such as on-line conferencing.

" Forwarding requests. Servlets can forward requests to other servers and servlets. Thus servlets can be used to balance load among several servers that mirror the same content, and to partition a single logical service over several servers, according to task type or organizational boundaries.

Architecture of the Servlet Package
The javax.servlet package provides interfaces and classes for writing servlets. The architecture of the package is described below.

The Servlet Interface
The central abstraction in the Servlet API is the Servlet interface. All servlets implement this interface, either directly or, more commonly, by extending a class that implements it such as HttpServlet

The Servlet interface declares, but does not implement, methods that manage the servlet and its communications with clients. Servlet writers provide some or all of these methods when developing a servlet.

Client Interaction
When a servlet accepts a call from a client, it receives two objects:
" A ServletRequest , which encapsulates the communication from the client to the server.

" A ServletResponse , which encapsulates the communication from the servlet back to the client.
ServletRequest and ServletResponse are interfaces defined by the javax.servlet package.

The Servlet Request Interface
The ServletRequest interface allows the servlet access to:
" Information such as the names of the parameters passed in by the client, the protocol (scheme) being used by the client, and the names of the remote host that made the request and the server that received it.
" The input stream, ServletInputStream . Servlets use the input stream to get data from clients that use application protocols such as the HTTP POST and PUT methods.
Interfaces that extend ServletRequest interface allow the servlet to retrieve more protocol-specific data. For example, the HttpServletRequest interface contains methods for accessing HTTP-specific header information.

The Servlet Response Interface
The ServletResponse interface gives the servlet methods for replying to the client. It:
" Allows the servlet to set the content length and MIME type of the reply.
" Provides an output stream, ServletOutputStream , and a Writer through which the servlet can send the reply data.
Use Search at http://topicideas.net/search.php wisely To Get Information About Project Topic and Seminar ideas with report/source code along pdf and ppt presenaion
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page

Quick Reply
Message
Type your reply to this message here.


Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Java EE seminar ideas 6 4,166 14-11-2014, 06:59 PM
Last Post: alokigorRob
  Object Oriented Programming with Java seminar paper 2 1,067 18-09-2014, 03:24 PM
Last Post: Radhika.m
  E-COMPILER FOR JAVA WITH SECURITY EDITOR seminar class 18 9,904 08-10-2013, 09:07 PM
Last Post: Guest
  E-COMPILER FOR JAVA PPT seminar projects maker 0 564 27-09-2013, 02:38 PM
Last Post: seminar projects maker
  Building Java Web services with NetBeans 7 seminar projects maker 0 421 24-09-2013, 12:44 PM
Last Post: seminar projects maker
  JAD- JAVA APPLICATION DEVELOPER ppt seminar projects maker 0 478 12-09-2013, 12:07 PM
Last Post: seminar projects maker
  Java Features Report study tips 0 379 09-09-2013, 04:19 PM
Last Post: study tips
  Nymble: Blocking Misbehaving Users in Anonymizing Networks – JAVA/J2EE project uploader 9 4,715 23-08-2013, 09:42 AM
Last Post: ravimahesh2011
  JDBC (Java Database Connectivity) ppt study tips 0 572 20-07-2013, 04:37 PM
Last Post: study tips
  JAVA BASIC QUESTIONS study tips 0 430 04-07-2013, 02:41 PM
Last Post: study tips