JAVA 2 ENTERPRISE EDITION (J2EE)
PRESENTED BY
M. CINTHIYA
DEPARTMENT OF COMPUTER SCIENCE
PSGR KRISHNAMMAL COLLEGE FOR WOMEN,CBE-04
16MSC006
An Application Level Software Unit
Web Components
Applet
Enterprise Java Beans (EJB)
COMPONENTS
J2EE Components & Services
• Primary technologies
- Servlets
- JavaServer Pages (JSP)
- Enterprise JavaBeans (EJB)
• Standard services & supporting technologies
- Java database connectivity(JDBC) data access API
- Remote Method Invocations (RMI)
- Extensible Markup Languages(XML)
- JavaIDL
- JavaMail
PROVIDE COMPONENTS
WITH SERVICES
DEPLOYMENT
SECURITY
LIFE CYCLE
MANAGEMENT
THREADING
WEB COMPONENTS
A Web Component is a Software Unit that provides response to a request
 Act as the User Interface of a web based applications and
 Java EE platform specifies two web components they are
 Servelts
 Java Server Pages (JSP)
Enterprise Java Beans (EJBs)
• Enterprise Java beans architecture is a component model for
development and deployment of distributed business
application.
• Entity Beans
 Represent persistent business Entity
 Persisted in storage system ( usually Database)
 Might contain Application logic intrinsic to entity
• Session Beans
 Perform work for individual clients on the server
 Encapsulate complex business logic
 Can coordinate transactional work on multiple entity beans
Example EJB Application
JavaServer Pages (JSP)
• Text based documents describe how
to process a request and create a
response
• Contains HTML or XML and other JSP
elements defined by JSP specification.
• Are Installed on web server
• are web components that sits on top
of java servlet mode.
JSP Advantages
• Performance
– Runtime characteristics of servlets
– Automatic recompilation of modified pages
– Server side processing
• Programming
– Emphasize use of reusable components
– Write Once , Run Anywhere properties
– Extensible through custom tag libraries
• Provides front end access mechanism
to EJBs
Basic Components of Struts
The Struts framework is a rich collection of Java libraries and can be
broken down into the following major pieces:
Base framework
JSP tag libraries
Tiles plugin
Validator plugin
Base Framework
 The base framework provides the core MVC functionality and is comprised
of the building blocks for your application. At the foundation of the base
framework is the Controller servlet: ActionServlet.
 The rest of the base framework is comprised of base classes that your
application will extend and several utility classes. Most prominent among
the base classes are the Action and ActionForm classes.
 These two classes are used extensively in all Struts
applications. Action classes are used by ActionServlet to process specific
requests. ActionForm classes are used to capture data from HTML forms and
to be a conduit of data back to the View layer for page generation.
JSP Tag Libraries
Struts comes packaged with several JSP tag libraries for assisting with programming
the View logic in JSPs. JSP tag libraries enable JSP authors to use HTML-like tags to
represent functionality that is defined by a Java class.
Following is a listing of the libraries and their purpose:
HTML Used to generate HTML forms that interact with the Struts APIs.
Bean Used to work with Java bean objects in JSPs, such as accessing bean values.
Logic Used to cleanly implement simple conditional logic in JSPs.
Nested Used to allow arbitrary levels of nesting of the HTML, Bean, and Logic tags
that otherwise do not work.
Tiles Plugin
Struts comes packaged with the Tiles subframework. Tiles is a rich JSP
templating framework that facilitates the reuse of presentation (HTML)
code.
With Tiles, JSP pages can be broken up into individual 'tiles' or pieces
and then glued together to create one cohesive page.
Similar to the design principles that the core Struts framework is built
on, Tiles provides excellent reuse of View code.
As of Struts 1.1, Tiles is part of and packaged with the core Struts
download. Prior to Struts 1.1, Tiles was a third-party add-on, but has
since been contributed to the project and is now more tightly integrated.
Validator Plugin
Struts comes packaged, as of version 1.1, with the Validator subframework for
performing data validation.
Validator provides a rich framework for performing data validation on both the server
side and client side (browser).
Each validation is configured in an outside XML file so that validations can easily be
added to and removed from an application declaratively versus being hard-coded into
the application.
Similar to Tiles, prior to Struts 1.1, Validator was a third-party add-on, but has since
been included in the project and is more tightly integrated.
THANK YOU

J2EE PPT --CINTHIYA.M Krishnammal college for women

  • 1.
    JAVA 2 ENTERPRISEEDITION (J2EE) PRESENTED BY M. CINTHIYA DEPARTMENT OF COMPUTER SCIENCE PSGR KRISHNAMMAL COLLEGE FOR WOMEN,CBE-04 16MSC006
  • 2.
    An Application LevelSoftware Unit Web Components Applet Enterprise Java Beans (EJB) COMPONENTS
  • 3.
    J2EE Components &Services • Primary technologies - Servlets - JavaServer Pages (JSP) - Enterprise JavaBeans (EJB) • Standard services & supporting technologies - Java database connectivity(JDBC) data access API - Remote Method Invocations (RMI) - Extensible Markup Languages(XML) - JavaIDL - JavaMail
  • 4.
  • 5.
    WEB COMPONENTS A WebComponent is a Software Unit that provides response to a request  Act as the User Interface of a web based applications and  Java EE platform specifies two web components they are  Servelts  Java Server Pages (JSP)
  • 6.
    Enterprise Java Beans(EJBs) • Enterprise Java beans architecture is a component model for development and deployment of distributed business application. • Entity Beans  Represent persistent business Entity  Persisted in storage system ( usually Database)  Might contain Application logic intrinsic to entity • Session Beans  Perform work for individual clients on the server  Encapsulate complex business logic  Can coordinate transactional work on multiple entity beans
  • 7.
  • 8.
    JavaServer Pages (JSP) •Text based documents describe how to process a request and create a response • Contains HTML or XML and other JSP elements defined by JSP specification. • Are Installed on web server • are web components that sits on top of java servlet mode.
  • 9.
    JSP Advantages • Performance –Runtime characteristics of servlets – Automatic recompilation of modified pages – Server side processing • Programming – Emphasize use of reusable components – Write Once , Run Anywhere properties – Extensible through custom tag libraries • Provides front end access mechanism to EJBs
  • 10.
    Basic Components ofStruts The Struts framework is a rich collection of Java libraries and can be broken down into the following major pieces: Base framework JSP tag libraries Tiles plugin Validator plugin
  • 11.
    Base Framework  Thebase framework provides the core MVC functionality and is comprised of the building blocks for your application. At the foundation of the base framework is the Controller servlet: ActionServlet.  The rest of the base framework is comprised of base classes that your application will extend and several utility classes. Most prominent among the base classes are the Action and ActionForm classes.  These two classes are used extensively in all Struts applications. Action classes are used by ActionServlet to process specific requests. ActionForm classes are used to capture data from HTML forms and to be a conduit of data back to the View layer for page generation.
  • 12.
    JSP Tag Libraries Strutscomes packaged with several JSP tag libraries for assisting with programming the View logic in JSPs. JSP tag libraries enable JSP authors to use HTML-like tags to represent functionality that is defined by a Java class. Following is a listing of the libraries and their purpose: HTML Used to generate HTML forms that interact with the Struts APIs. Bean Used to work with Java bean objects in JSPs, such as accessing bean values. Logic Used to cleanly implement simple conditional logic in JSPs. Nested Used to allow arbitrary levels of nesting of the HTML, Bean, and Logic tags that otherwise do not work.
  • 13.
    Tiles Plugin Struts comespackaged with the Tiles subframework. Tiles is a rich JSP templating framework that facilitates the reuse of presentation (HTML) code. With Tiles, JSP pages can be broken up into individual 'tiles' or pieces and then glued together to create one cohesive page. Similar to the design principles that the core Struts framework is built on, Tiles provides excellent reuse of View code. As of Struts 1.1, Tiles is part of and packaged with the core Struts download. Prior to Struts 1.1, Tiles was a third-party add-on, but has since been contributed to the project and is now more tightly integrated.
  • 14.
    Validator Plugin Struts comespackaged, as of version 1.1, with the Validator subframework for performing data validation. Validator provides a rich framework for performing data validation on both the server side and client side (browser). Each validation is configured in an outside XML file so that validations can easily be added to and removed from an application declaratively versus being hard-coded into the application. Similar to Tiles, prior to Struts 1.1, Validator was a third-party add-on, but has since been included in the project and is more tightly integrated.
  • 15.