|
Java Servlets ProgrammingWhat are Java Servlets?
Servlets are generic extensions to
Java-enabled servers. Their most common use is to extend Web servers, providing a very
secure, portable, and easy-to-use replacement for CGI. A servlet is a dynamically loaded
module that services requests from a Web server. It runs entirely inside the Java Virtual
Machine. Because the servlet is running on the server side, it does not depend on browser
compatibility.
Java Servlet Application Development
Servlets can be used for any number of
Web-related applications. The following are three examples :
- Developing e-commerce "store
fronts" will become one of the most common uses for Java servlets. A servlet can
build an online catalog based on the contents of a database. It can then present this
catalog to the customer using dynamic HTML. The customer will choose the items to be
ordered, enter the shipping and billing information, and then submit the data to the
servlet. When the servlet receives the posted data, it will process the orders and place
them in the database for fulfillment. Every one of these processes can be easily
implemented using Java servlets.
- Servlets can be used to deploy Websites
that open up large legacy systems on the Internet. Many companies have massive amounts of
data stored on large mainframe systems. These businesses do not want to re-architect their
systems, so they choose to provide inexpensive Web interfaces into them. Because you have
the entire JDK at your disposal and security provided by the Web server, you can use
servlets to interface into these systems using anything from TCP/IP to CORBA.
These are just two examples of the power and practicality of using Java servlets. Servlets
are very viable options for most Web applications.
|