36
Notes of J2EE Tutorial Notes of J2EE Tutorial Matt Tsai Matt Tsai

Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

Embed Size (px)

Citation preview

Page 1: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

Notes of J2EE TutorialNotes of J2EE Tutorial

Matt TsaiMatt Tsai

Page 2: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

22

Outline Outline Chapter 1: Overview Chapter 1: Overview Chapter 2:   Understanding XML Chapter 2:   Understanding XML Chapter 3:   Getting Started with Web Chapter 3:   Getting Started with Web

Applications Applications Chapter 4:   Java API for XML Processing Chapter 4:   Java API for XML Processing Chapter 5:   Simple API for XML Chapter 5:   Simple API for XML Chapter 6:   Document Object Model Chapter 6:   Document Object Model Chapter 7:   Extensible Stylesheet Language Chapter 7:   Extensible Stylesheet Language

Transformations Transformations Chapter 8:   Building Web Services with JAX-Chapter 8:   Building Web Services with JAX-

RPC RPC Chapter 9:   SOAP with Attachments API for Chapter 9:   SOAP with Attachments API for

Java Java Chapter 10:   Java API for XML Registries Chapter 10:   Java API for XML Registries Chapter 11:   Java Servlet Technology Chapter 11:   Java Servlet Technology Chapter 12:   JavaServer Pages Technology Chapter 12:   JavaServer Pages Technology Chapter 13:   JavaServer Pages Documents Chapter 13:   JavaServer Pages Documents Chapter 14:   JavaServer Pages Standard Tag Chapter 14:   JavaServer Pages Standard Tag

Library Library Chapter 15:   Custom Tags in JSP Pages Chapter 15:   Custom Tags in JSP Pages Chapter 16:   Scripting in JSP Pages Chapter 16:   Scripting in JSP Pages Chapter 17:   JavaServer Faces Technology Chapter 17:   JavaServer Faces Technology Chapter 18:   Using JavaServer Faces Chapter 18:   Using JavaServer Faces

Technology in JSP PagesTechnology in JSP Pages

Chapter 19:   Developing with JavaServer Faces Chapter 19:   Developing with JavaServer Faces Technology Technology

Chapter 20:   Creating Custom UI Components Chapter 20:   Creating Custom UI Components Chapter 21:   Configuring JavaServer Faces Chapter 21:   Configuring JavaServer Faces

Applications Applications Chapter 22:   Internationalizing and Localizing Chapter 22:   Internationalizing and Localizing

Web Applications Web Applications Chapter 23:   Enterprise Beans Chapter 23:   Enterprise Beans Chapter 24:   Getting Started with Enterprise Chapter 24:   Getting Started with Enterprise

Beans Beans Chapter 25:   Session Bean Examples Chapter 25:   Session Bean Examples Chapter 26:   Bean-Managed Persistence Chapter 26:   Bean-Managed Persistence

Examples Examples Chapter 27:   Container-Managed Persistence Chapter 27:   Container-Managed Persistence

Examples Examples Chapter 28:   A Message-Driven Bean Example Chapter 28:   A Message-Driven Bean Example Chapter 29:   Enterprise JavaBeans Query Chapter 29:   Enterprise JavaBeans Query

Language Language Chapter 30:   Transactions Chapter 30:   Transactions Chapter 31:   Resource Connections Chapter 31:   Resource Connections Chapter 32:   Security Chapter 32:   Security Chapter 33:   The Java Message Service API Chapter 33:   The Java Message Service API Chapter 34:   J2EE Examples Using the JMS Chapter 34:   J2EE Examples Using the JMS

API API Chapter 35:   The Coffee Break Application Chapter 35:   The Coffee Break Application Chapter 36:   The Duke's Bank Application Chapter 36:   The Duke's Bank Application

Page 3: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

33

Overview Overview The J2EE platform uses a distributed multitiered application model for enterprise The J2EE platform uses a distributed multitiered application model for enterprise

applications. applications.

The J2EE application parts shown in The J2EE application parts shown in Figure 1-1Figure 1-1 are presented in are presented in J2EE ComponentsJ2EE Components. .

• Client-tier components run on the client machine.Client-tier components run on the client machine.

• Web-tier components run on the J2EE server.Web-tier components run on the J2EE server.

• Business-tier components run on the J2EE server.Business-tier components run on the J2EE server.

• Enterprise information system (EIS)-tier software runs on the EIS server.Enterprise information system (EIS)-tier software runs on the EIS server.

Page 4: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

44

Overview Overview J2EE applications are made up of components. J2EE applications are made up of components.

A A J2EE componentJ2EE component is a is a self-contained functional software unitself-contained functional software unit that that is assembled into a J2EE application with its related classes and is assembled into a J2EE application with its related classes and files and that communicates with other components. files and that communicates with other components.

The J2EE specification defines the following The J2EE specification defines the following J2EE componentsJ2EE components..• Application clientsApplication clients and and appletsapplets are components that run on the client. are components that run on the client.• Java Java ServletServlet and JavaServer Pages ( and JavaServer Pages (JSPJSP ) technology components are Web ) technology components are Web

components that run on the server. components that run on the server. • Enterprise JavaBeans (Enterprise JavaBeans (EJBEJB ) components (enterprise beans) are business ) components (enterprise beans) are business

components that run on the server. components that run on the server.

J2EE components are written in the Java programming language and J2EE components are written in the Java programming language and are compiled in the same way as any program in the language. are compiled in the same way as any program in the language.

Page 5: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

55

OverviewOverview J2EE Clients J2EE Clients

• Web Clients Web Clients

• Applets Applets

• Application Clients Application Clients

J2EE Server Communications J2EE Server Communications

Page 6: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

66

OverviewOverview Web Components Web Components

Business Components Business Components

Page 7: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

77

OverviewOverview J2EE Containers J2EE Containers

• Container Services Container Services ContainersContainers are the interface between a component and the low-level platform- are the interface between a component and the low-level platform-

specific functionality that supports the component. Before a Web, enterprise bean, specific functionality that supports the component. Before a Web, enterprise bean, or application client component can be executed, it must be assembled into a J2EE or application client component can be executed, it must be assembled into a J2EE module and deployed into its container. module and deployed into its container.

The assembly process involves specifying container settings for each component The assembly process involves specifying container settings for each component in the J2EE application and for the J2EE application itself. in the J2EE application and for the J2EE application itself.

Container settings customize the underlying support provided by the J2EE server, Container settings customize the underlying support provided by the J2EE server, including services such as security, transaction management, Java Naming and including services such as security, transaction management, Java Naming and Directory Interface (Directory Interface (JNDIJNDI) lookups, and remote connectivity. ) lookups, and remote connectivity.

• Container Types Container Types

Page 8: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

88

OverviewOverview Web service supportWeb service support

• Web services are Web-based enterprise applications that use Web services are Web-based enterprise applications that use open, XML-based standards and transport protocols to exchange open, XML-based standards and transport protocols to exchange data with calling clients. data with calling clients.

• The J2EE platform provides the XML APIs and tools you need The J2EE platform provides the XML APIs and tools you need to quickly design, develop, test, and deploy Web services and to quickly design, develop, test, and deploy Web services and clients that fully interoperate with other Web services and clients clients that fully interoperate with other Web services and clients running on Java-based or non-Java-based platforms. running on Java-based or non-Java-based platforms.

Page 9: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

99

OverviewOverview A J2EE application is delivered in an Enterprise Archive (A J2EE application is delivered in an Enterprise Archive (EAREAR) )

file, a standard Java Archive (JAR) file with an .ear extension. file, a standard Java Archive (JAR) file with an .ear extension.

Using EAR files and modules makes it possible to assemble a Using EAR files and modules makes it possible to assemble a number of different J2EE applications using some of the same number of different J2EE applications using some of the same components. components.

EAR File Structure EAR File Structure

Page 10: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

1010

OverviewOverview A A J2EE moduleJ2EE module consists of one or more J2EE components for the same container consists of one or more J2EE components for the same container

type and one component deployment descriptor of that type. type and one component deployment descriptor of that type.

An enterprise bean module deployment descriptor, for example, declares An enterprise bean module deployment descriptor, for example, declares transaction attributes and security authorizations for an enterprise bean. A J2EE transaction attributes and security authorizations for an enterprise bean. A J2EE module without an application deployment descriptor can be deployed as a module without an application deployment descriptor can be deployed as a stand-stand-alonealone module. module.

The four types of J2EE modules are as follows: The four types of J2EE modules are as follows: • EJB modulesEJB modules, which contain class files for enterprise beans and an EJB deployment , which contain class files for enterprise beans and an EJB deployment

descriptor. EJB modules are packaged as JAR files with a .jar extension.descriptor. EJB modules are packaged as JAR files with a .jar extension.• Web modulesWeb modules, which contain servlet class files, JSP files, supporting class files, GIF , which contain servlet class files, JSP files, supporting class files, GIF

and HTML files, and a Web application deployment descriptor. Web modules are and HTML files, and a Web application deployment descriptor. Web modules are packaged as JAR files with a .war (Web archive) extension.packaged as JAR files with a .war (Web archive) extension.

• Application client modulesApplication client modules, which contain class files and an application client , which contain class files and an application client deployment descriptor. Application client modules are packaged as JAR files with deployment descriptor. Application client modules are packaged as JAR files with a .jar extension.a .jar extension.

• Resource adapter modulesResource adapter modules, which contain all Java interfaces, classes, native libraries, , which contain all Java interfaces, classes, native libraries, and other documentation, along with the resource adapter deployment descriptor. and other documentation, along with the resource adapter deployment descriptor. Together, these implement the Connector architecture (see Together, these implement the Connector architecture (see J2EE Connector ArchitectureJ2EE Connector Architecture) for a particular EIS. Resource adapter modules are ) for a particular EIS. Resource adapter modules are packaged as JAR files with an .rar (resource adapter archive) extension.packaged as JAR files with an .rar (resource adapter archive) extension.

Page 11: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

1111

OverviewOverview Development RolesDevelopment Roles

• J2EE Product Provider J2EE Product Provider

• Tool Provider Tool Provider

• Application Component Provider Application Component Provider Enterprise Bean Developer Enterprise Bean Developer Web Component Developer Web Component Developer Application Client Developer Application Client Developer

• Application Assembler Application Assembler

• Application Deployer and Administrator Application Deployer and Administrator

Page 12: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

1212

OverviewOverview J2EE Platform APIs J2EE Platform APIs

Page 13: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

1313

OverviewOverview The Sun Java System Application Server Platform Edition The Sun Java System Application Server Platform Edition

8 is a fully compliant implementation of the J2EE 1.4 8 is a fully compliant implementation of the J2EE 1.4 platform. platform.

The Application Server includes a number of J2EE The Application Server includes a number of J2EE technologies and tools that are not part of the J2EE 1.4 technologies and tools that are not part of the J2EE 1.4 platform but are provided as a convenience to the platform but are provided as a convenience to the developer. developer.

The Application Server includes two user interface The Application Server includes two user interface technologiestechnologies• JavaServer Pages Standard Tag Library JavaServer Pages Standard Tag Library • JavaServer FacesJavaServer Faces

Page 14: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

1414

OverviewOverview Application Server ToolsApplication Server Tools

Page 15: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

1515

OverviewOverview Starting and Stopping the Application Server Starting and Stopping the Application Server

• To start and stop the Application Server To start and stop the Application Server asadmin start-domain --verbose domain1 asadmin start-domain --verbose domain1

• To stop the Application Server, open a terminal window or To stop the Application Server, open a terminal window or command prompt and execute command prompt and execute

asadmin stop-domain domain1asadmin stop-domain domain1

Starting the Admin Console Starting the Admin Console • To administer the Application Server and manage users, To administer the Application Server and manage users,

resources, and J2EE applications, you use the Admin Console resources, and J2EE applications, you use the Admin Console tool tool

http://localhost:4848/asadmin/http://localhost:4848/asadmin/

Page 16: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

1616

Understanding XML Understanding XML XML is a text-based markup language that is fast XML is a text-based markup language that is fast

becoming the standard for data interchange on the Web. becoming the standard for data interchange on the Web.

After the XML declaration, the document prolog can After the XML declaration, the document prolog can include a DTD, which lets you specify the kinds of tags include a DTD, which lets you specify the kinds of tags that can be included in your XML document. In addition that can be included in your XML document. In addition to telling a validating parser which tags are valid and in to telling a validating parser which tags are valid and in what arrangements, a DTD tells both validating and what arrangements, a DTD tells both validating and nonvalidating parsers where text is expected, which lets nonvalidating parsers where text is expected, which lets the parser determine whether the whitespace it sees is the parser determine whether the whitespace it sees is significant or significant or ignorableignorable. .

Page 17: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

1717

Getting Started with Web Applications Getting Started with Web Applications A Web application is a dynamic extension of a Web or A Web application is a dynamic extension of a Web or

application server. There are two types of Web application server. There are two types of Web applications: applications: • Presentation-orientedPresentation-oriented: :

• Service-orientedService-oriented: :

Java Web Application Technologies Java Web Application Technologies

Page 18: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

1818

Getting Started with Web Applications Getting Started with Web Applications Web Application Life Cycle Web Application Life Cycle

• Develop the Web component code.Develop the Web component code.

• Develop the Web application deployment descriptor.Develop the Web application deployment descriptor.

• Compile the Web application components and helper classes Compile the Web application components and helper classes referenced by the components.referenced by the components.

• Optionally package the application into a deployable unit.Optionally package the application into a deployable unit.

• Deploy the application into a Web container.Deploy the application into a Web container.

• Access a URL that references the Web application.Access a URL that references the Web application.

Page 19: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

1919

Getting Started with Web Applications Getting Started with Web Applications In the J2EE architecture, Web components and static Web content files such as images are called In the J2EE architecture, Web components and static Web content files such as images are called Web Web

resourcesresources. A . A Web moduleWeb module is the smallest deployable and usable unit of Web resources. A J2EE Web is the smallest deployable and usable unit of Web resources. A J2EE Web module corresponds to a module corresponds to a Web applicationWeb application as defined in the Java Servlet specification. as defined in the Java Servlet specification.

The document root contains a subdirectory named /WEB-INF/, which contains the following files and The document root contains a subdirectory named /WEB-INF/, which contains the following files and directories: directories:

• web.xml: The Web application deployment descriptorweb.xml: The Web application deployment descriptor• Tag library descriptor files (see Tag Library Descriptors)Tag library descriptor files (see Tag Library Descriptors)• classes: A directory that contains classes: A directory that contains server-side classesserver-side classes: servlets, utility classes, and JavaBeans : servlets, utility classes, and JavaBeans

componentscomponents• tags: A directory that contains tag files, which are implementations of tag libraries (see Tag File tags: A directory that contains tag files, which are implementations of tag libraries (see Tag File

Location)Location)• lib: A directory that contains JAR archives of libraries called by server-side classeslib: A directory that contains JAR archives of libraries called by server-side classes

Page 20: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

2020

Java API for XML Processing Java API for XML Processing SAX APIs SAX APIs

The SAX Packages The SAX Packages

Page 21: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

2121

Java API for XML ProcessingJava API for XML Processing DOM APIs DOM APIs

The DOM Packages The DOM Packages

Page 22: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

2222

Java API for XML ProcessingJava API for XML Processing XSLT APIsXSLT APIs

The XSLT Packages The XSLT Packages

Page 23: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

2323

Building Web Services with JAX-RPC Building Web Services with JAX-RPC JAX-RPC stands for Java API for XML-based RPC. JAX-RPC is a JAX-RPC stands for Java API for XML-based RPC. JAX-RPC is a

technology for building Web services and clients that use technology for building Web services and clients that use remote remote procedure callsprocedure calls (RPC) and XML. Often used in a distributed client- (RPC) and XML. Often used in a distributed client-server model, an RPC mechanism enables clients to execute server model, an RPC mechanism enables clients to execute procedures on other systems. procedures on other systems.

In JAX-RPC, a remote procedure call is represented by an XML-In JAX-RPC, a remote procedure call is represented by an XML-based protocol such as SOAP. The SOAP specification defines the based protocol such as SOAP. The SOAP specification defines the envelope structure, encoding rules, and conventions for representing envelope structure, encoding rules, and conventions for representing remote procedure calls and responses. These calls and responses are remote procedure calls and responses. These calls and responses are transmitted as SOAP messages (XML files) over HTTP. transmitted as SOAP messages (XML files) over HTTP.

Although SOAP messages are complex, the JAX-RPC API hides Although SOAP messages are complex, the JAX-RPC API hides this complexity from the application developer. this complexity from the application developer.

Page 24: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

2424

Building Web Services with JAX-RPCBuilding Web Services with JAX-RPC Communication Between a JAX-RPC Web Service and a Client Communication Between a JAX-RPC Web Service and a Client

These are the basic steps for creating the Web service and client: These are the basic steps for creating the Web service and client: • Code the SEI and implementation class and interface configuration file.Code the SEI and implementation class and interface configuration file.• Compile the SEI and implementation class.Compile the SEI and implementation class.• Use Use wscompilewscompile to generate the files required to deploy the service. to generate the files required to deploy the service.• Use Use deploytooldeploytool to package the files into a WAR file. to package the files into a WAR file.• Deploy the WAR file. The tie classes (which are used to communicate with clients) are Deploy the WAR file. The tie classes (which are used to communicate with clients) are

generated by the Application Server during deployment.generated by the Application Server during deployment.• Code the client class and WSDL configuration file.Code the client class and WSDL configuration file.• Use Use wscompilewscompile to generate and compile the stub files. to generate and compile the stub files.• Compile the client class.Compile the client class.• Run the client.Run the client.

Page 25: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

2525

Building Web Services with JAX-RPCBuilding Web Services with JAX-RPC Coding the Service Endpoint Interface and Coding the Service Endpoint Interface and

Implementation Class Implementation Class

Page 26: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

2626

SOAP with Attachments API for Java SOAP with Attachments API for Java

Page 27: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

2727

Java API for XML Registries Java API for XML Registries

Page 28: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

2828

Java Servlet Technology Java Servlet Technology A A servletservlet is a Java programming language class that is used to is a Java programming language class that is used to

extend the capabilities of servers that host applications access via a extend the capabilities of servers that host applications access via a request-response programming model. Although servlets can request-response programming model. Although servlets can respond to any type of request, they are commonly used to extend respond to any type of request, they are commonly used to extend the applications hosted by Web servers. For such applications, Java the applications hosted by Web servers. For such applications, Java Servlet technology defines HTTP-specific servlet classes. Servlet technology defines HTTP-specific servlet classes.

The javax.servlet and javax.servlet.http packages provide interfaces The javax.servlet and javax.servlet.http packages provide interfaces and classes for writing servlets. All servlets must implement the and classes for writing servlets. All servlets must implement the Servlet interface, which defines life-cycle methods. When Servlet interface, which defines life-cycle methods. When implementing a generic service, you can use or extend the implementing a generic service, you can use or extend the GenericServlet class provided with the Java Servlet API. The GenericServlet class provided with the Java Servlet API. The HttpServlet class provides methods, such as doGet and doPost, for HttpServlet class provides methods, such as doGet and doPost, for handling HTTP-specific services. handling HTTP-specific services.

Page 29: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

2929

JavaServer Pages Technology JavaServer Pages Technology JavaServer Pages (JSP) technology allows you to easily JavaServer Pages (JSP) technology allows you to easily

create Web content that has both static and dynamic create Web content that has both static and dynamic components. JSP technology makes available all the components. JSP technology makes available all the dynamic capabilities of Java Servlet technology but dynamic capabilities of Java Servlet technology but provides a more natural approach to creating static provides a more natural approach to creating static content. The content. The

Page 30: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

3030

JSFJSF JavaServer Faces Standard Request-Response Life Cycle JavaServer Faces Standard Request-Response Life Cycle

Page 31: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

3131

Enterprise Bean Enterprise Bean Structure of an Enterprise Bean JAR Structure of an Enterprise Bean JAR

Page 32: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

3232

Enterprise BeanEnterprise Bean Life Cycle of a Stateful Session Bean Life Cycle of a Stateful Session Bean

Life Cycle of a Stateless Session Bean Life Cycle of a Stateless Session Bean

Page 33: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

3333

Enterprise BeanEnterprise Bean Life Cycle of an Entity Bean Life Cycle of an Entity Bean

Life Cycle of a Message-Driven Bean Life Cycle of a Message-Driven Bean

Page 34: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

3434

J2EE Connector Architecture J2EE Connector Architecture Resource Adapter Contracts Resource Adapter Contracts

Resource Adapter Module Structure Resource Adapter Module Structure

Page 35: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

3535

The Coffee Break Application The Coffee Break Application Coffee Break Application Flow Coffee Break Application Flow

Page 36: Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter

3636

The Duke's Bank Application The Duke's Bank Application Duke's Bank Application Duke's Bank Application