what is servlet and what you get when we use servlets?

Answer Posted / divya.mamillapalli(mca)

Servlets are server side components that provide a powerful
mechanism for developing server side programs. Servlets
provide component-based, platform-independent methods for
building Web-based applications, without the performance
limitations of CGI programs. Unlike proprietary server
extension mechanisms (such as the Netscape Server
API or Apache modules), servlets are server as well as
platform-independent. This leaves you free to select a "best
of breed" strategy for your servers, platforms, and tools.
Using servlets web developers
can create fast and efficient server side application
which can run on any servlet enabled web server. Servlets
run entirely inside the Java Virtual Machine. Since the
Servlet runs at server side so it does not checks the
browser for compatibility. Servlets can access the entire
family of Java APIs, including the JDBC API to access
enterprise databases. Servlets can also access a library of
HTTP-specific calls, receive all the benefits of the mature
java language including portability, performance,
reusability, and crash protection. Today servlets are the
popular choice for building interactive web applications.
Third-party servlet containers are available for Apache Web
Server, Microsoft IIS, and others. Servlet containers are
usually the components of web and application servers, such
as BEA WebLogic Application Server, IBM WebSphere, Sun Java
System Web Server, Sun Java System Application Server and
others.

Servlets are not designed for a specific protocols. It is
different thing that they are most commonly used with the
HTTP protocols Servlets uses the classes in the java
packages javax.servlet and javax.servlet.http. Servlets
provides a way of creating the sophisticated server side
extensions in a server as they follow the standard framework
and use the highly portable java language.

.

Is This Answer Correct ?    9 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whether thread can be used in servlets?

731


How do cookies work in servlets?

583


What is servlet container. how it works?

617


What do you mean by singlethreadmodel interface?

582


How to notify an object in session when session is invalidated or timed-out?

634






How to handle exceptions thrown by application with another servlet?

617


What are the different session tracking techniques?

684


How will you pass values from HTML page to the servlet?

557


What is the difference between the servlets and cgi programs?

551


Can servlet have a constructor ?

598


Why HttpServlet class is declared abstract?

650


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

569


What is pure servlet?

698


Write a simple servlet program to print the contents of html.

552


What if you need to span your transaction across multiple servlet invocations?

585