Serverlet: Nhóm: 7 Nguyễn Hoàng Nam Nguyễn Việt Cường Lê Thị Ngọc Châm
Serverlet: Nhóm: 7 Nguyễn Hoàng Nam Nguyễn Việt Cường Lê Thị Ngọc Châm
Nhm : 7
Nguyn Hong Nam
Nguyn Vit Cng
L Th Ngc Chm
Servlet
I. Introduction
II.Servlet Architecture
III.Servlet Tasks
IV.Servlet packages
V. Environment
VI.Life cycle
VII.Extension
I. Introduction
-
Java Servlets are Java classes run by a web server that has an
interpreter that supports the Java Servlet specification.
Java servlets have been created and compiled just like any other
Java class.
V. Environment
This development environment setup involves
following steps:
- Setting up Java Development Kit
- Setting up Web Server: Tomcat
- Setting up CLASSPATH
The init() method is designed to be called only once. It is called when the
servlet is first created, and not called again for each user request.
VII. Extention
1. Cookies handling
- Cookies are text files stored on the client computer and they are kept
for various information tracking purpose. Java Servlets transparently
supports HTTP cookies.
+ Server script sends a set of cookies to the browser. For
example name, age, or identification number etc.
+ Browser stores this information on local machine for future
use.
+ When next time browser sends any request to web server then
it sends those cookies information to the server and server uses
that information to identify the user.