Fall 2007 http://www.cis.ksu.edu 1
CIS 764 Database Systems Design
L5. Web -- JSP and Struts
Fall 2007 http://www.cis.ksu.edu 2
CIS 764 Database Systems Design
Homeworks: 4 digit id … due now picture and bio … due now review of web site features ??? JDev status …. Download in CIS .. Works in labs ……………not yet off-campus …. Not connect to Oracle yet install tables ??? reverse engr diagrams ???
contact Hankley to request other tutorial presentations
Fall 2007 http://www.cis.ksu.edu 3
CIS 764 Database Systems Design
status comments .. Report from TA:
what is Oracle ? accounts … users … cannot create a DB what is JDeveloper … demo of simple app?? Aditi on Thus. what is UML …. Do what you can for now.
self-learning ! personal calls
Fall 2007 http://www.cis.ksu.edu 4
CIS 764 Database Systems Design
JSP … several tutorials: http://www.jsptut.com/ (or http://www.visualbuilder.com/jsp/tutorial/ )
Getting familiar with your JSP server Your first JSP Adding dynamic content via expressions
Scriptlets Mixing Scriptlets and HTML Directives Declarations Tags Sessions Beans and Forms Processing Tag Libraries Form Editing Log-in pages Further learning
Fall 2007 http://www.cis.ksu.edu 5
CIS 764 Database Systems Design
Fall 2007 http://www.cis.ksu.edu 6
CIS 764 Database Systems Design
Web Applications
directory structure:
WebApp
WebPages
Web-INF
config-files
classes
aPkg
lib --------------------jars: struts, JDBC
[src]
Fall 2007 http://www.cis.ksu.edu 7
CIS 764 Database Systems Design
Struts: a (well structured) framework for JSP development, with tag libraries
Ref: Struts Survival Guide: Basics to Best Practices, S. Shenoy, N. Mallya Object Source, Austin, TX 2004
also: Apache , Jakarta project
Fall 2007 http://www.cis.ksu.edu 8
CIS 764 Database Systems Design
Fall 2007 http://www.cis.ksu.edu 9
CIS 764 Database Systems Design
Fall 2007 http://www.cis.ksu.edu 10
CIS 764 Database Systems Design
Fall 2007 http://www.cis.ksu.edu 11
Fall 2007 http://www.cis.ksu.edu 12
Fall 2007 http://www.cis.ksu.edu 13
CIS 764 Database Systems Design
Fall 2007 http://www.cis.ksu.edu 14
CIS 764 Database Systems Design
struts-config.xml
web.xml
servlets
mapping
session parms
listeners
tag libs
defaults
MIME
filters
Fall 2007 http://www.cis.ksu.edu 15
CIS 764 Database Systems Design
Fall 2007 http://www.cis.ksu.edu 16
CIS 764 Database Systems Design
Attribute description . Path URL (either full or suffix) which triggers this mapping
Type the full class name of the Action
Name name of the form bean
Scope session or request
Validate boolean: true => call validate method on the input data
Input actually, the page (or other Action) for error response
Forward page (or other Action) when ActionForward in exected
Fall 2007 http://www.cis.ksu.edu 17
CIS 764 Database Systems Design
Fall 2007 http://www.cis.ksu.edu 18
CIS 764 Database Systems Design
Oracle tutorials: “Creating an Input Form JSP Page Using the Struts Validator to Validate Data…”
http://www.oracle.com/technology/obe/obe_as_1012/j2ee/develop/client/strutsvalidator/validator.htm
Thursday: demo Homework: do the validator tutorial .. require an “admin” field to be your name! post few snapshots: developer mode + run it valid and invalid.
Fall 2007 http://www.cis.ksu.edu 19
CIS 764 Database Systems Design
end