Ampli-Servlets - SERVLET PROGRAMMING Agenda Overview of Servlets Overview of Servlet API's Servlet LifeCycle Request and Responses Serving Static

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
SERVLET PROGRAMMING
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Agenda Overview of Servlets Overview of Servlet API’s Servlet LifeCycle Request and Responses   
Background image of page 2
Serving Static HTML Web servers where designed to provide web browsers with HTML. The HTML was read from text files by the server and sent to the client using HTTP. The web server does not modify the HTML. This is now termed static HTML serving CCTM: Course material developed by James King ([email protected] Client Machine Server Machine Web Browser Web Server HTML doGet or doPost HTML HTML Web Page on disk
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The Solution – Run an external program to generate the HTML A better choice is to arrange it so that when a certain web page is accessed an external program is run by the web server and that program generates the HTML => web server must know how to run and communicate with application. This process is transparent to the web browser. It just receives HTML and does not know it has been dynamically generated => web browser does not need to be modified CGI C ommon G ateway I nterface is one way for a web server to run external applications. Servlets is another way. Client Machine Server Machine Web Browser Web Server HTML doGet or doPost HTML Information about the request External HTML generator HTML CCTM: Course material developed by James King ([email protected]
Background image of page 4
Servlets - a solution for dynamically generating HTML Servlets are programs written in Java which run on the web server and communicate using with the web browser using HTTP and HTML Servlets are compatible with all web browsers because servlets communicate with the browser using only HTML and HTTP Servlets are simple to write because they are written in standard Java Most of the communication is done for you by the Servlet class. No need to mess around with Sockets, TCP/IP or Java serialisation. Servlets run only on the server and therefore do not need Java any other programming language to be installed on the client Servlets do need the servlet to be stored or installed on the CCTM: Course material developed by James King ([email protected]
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Overview of Servlets  - All servlets are classes that either implement the Servlet interface or extend a class that implements the Servlet interface - The Servlet interface provides the interfaces for the methods that manage servlets and their interactions with clients
Background image of page 6
Overview of Servlets  - Servlet runs inside a Java Virtual Machine (JVM) on the server,so it is safe and portable . - handled by separate threads within the web server process efficient and scalable - Operate solely within the domain of the server        - Java Servlets are portable: across operating systems across web servers, since all major web servers support servlets.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Overview of Servlet API’s Servlets are part of the Java language, but not part of the core Java API. Tools Required:-
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/27/2011 for the course COMPUTER S 133 taught by Professor Andrewstrauss during the Spring '11 term at Bucks Community College.

Page1 / 28

Ampli-Servlets - SERVLET PROGRAMMING Agenda Overview of Servlets Overview of Servlet API's Servlet LifeCycle Request and Responses Serving Static

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online