JavaTM EE
(J2EE)
Programming (with Passion!)
Message to potential
attendees
The 13th
session started
from the November 19th, 2007. The
14th and the next session will start from July 1st, 2008.
Just
like
other online courses I
teach, this course is offered online only. For those of
you who are not sure what it's like to take this course online, please
see What
it's like to take Sang Shin's online courses. Just to set the
expectation correctly, there is no real-time webcasting.
The deadline for submitting all
homeworks is May 20th, 2008. If you submitted all homeworks,
please send an email to the homework alias (j2eehomeworks@sun.com) with
the following information. The subject of the email should be J2EECourse-2008-Spring.
- <First-name Last-name>, <Nationality or Country of
Origin>, <One paragraph you want to say about this course
(optional)>
- Sang Shin, Korea, This is a great course ....
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. (Please read registration FAQ
before you sign up.)
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...
If you have any further questions on this course, please see the course
FAQ
(Frequently Asked Questions).
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.
1. Introduction,
2. Web Core Technologies: Servlets and JSP,
3. JDBC/SQL/Ant/JUnit/Version Control,
4. Web-tier Security,
5. Struts,
6. Struts 2,
7. JavaServer Faces (JSF),
8. Other Web-tier Frameworks,
9.
EJB 2.x,
10. Java EE 5/EJB
3.0/JPA,
11. Design Patterns and Best
Practices,
12.
Hibernate,
13. Spring
framework,
14. Portal and
Portlet
- Introduction
- Web
Core
Technologies: Servlet and JSP
- JDBC, SQL,
- SQL (1 hour lecture + 1 hour lab)
- (Jan. 7th, 2008: Week #6) -
there
is no homework
- JDBC (1 hour lecture + 1 hour lab) - (Jan. 7th, 2008: Week #6) (homework #9)
- Web-tier Security
- Struts
- Struts
2
- Struts 2 Basics (2 hour lecture
+ 1 hour lab) -
(Feb. 18th, 2008: Week #10) (homework
#12)
- Struts 2 and Ajax ()
- Struts 2 and Tiles
- Struts 2 and view technologies
- JavaServer Faces
(JSF)
- 3rd-party JSF components
- Woodstocok JSF components
- JSF and Portal/Portlets
- Testing and Debugging tools
- Other
Web-tier Frameworks
- EJB 2.x
- Java
EE 5, EJB 3.0,
Java
Persistence API
(JPA)
- Design
patterns,
Best practices,
Performance tuning, etc
- Hibernate
- Spring
framework
- Spring framework and
persistence
- Spring framework Web-tier
technologies
- Portlets
and Portal
- Deployment, Provisioning, and Management
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 - updated Oct. 11th, 2006
- 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) - updated Oct. 13th, 2006
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) -
updated Oct.
13th, 2006
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.
1. Lab and homework (1 hour)
2. Lab 2 (0.5 hour) - will be provided in the future
- Rebuilding a WAR file as a NetBeans project (0.5 hour)
3. Resources
return to topics
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)
2. Lab and homework (1 hour) - since we
are not covering this topic in this course, the lab will be provided
sometime in the future
- 4007_jsp12tags.zip (Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/jsp12tags/index.html to proceed)
- Online lab document (This is the same document you will find in
the hands-on lab zip file)
- Homework
- Change log
3. Lab 2 (1 hour) - optional
4. Resources
return to topics
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
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)
2. Lab (1 hour)
- 4222_strutsdatabase.zip (Unzip it in a directory of your choice
and read lab document from
<unzip-directory>/strutsdatabase/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 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