Java Servlet& Server side progaramming, Slides of Java Programming

In-depth knowledge about java servlet

Typology: Slides

2025/2026

Available from 01/20/2026

shubham-naikwade
shubham-naikwade 🇮🇳

1 document

1 / 123

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Java Servlet& Server side progaramming and more Slides Java Programming in PDF only on Docsity!

Disadvantages of CGI

There are many problems in CGI technology:

  • If number of clients increases, it takes more time

for sending response.

  • For each request, it starts a process and Web

server is limited to start processes.

  • It uses platform dependent language e.g. C,

C++, perl.

Advantage of Servlet

  • The web container creates threads for handling

the multiple requests to the servlet.

  • Threads have a lot of benefits over the

Processes such as they share a common

memory area, lightweight, cost of

communication between the threads are low.

The basic benefits of servlet are as follows:

  • Better performance: because it creates a thread for each request not process.
  • Portability: because it uses java language.
  • Robust: Servlets are managed by JVM so we don't need to worry about memory leak, garbage collection etc.
  • Secure: because it uses java language

Benefits of servlet

  • Portability
  • Powerful
  • Efficiency
  • Safety
  • Integration
  • Extensibility
  • Inexpensive
  • Secure
  • Performance

Anatomy of a Servlet

• init()

• destroy()

• service()

  • doGet()
  • doPost()
  • Servlet API life cycle methods
    • init(): called when servlet is instantiated; must return before any other methods will be called
    • service(): method called directly by server when an HTTP request is received; default service() method calls doGet() (or related methods covered later)
    • destroy(): called when server shuts down