Servlet Training Overview
Duration: 5 days
Our course is specially designed for the engineering graduates, who want to make a career in the Software development field. We even assist the IT –professionals who want to shift on to the java software developments. Software companies take our services to train their fresh engineers.
Servlets Course duration is of the 5 days and during the training period we provide them expert training and hands on exercise to really master the Server-Side Technologies like Servlets.
This training session aims to teach the beginners to develop database-driven Web applications using Servlets.
Location: Onsite or at our premises
Prerequisites to learn Servlets
Knowledge of HTML
A prior knowledge of object-oriented or object-based programming,
Windows 2000,Xp or above
Java SE SDK, version 1.5.0 or later
Web Server - Tomcat 5.0 or later
Knowledge of SQL and other relational databases.
class is 60% hands-on, 40% lecture
Course Content day wise:
Understanding Java Serlets
- What are Servlets ? Servlets Vs Applets.
- Comparing Servlets with the CGI scripts
- How servlets fits in the distributed environments.
- What is a web application?
- Role of a web application server.
- What does a Webserver do?
- What are Servlet Containers?
- How does it Handles the HTTP Requests?
- Tomcat web server: Understanding Servlet Containers.
- Architecture of servlet package
- Advantages the Servlet API
Structure and deployment
- Directory structure of a web application
- Understanding the document root directory
- Understanding the WEB-INF directory
- The web archive (WAR) file
- Difference between jar & war files?
- Configuring a web application.
- The deployment descriptor: an overview
- A simple deployment descriptor
- Using the <servlet> element
- Using the <servlet-mapping> element
- Mapping a URL to a servlet
Day 2 :
The Servlet model
- Web browsers and HTTP methods.
Comparing HTTP methods.
Servlet life cycle
Loading and instantiating a servlet.
Initializing a servlet.
Servicing client requests.
Destroying a servlet .
Unloading a servlet.
Servlet state transition from the servlet container's perspective.
Define Servlet Config
Sharing the data (attribute scopes)
- Coordinating servlets using RequestDispatcher
Redirect Vs RequestDispatcher.
The servlet container model
- Initializing ServletContext
Understanding application events and listeners.
Web applications in a distributed environment.
Day 3 :
- About Session
- Understanding state and sessions
- About HTTP
- Session Tracking methods:
Add Cookie to the response
Get Cookie from the request
More methods of cookie object
Understanding the benefits and drawbacks of cookies
About URL rewriting.
Understanding the benefits of URL rewriting.
- Session Tracking API:
Developing thread-safe servlets
Obtaining a session object
Setting information to the session
Getting information from session
Deleting information from session
Synchronizing block of code
Using SingleThreadModel interface
- Filter and Servlet
Filter Life Cycle
- Configuring Filters
Declaring Filters with initialization parameter
Declaring Filter mapping to a URL pattern
Declaring Filter mapping to a servlet name
- Container's rule for ordering filters
Using filters to do preprocessing
Using filters to block response
Using filters to modify response
Programming Customized Requests and Responses
Handling server-side exceptions
- Handling exceptions programmatically
- Handling exceptions declaratively
- Using declarative exception handling
- Using RequestDispatcher to handle exceptions.
Day 5 :
Accessing Databases with JDBC
- Overview of JDBC technology
- JDBC drivers
- Basic steps in using JDBC
- Retrieving data from a ResultSet
- Using prepared and callable statements
- Handling SQL exceptions
Note: This outline presumes that Apache Tomcat will be used to execute the servlets. However, all code taught will run on any Java platform, including BEA
WebLogic, and IBM WebSphere.