Servlets technology awareness - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Servlets technology awareness

Description:

The object of this session is to introduce web-enabling servlet ... http://www.ibazaar.com/jasp/servlets.shtm. http://www.cetus-links.org/oo_java_servlets.html ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 9
Provided by: jonathan76
Category:

less

Transcript and Presenter's Notes

Title: Servlets technology awareness


1
Servlets - technology awareness
  • The object of this session is to introduce
    web-enabling servlet technology
  • Servlets are based on Java technology
  • Servlets are also based on HTTP (Web) technology

2
Servlets - technology awareness
  • Like anything in Java it takes time to get used
    to
  • Simple once you know Java understand the
    libraries
  • Why are they not used by many firms for
    e-commerce?
  • Maybe just inertia? Steep learning curve?

3
What is a Servlet?
  • A servlet is a Java program that runs on a server
    and produces HTML pages dynamically
  • A servlet produces HTML pages in response to
    client requests - these pages are sent to the
    clients web browser
  • The trick is that a servlet may perform any
    operation that a Java application does e.g access
    a database
  • You can send to the client HTML pages and forms
    with embedded data

4
Nuts and bolts
  • A servlet is a Java class that implements the
    Servlet interface
  • A servlet runs in the context of a process called
    a servlet engine
  • Servlets can be invoked by a variety of clients -
    i.e. web browser, JavaServer Pages and .shtml or
    .ssi, server-side includes
  • Just like applets, servlets use the Java Virtual
    Machine(JVM)

5
Benefits of Servlets
  • Servlets web-enable your application - they are
    an alternative to CGI based applications
  • Servlet class object can exist in a servlet
    engine in anticipation of a request - this is
    handy
  • response quick to client requests
  • can handle multiple clients simultaneously
  • Servlets are secure - files are on the secure
    side of the firewall

6
Benefits of Servlets
  • Used as an alternative to applets in a (very)
    thin client internet solution - this is the
    preferred industry solution
  • can be used with a variety of database drivers
  • e.g. JDBC, ODBC
  • Can connect to standard databases

7
Life cycle of a Servlet
  • Load (done by Servlet engine)
  • Initialise
  • Execute
  • Destroy
  • All work is done inside the server
  • After initial setup client response is fast

8
Sources for servlets
  • In true object-oriented fashion we can find
    pre-written servlets on the web
  • e.g.
  • http//www.ibazaar.com/jasp/servlets.shtm
  • http//www.cetus-links.org/oo_java_servlets.html
  • And free server software to test them
  • http//java.about.com/cs/servlets/a/tomcat.htm
Write a Comment
User Comments (0)
About PowerShow.com