answersLogoWhite

0


Best Answer

Servlets are an integral part of any J2EE Web application. The key benefits of using Servlets in our web applications are:

a. They are faster than CGI scripts because each CGI script produces an entirely new process that takes a lot of time to execute, whereas a servlet creates only a new thread.

b. Servlet API is standard and available easily on the internet (like JSPs)

c. Servlets have the advantages like ease of development & platform independence (like Java)

d. They can access all the J2SE and J2EE APIs

e. Can take the full advantage & capabilities of the Java programming langauge

As you can see, there are numerous advantages of using the Servlet & JSP technologies. This is exactly why numerous organizations use them as a staple part of their J2EE application development work.

The Disadvantage would be that Servlets are a little difficult to learn and use.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

Servlets are the Java platform technology of choice for extending and enhancing Web servers. Servlets provide a component-based, platform-independent method for building Web-based applications, without the performance limitations of CGI programs.Servlets create dynamic web pages.

The advantage of Servlets is,

n Portability

o Portable across operating systems and across web servers

n Power

o Harness the full power of the core Java APIs: networking and URL access, multithreading, image manipulation, data compression, JDBC, object serialization, internationalization

n Efficiency & Endurance

o Memory resident, so invocation highly efficient---no process to spawn or interpreter to invoke

n Safety

o Support safe programming since inherit Java's strong type safety, exception-handling mechanism

n Elegance

o Code is clean, object-oriented, modular, and simple (i.e.. Session tracking, cookie)

n Integration

o Tightly integrated with the server---translate file paths, perform logging, check authorization, and MIME type mapping

The disadvantage of Servlets is,

n Web Administrator will need to learn how to install and maintain Java Servlets

n Tedious uses of out.println() statements

o Can be remedied by using Java Server Page (JSP)

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the advantages and disadvantages of servlet?
Write your answer...
Submit
Still have questions?
magnify glass
imp