Build a Working Environment

 

Context

Servlet Engine
 

 

Permissions

Login locally

Administrative Access

 

 

Install Tomcat

v 5.5.4

 

 

Install JDK

v 1.5

 

 

Update Classpath

.;

Servlet-api.jar


 

Hello, World Servlet

Create Directory Structure

Locate Servlet API Documentation

Write Servlet

Compile Servlet

Deploy Servlet (locally)

Test Servlet

 

 

 

 

Example

Login  System

 

 

 

Technical issues

Application

Control Servlet
View JSPs
Model POJO
Recognizing originating view
Recognizing User Action/Intent
Interacting with the Model
Passing control to another component
Passing Model results from control to another component
Scope/Duration of state

Tools

J2EE Project
Web Project
Struts Framework & tools
HTML/JSPs

Constructs

Java packages for actions, formBeans, & models
ActionForward
ActionErrors
request.getSession();
(String)request.getParameter("userAction")
mapping.findForward("name")
request.setAttribute("name", formbean)
session.setAttribute("name", formbean)
return forward

 

 

Code

FormBeanLogin
ActionCreateLogin
ModelLogin
createLogin.jsp