Myhelloworld
Myhelloworld
jsp
<html>
<head>
<title>Hello World (JSP & Java Bean Example)</title>
</head>
<body>
<h1 align="center">Hello World (JSP & Java Bean Example)</h1>
Bean Example MyHelloWorld.getStrMyMessage(): <%=
MyHelloWorld.getStrMyMessage() %>
</body>
</html>
--myhelloworld_jstl.jsp
"
MyHelloWorldServlet.java
package myeclipse;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
--- MyHelloWorldBean.java
package myeclipse;
import java.util.*;
String strMyMessage;
public MyHelloWorldBean() {
reset();
}
----index.jsp
<html>
<head>
<title>App Index for: mytomcat-eclipse-helloworld</title>
</head>
<body>
<h1 align="center">App Index for: mytomcat-eclipse-helloworld</h1>
<ul>
<li>
<a href="pages/myhelloworld_jstl.jsp">pages/myhelloworld_jstl.jsp</a> -
JSTL Hello World Example
</li>
<li>
<a href="pages/myhelloworld_bean.jsp">pages/myhelloworld_bean.jsp</a> -
JSP & Java Bean Hello World Example
</li>
<li>
<a href="servlet/MyHelloWorldServlet">servlet/MyHelloWorldServlet</a> -
Servlet Hello World Example
</li>
<a href="servlet/HelloWorldExample">
</ul>
</body>
</html>
web.xml
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- Define servlets that are included in the example application -->
<servlet>
<servlet-name>MyHelloWorldServlet</servlet-name>
<servlet-class>myeclipse.MyHelloWorldServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MyHelloWorldServlet</servlet-name>
<url-pattern>/servlet/MyHelloWorldServlet</url-pattern>
</servlet-mapping>
</web-app>
List of Directories:
\WEB-INF
\WEB-INF\lib
\WEB-INF\src
\WEB-INF\src\java
\WEB-INF\src\myeclipse
\WEB-INF\classes
\pages
List of files:
\index.jsp
\pages
\pages\myhelloworld_bean.jsp
\pages\myhelloworld_jstl.jsp
\WEB-INF\web.xml
\WEB-INF\lib\jstl.jar - copy this file.
\WEB-INF\lib\standard.jar - copy this file.
\WEB-INF\src\myeclipse\MyHelloWorldBean.java
\WEB-INF\src\myeclipse\MyHelloWorldServlet.java
Duration: 5 days
The course is organized into four modules. The first covers several general-purpose topics such
as writing multi-threaded applications, the Reflection API, and network programming using
sockets. Then the course takes up the challenge of building multi-tier applications using the
standard Java platform. Multi-tier development most frequently uses the Java 2 Platform,
Enterprise Edition, or J2EE, and we have a wide range of courses in that area. However it is
quite possible to build lightweight multi-tier applications using only J2SE, and for some
purposes the J2EE is more trouble than it's worth. So the course looks at each of the traditional
tiers and the J2SE APIs most suited to developing them. The second module of the course covers
the Java Foundation Classes, or JFC, for building graphical user interfaces (GUIs) for the
presentation tier. The third module introduces Java Remote Method Invocation, or RMI, as a
way of distributing Java objects over multiple processes, which may be spread over a network of
machines; this provides a means of developing a separate business tier. Finally, the fourth
module teaches the Java Database Connectivity, or JDBC, API, for the persistence tier.
Students will complete the course with a good working knowledge of each of these technologies,
prepared to build distributed Java applications and to pursue JFC, RMI, or JDBC in greater
depth.
Students must be experienced Java programmers, able to build, test, and debug complex
applications using structured and object- oriented code designs, and familiar with the Collections
API and Java exception-handling.
1. Threads
o Java Thread Model
o Threads and ThreadGroups
o Creating and Running Threads
o Manipulating Thread State
o Creating Thread Classes
o Thread Synchronization
o Java 1.5: Concurrency Library wait and notify join and sleep
2. Reflection Uses for Meta-Data
o The Reflection API
o The Class Class
o The java.lang.reflect Package
o Reading Type Information
o Navigating Inheritance Trees
o Dynamic Instantiation
o Dynamic Invocation
o Java 1.5: Annotations and Aspect-Oriented Programming
3. Serialization
o The Challenge of Object Serialization
o Serialization
o API Serializable Interface
o ObjectInputStream and ObjectOutputStream
o The Serialization Engine
o Transient Fields
o readObject and writeObject
o Externalizable Interface
4. Sockets
o The OSI Reference Model
o Network Protocols
o The Socket Class
o The ServerSocket Class
o Connecting Through URL Objects
o HTTP and Other TCP Servers
o Datagram Clients and Servers
o Non-Blocking Sockets
1. Introduction to JFC
o Abstract Windowing Toolkit (AWT) Basics
o Simple Layout Management
o Simple Event Handling
o Lightweight Controls
o JFC Feature
o Set JFC Architecture and Relationship to AWT
2. JFC Application Design
o Role of a JFrame
o Building a Frame-Based JFC Application
o Panes Using Dialogs
3. JFC Components
o JFC Component
o Class Hierarchy
o JComponent Features
o Simple Control Types
o Text Components
o Menus
o Managing Look and Feel
4. Architectural Patterns
o Observer Pattern
o Model-View-Controller
o Decomposition
o Strategy Pattern
o JList
o Factory Pattern
o JComboBox
1. RMI Architecture
o Motivation for RMI
o RMI and EJB
o RMI and CORBA
o Overview of RMI Architecture
o Stubs and Skeletons
o Remote Reference Layer
o RMI Transport
o Lifetime of a Remote Method Invocation
o RMI Registry
o Naming and URL Resolution
o RMI Up and Running
2. RMI Implementation
o Interface Design
o The Remote Interface
o Implementation Classes
o The RemoteObject and RemoteServer Classes
o The UnicastRemoteObject Class
o Server Implementation
o Using the Registry
o Client Implementation
o Code Deployment
3. Practical RMI
o Stub Source Code
o RMI Marshaling
o Skeleton Source Code
o Diagnostic Code
o Using RemoteServer
o Passing Objects
o The Factory Pattern
o Serialization vs. Remote Reference
o Designing for Latency
o The Value Object Pattern
o Exception Handling
Students should have an understanding of Java, Servlets, & JSP’s (EJB's recommended but not
required)
o Business Delegate
o Service Locator
o Session Façade
o Application Service
o Business Object
o Composite Entity
o Transfer Object
o Transfer Object Assembler
o Value List Handler
2. Integration Tier Patterns
o Data Access Object
o Service Activator
o Domain Store
o Web Service Broker
http://www.michael-thomas.com/tech/index.html (important)