JavaTM EE
(J2EE)
Programming (with Passion!) Basics
Message to potential
attendees

Announcement from Sang Shin (Feb.
1st, 2010): In
the near future, the
courses in javapassion.com will be available as a subscription-based
service. (Yes, it is a painful decision on my part.) If you want
to
receive course announcement in the future, please send an blank email
to
javapassion-announcement+subscribe@googlegroups.com.
If you have any further questions, please see
http://www.javapassion.com/coursefaq.html#conversion.
How to register for
this course
In order to register for this course, all you have to do is sending
a blank email to the following email alias.
Basically, when you send a blank email to the above, you are
subscribing our
class
forum. This forum can be used for posting
questions/answers. Please use this forum for all class related
communication (technical or non-technical). If you have any
further questions on this course, please see the course FAQ below
Topics
and Schedule
Note
that only the topics
with the
dates assigned will be covered in this
course. (You need to submit homeworks only on the topics that have
dates.) It is my plan to provide presentation slides and hands-on
labs for the topics that do not have dates whenever I find time.
- Introduction
- Web
Core
Technologies: Servlet and JSP
- JDBC, SQL,
- SQL
(1 hour lecture + 1 hour lab)
- (Oct. 28th, 2009) -
there
is no homework
- JDBC (1 hour lecture + 1 hour lab) - (Nov. 1st, 2009) (homework #9)
- Web-tier Security
- Struts
- JavaServer Faces
(JSF)
- IceFaces
- JSF and Portal/Portlets
- Testing and Debugging tools
Introduction of this
course
1. Presentation slides (0.5 hour)
Java EE Overview
The objective of this session is to give
you a big picture of Java EE architecture and platform and get yourself
prepared for the rest of the course. You don't have to understand
everything that is described in the presentation below. If you
get reasonably good idea on what Java EE is, that should be good enough
to proceed. Please browse through the Resources below.
There is no homework in the week #1.
1. Presentation slides (1 hour)
return to topics
Web Core Technologies:
Servlets,
JSP, and JSTL
Web Application
Structure
In this session, you will learn how a
typical Web application is built. You will also learn the
internal structure of Web application as well as web.xml file.
1. Presentation slides (1 hour)
2. Lab (1 hour) and homework - The hands-on lab is updated with
NetBeans 6.1.
- 4001_webappstructure.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/webappstructure/index.html to proceed)
- Online
lab document (This is the same document you will find in the
hands-on lab zip file)
- Homework
(This is the same homework you will find in the
hands-on lab zip file)
- Change
log
return to topics
Servlet Basics
You are getting into a very
important
topic, Servlet. I expect
many of you who get exposed to the
Servlet for the first
time might feel overwhelmed by the
amount of things you feel you have to absorb. Given that
the Servlet technology is the most-used functionality of J2EE platform,
there are in fact lots of things to learn.
1. Presentation slides (2 hours)
2. Lab and homework (1 hour)
3. Resources
return
to topics
JSP Basics
I assume by now, most
of you are relatively
comfortable with
building and deploying Servlet based Web applications. In this session, you will
learn
basic
concept of JSP (JavaServer Pages) which is as equally important
Web-tier technology as Servlet. You will also learn how to build
a
simple JSP pages using JavaBeans.
1. Presentation slides (2 hours)
2. Lab and homework (2 hours)
3. Resources
return
to topics
Using NetBeans for
Developing Web Applications
In this session, you are going to do a
lab during which you exercise various features of NetBeans IDE.
Servlet Advanced
By now, you have reasonably good idea
on how you can use basic features of Servlets and JSP to build Web
applications. In this session, you are going to learn advanced
features of Sevlets, mainly filters and life-cycle events.
1. Presentation slides - ServletAdvanced
(1 hour)
2. Presentation slides - Servlet 2.4
Enhancements
3. Lab and homework (1 hour)
return
to topics
Session Tracking
Session tracking is a mechanism that
servlets use to maintain state about a series of requests from the same
user (that is, requests originating from the same browser) across some
period of time.
1. Presentation slides (1 hour)
2. Lab and homework (1 hour)
3. Resources
return
to topics
Expression Language
A primary feature of JSP technology
version 2.0 is its support for an expression language (EL). An
expression language makes it possible to easily access application data
stored in JavaBeans components. For example, the JSP expression
language allows a page author to access a bean using simple syntax such
as ${name} for a simple variable or ${name.foo.bar} for a nested
property.
1. Presentation slides
2. Lab and homework (0.5 hour)
return
to topics
JSP 1.2 Custom Tags - We are not
covering this topic in this course
Since the introduction of JSP 2.0 style
tag files, the JSP 1.2 style development of custom tags should be
avoided whenever possible meaning if you can develop your custom tags
using tag files, you should use tag files. Because of that
reason, we are skipping this topic in this course.
1. Presentation slides (2 hours)
JSP 2.0 Custom Tags
In this session, you are going learn
how to build and use simple tag handler and tag file features of JSP
2.0.
1. Presentation slides (1 hour)
2. Lab and homework(1 hour)
3. Resources
return
to topics
JSTL
The JavaServer Pages Standard Tag
Library (JSTL) encapsulates core functionality common to many JSP
applications. Instead of mixing tags from numerous vendors in your JSP
applications, JSTL allows you to employ a single, standard set of tags.
This standardization allows you to deploy your applications on any JSP
container supporting JSTL and makes it more likely that the
implementation of the tags is optimized.
1. Presentation slides (2 hours)
2. Labs (2 hours)
3. Resources
return
to topics
Building
BookStore Sample Application
In this
session, you will build the "Duke's Bookstore" sample application,
which is reasonably sophisticated application using different Web-tier
technologies, first by using Servlets only, second by using JSP pages
only, third by using JSP pages and custom tags, fourth by using JSP
pages and JSTL in native format, fifth by using JSPpages and JSTL in
XML format
Applets
1. Presentation slides (2 hours)
- PDF: 1 slide
per page
- OpenOffice file
2. Labs (2 hours)
- 4015_jstlexamples.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jstlexamples/index.html to proceed) - work in
progress
- Online
lab document (This is the same document you will find in
the hands-on lab zip file
- Homework
- Change
log
3. Resources
return
to topics
SQL
SQL is a standard computer language for
accessing and manipulating relational databases. Even though Java
persistence technologies such as EJB 3.0 Java Persistence API (JPA) or
Hibernate could insulate developers from having to know the detailes of
SQL, it is still important to know the intricacies of SQL in order to
be able to write highly performant Java EE applications which involves
persisting data to the relational database.
1. Presentation slides (1 hour)
2. Lab (1 hour)
Since the SQL tutorial from w3cschools.com seems to be the best
tutorial, I have decided to use the material as the hands-on lab for
the topic of SQL. There is no homework on this topic.
3. Resources
4. Configuration paramater values for databases
- Java DB (Derby)
- jdbc:derby://localhost:1527/mydatabase (URL)
- org.apache.derby.jdbc.ClientDriver (Driver class)
- app (Username)
- app (Password)
- MySQL
- jdbc:mysql://localhost:3306/test (URL)
- com.mysql.jdbc.Driver (Driver class)
- MySQL Connector/J (Driver name)
- no username
- no password
- org.hibernate.dialect.MySQLDialect
- HSQL
- jdbc:hsqldb:file:messagedb
- org.hsqldb.jdbcDriver
- sa
- no password
- org.hibernate.dialect.HSQLDialect
return
to topics
JDBC
JDBC is standard Java API for accessing
amdn manipulating relational database through SQL. Even though
Java persistence technologies such as EJB 3.0 Java
Persistence API (JPA) or Hibernate could provide higher layer
abstraction than JDBC, JDBC is still one of the most popular Java APIs
for persisting data to the relational database.
1. Presentation slides (1 hour)
2. Lab (1 hour)
return
to topics
Security Basics
Security is one of the most important
areas of distributed computing.
1. Presentation slides (1 hour)
return
to topics
Web Application Security
1. Presentation slides (1 hour)
2. Lab (1 hour)
return
to topics
SSL
1. Presentation slides (1 hour)
return
to topics
Web Application
Security Threats and Counter-Measures
1. Presentation slides (1 hour)
2. Labs (1 hour)
- 4010_websecthreats.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/websecthreats/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
3. Resources
return
to topics
MVC
(Model-View-Controller) Framework
1. Presentation slides (1 hour)
return
to topics
Struts Basics
In its short existence, Struts has
established itself as a popular web
application framework that is based on MVC (Model-View-Controller)
architecture. Even though new generation of Web application
frameworks such as JavaServer Faces (JSF) and Tapestry are providing
more advanced features, Struts is still being used widely in the field.
1. Presentation slides (1 hour)
2. Lab (2 hours)
3. Resources
- Tutorials
- Struts related web sites
return
to topics
Step by Step
Guide for Building a Simple Struts Application
1. Presentation slides (1 hour)
return
to topics
Struts Sample Applications
1. Lab (2 hours) - the contents
will be updated in the future
- 4207_strutsexamples.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/strutsexamples/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
return
to topics
Struts Tags
1. Presentation slides (1 hour)
2. Labs (2 hours) - the contents
will be updated in the future
- 4209_strutstags.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/strutsttags/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
return
to topics
Struts Advanced
1. Presentation slides (1 hour)
2. Labs (2 hours) - they are not ready
yet!
- 4209_strutsadv.zip (Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/strutsadv/index.html to proceed)
- Online lab document (This is the same document you will find in
the hands-on lab zip file)
return
to topics
Struts Validation
Framework
1. Presentation slides (1 hour)
2. Lab (1 hour) - the contents will be
updated in the future
- 4210_strutsvalidator.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/strutsvalidation/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
return
to topics
Tiles Framework
1. Presentation slides (1 hour)
2. Lab (1 hour) - the contents
will be updated in the future
3. Resources
return
to topics
Struts Testing,
Debugging, Logging, and Performance
1. Presentation slides (1 hour)
2. Lab (1 hour)
- 4220_strutstestcase.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/strutstestcase/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
3. Resources
return
to topics
Struts Best Practices
1. Presentation slides (1 hour)
return
to topics
Struts and Databases
1. Presentation slides (1 hour)
return
to topics
Struts Security
1. Presentation slides (1 hour)
return
to topics
Building "Hello
World" JSF applications
This is to build and run a simplest
possible JSF application step by step and make sure the software is
working correctly.
1. Lab (1 hour)
- 4101_jsfhelloworld.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfhelloworld/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
return
to topics
Step by step
for building "Guess a Number" JSF application
You are going to build a
simple "Hello World" sample JavaServer Faces (JSF) application
exercising the basic features of a typical MVC-based Web application
framework of JSF architecture such as request dispatching, navigation,
event handling, and so on. These features will be more clearly
explanined in the following presentation - JSF Basics - but the goal is
to build an application first and see how it works.
1. Presentation slides
JSF basics
The basic concepts of JSF architecture
and features will be discussed.
1. Presentation slides (1.5 hour)
JSF Component Model
1. Presentation slides (1.5 hour)
2. Lab (1 hour)
In JSF framework, a component tree gets constructed whenever a page
(that contains JSF UI components are used) is accessed. Since
this
component tree is a fundamental piece of JSF architecture, it is
important to understand the concept of it. This lab lets you
access
and display this component tree.
3. Resources
JSF tags
One popular markup language that your
application will support is obviously HTML. In this session, you
will learn various JSF-based tags for the HTML browser client.
1. Presentation slides (1 hour)
Managed Beans
1. Presentation slides (1 hour)
2. Lab 1 - Do the exercise 3 (1 hour)
- 4104_jsfguessnumber.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfguessnumber/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
3. Resources
return
to topics
Navigation
1. Presentation slides (1 hour)
2. Lab 1 - Do the exercise 4 (1 hour)
- 4104_jsfguessnumber.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfguessnumber/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
3. Lab 2
- 4129_jsfnavigation.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfnavigation/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
4. Resources
return
to topics
Event model
1. Presentation slides (1.5 hour) -
todo: add differences between action and actionListerner in JSF 1.2
Life-cycle and PhaseListener
1. Presentation slides (1.5 hour)
2. Lab
Immediate Attribute
1. Presentation slides (0.5 hour)
2. Lab
Styling with CSS
1. Presentation slides (1.5 hour)
2. Lab
Validation
1. Presentation slides (1.5 hour) - todo:
make sure all validation strategies are covered
2. Lab 1 - Do the exercise 5! (20 minutes)
3. Lab 2
3. Resources
return
to topics
Client-side Vadliation
1. Presentation slides (1.5 hour)
Converter
1. Presentation slides (1.5 hour) - todo:
list all built-in converters
Data Table
1. Presentation slides (1.5 hour)
JSF and Persistence (JPA)
1. Presentation slides (1.5 hour)
2. Lab
- 4133_jsfjpa.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfjpa/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
3. Resources
return
to topics
Walk-through of
CarStore Sample Application
1. Presentation slides (1.5 hour)
Walk-through of
BookStore6 Sample Application
Java EE 5 tutorial comes with sample JSF application
called bookstore6 in the form of NetBeans project.
1. Lab
- 4119_jsfbookstore.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfbookstore/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
return
to topics
Building Some
JSF Sample
Applications
Tiles
1. Presentation slides (1.5 hour) - todo:
How tiles are integrated with JSF
2. Lab
- 4124_jsftiles.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsftiles/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
3. Resources
return
to topics
NetBeans Visual Web
Pack Basics
1. Presentation slides (1.5 hour)
NetBeans Visual Web
Pack Advanced
Building a JSF Component
1. Presentation slides (1.5 hour)
2. Presentation slides - this is
JavaOne 2007 presentation by Kito Man
3. Lab 1
- 4113_jsfcomponentbuild.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfcomponentbuild/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
4. Lab 2
- 4430_jsfcustom.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfcustom/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
RenderKit
1. Presentation slides (1.5 hour)
- PDF:
1 slide per page
- OpenOffice file
2. Lab
- 4109_jsfrenderkit.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/jsfrenderkit/index.html to proceed) Note: You
should do this lab whil
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
Shale Dialog
1. Presentation slides (1.5 hour)
2. Lab
- 4131_jsfshale.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/jsfshale/index.html to proceed) Note: You
should do this lab whil
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
return
to topics
Facelets
1. Presentation slides
(originally by Çagatay Çivici, modified slightly by Sang Shin)
2. Lab 1 (1.5 hour)
- 4106_jsffacelets.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/jsffacelets/index.html to proceed) Note: You
should do this lab whil
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
3. Lab 2 (1 hour)
- 4107_jsffaceletscdstore.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/jsffaceletscdstore/index.html to proceed) Note:
You
should do this lab whil
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
4. Lab 4 (1 hour) - Optional
5. Resources
- Facelets websites
- Facelets tutotials and articles
- NetBeans support on Facelets articles and tutorials
return
to topics
Spring Web Flow and JSF
1. Presentation slides (1 hour)
2. Presentation slides (1.5 hour) - This
is JavaOne 2007 presentation
3. Lab
4. Resources
- Web sites
- Tutorials and articles
return
to topics
Spring framework and JSF
integration
1. Presentation slides (1.5 hour) - This
is JavaOne 2007 presentation by Kito Mann and Chris Richardson
JSFTemplating
1. Presentation slides (1.5 hour) - This
is JavaOne 2007 presentation by xxx
Building Useful
Components
(from Core JSF book)
1. Presentation slides (1.5 hour)
- PDF:
1 slide per page
- Star Office
2. Lab 1
- 4115_jsfcomponentbuild2.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfcomponentbuild2/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
Tomahawk JSF
Components (from MyFaces Apache project)
1. Lab
- 4116_jsftomahawk.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsftomahawk/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
ADF components
1. Lab
- 4117_jsfadf.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfadf/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
Misc. 3rd party JSF
components
DynaFaces
1. Presentation slide - Introduction to
DynaFaces
2. Presentation slide - Using DynaFaces
Ajax4jsf
1. Lab
- 4122_jsfajax4jsf.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfajax4jsf/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
JSF and Portlets
1. Presentation slides (1.5 hour)
- PDF:
1 slide per page
- StartOffice
2. Lab
- 4122_jsfajax4jsf.zip
(Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsfajax4jsf/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
Testing tools
1. Presentation slides (1.5 hour)
Localization
1. Presentation slides (1.5 hour)
EJB 2.x (as part of J2EE 1.4)
EJB 2.x Overview
1. Presentation slides (1 hour)
2. Lab and homework (2 hours) - work in
progress
- 4281_j2eeejb2.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/ajaxshale/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
return
to topics
Message Driven Bean (MDB)
- Pre-class reading
- Presentation
- PDF:
1 slide per page
- Detailed notes
- OpenOffice file
return
to topics
JMS
1. Pre-class reading
2 Presentation slides (1 hour)
3. Lab and homework (2 hours)
- 4281_j2eejms.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/ajaxshale/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
4. Resources
return
to topics
Session Bean (EJB 2.x)
1. Presentation slides (1 hour)
return
to topics
Entity Beans (EJB 2.x)
1. Presentation slides (1 hour)
return
to topics