SlideShare a Scribd company logo
By
javawithease
What is Advance Java J2EE
What is Advance Java J2EE
What is Advance Java J2EE
Java EE Containers
What is Advance Java J2EE
 Java Sevlet 3.0
 Java Server Pages 2.2
 Java Server Faces 2.0
 Enterprise JavaBeans 3.1
 JavaMail 1.4
 Java Sevlet 3.0
 Java Server Pages 2.2
 Java Server Faces 2.0
 Enterprise JavaBeans 3.1
 JavaMail 1.4
A servlet is a Java programming language
class used to extend the capabilities of
servers that host applications accessed
via a request-response programming
model
A servlet is a Java programming language
class used to extend the capabilities of
servers that host applications accessed
via a request-response programming
model
What is Advance Java J2EE
What is Advance Java J2EE
What is Advance Java J2EE
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet{ 
  public void doGet(HttpServletRequest request, HttpServle
tResponse response) throws ServletException,IOException
 {
  response.setContentType("text/html");
  PrintWriter pw = response.getWriter();
  pw.println("<html>");
  pw.println("<head><title>Hello World</title></title>");
  pw.println("<body>");
  pw.println("<h1>Hello World</h1>");
  pw.println("</body></html>");
}}
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet{ 
  public void doGet(HttpServletRequest request, HttpServle
tResponse response) throws ServletException,IOException
 {
  response.setContentType("text/html");
  PrintWriter pw = response.getWriter();
  pw.println("<html>");
  pw.println("<head><title>Hello World</title></title>");
  pw.println("<body>");
  pw.println("<h1>Hello World</h1>");
  pw.println("</body></html>");
}}
<web-app>
 
<servlet>
  <servlet-name>Hello</servlet-name>
  <servlet-class>HelloWorld</servlet-class>
 </servlet>
 <servlet-mapping>
 <servlet-name>Hello</servlet-name>
 <url-pattern>/HelloWorld</url-pattern>
 </servlet-mapping>
</web-app>
<web-app>
 
<servlet>
  <servlet-name>Hello</servlet-name>
  <servlet-class>HelloWorld</servlet-class>
 </servlet>
 <servlet-mapping>
 <servlet-name>Hello</servlet-name>
 <url-pattern>/HelloWorld</url-pattern>
 </servlet-mapping>
</web-app>
JavaServer Pages (JSP) is a Java technology
that helps Software Developers, serve dynamically
generated pages, based on HTML, XML, or other
document types
JavaServer Pages (JSP) is a Java technology
that helps Software Developers, serve dynamically
generated pages, based on HTML, XML, or other
document types
What is Advance Java J2EE
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>JSP Page</title>
    </head>
    <body>
        <h1>
            <%
                out.println("Hello World");
            %>
        </h1>
    </body>
</html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>JSP Page</title>
    </head>
    <body>
        <h1>
            <%
                out.println("Hello World");
            %>
        </h1>
    </body>
</html>
There are five kinds tags that is available in 
JSP
 Directive Tag
 Declaration Tag
 Expression Tag
 Scriplet
There are five kinds tags that is available in 
JSP
 Directive Tag
 Declaration Tag
 Expression Tag
 Scriplet
JSP directives provide directions and instructions to
the container, telling it how to handle certain aspects
of JSP processing.
A JSP directive affects the overall structure of the
servlet class. It usually has the following form:
<%@ directive attribute="value" %>
JSP directives provide directions and instructions to
the container, telling it how to handle certain aspects
of JSP processing.
A JSP directive affects the overall structure of the
servlet class. It usually has the following form:
<%@ directive attribute="value" %>
Types of directive tag:
JSP Declarations:
A declaration declares one or more variables or methods that
you can use in Java code later in the JSP file. You must
declare the variable or method before you use it in the JSP
file.
Following is the syntax of JSP Declarations:
<%! declaration; [ declaration; ]+ ... %>
You can write XML equivalent of the above syntax as follows:
<jsp:declaration> code fragment
</jsp:declaration>
Following is the syntax of JSP Declarations:
<%! declaration; [ declaration; ]+ ... %>
You can write XML equivalent of the above syntax as follows:
<jsp:declaration> code fragment
</jsp:declaration>
A JSP expression element contains a scripting
language expression that is evaluated,
converted to a String, and inserted where the
expression appears in the JSP file.
JSP Expression:
Following is the syntax of JSP Expression:
<%= expression %>
Following is the syntax of JSP Expression:
<%= expression %>
What is Advance Java J2EE
The Scriptlet:
A scriptlet can contain any number of JAVA
language statements, variable or method
declarations, or expressions that are valid in the
page scripting language.
Following is the syntax of Scriptlet:
<% code fragment %>
You can write XML equivalent of the above syntax
as follows:
<jsp:scriptlet> code fragment </jsp:scriptlet>
Following is the syntax of Scriptlet:
<% code fragment %>
You can write XML equivalent of the above syntax
as follows:
<jsp:scriptlet> code fragment </jsp:scriptlet>
What is Advance Java J2EE
JSP comment marks text or statements that the
JSP container should ignore. A JSP comment is
useful when you want to hide or "comment out"
part of your JSP page.
JSP Comments:
Following is the syntax of JSP comments:
<%-- This is JSP comment --%>
Following is the syntax of JSP comments:
<%-- This is JSP comment --%>
What is Advance Java J2EE
<HTML>
<BODY>
<FORM METHOD=POST ACTION="SaveName.jsp">
What's your name? <INPUT TYPE=TEXT
NAME=username SIZE=20><BR>
What's your e-mail address? <INPUT TYPE=TEXT
NAME=email SIZE=20><BR>
What's your age? <INPUT TYPE=TEXT NAME=age
SIZE=4>
<P><INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
<HTML>
<BODY>
<FORM METHOD=POST ACTION="SaveName.jsp">
What's your name? <INPUT TYPE=TEXT
NAME=username SIZE=20><BR>
What's your e-mail address? <INPUT TYPE=TEXT
NAME=email SIZE=20><BR>
What's your age? <INPUT TYPE=TEXT NAME=age
SIZE=4>
<P><INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
public class UserData { String username;
String email;
int age;
public void setUsername( String value )
{
username = value;
}
public void setEmail( String value )
{
email = value;
}
public void setAge( int value )
{
age = value;
}
public class UserData { String username;
String email;
int age;
public void setUsername( String value )
{
username = value;
}
public void setEmail( String value )
{
email = value;
}
public void setAge( int value )
{
age = value;
}
public String getUsername() { return username; }
public String getEmail() { return email; }
public int getAge() { return age; } }
public String getUsername() { return username; }
public String getEmail() { return email; }
public int getAge() { return age; } }
<jsp:useBean id="user" class="UserData"
scope="session"/>
<jsp:setProperty name="user" property="*"/>
<HTML>
<BODY>
<A HREF="NextPage.jsp">Continue</A>
</BODY>
</HTML>
<jsp:useBean id="user" class="UserData"
scope="session"/>
<jsp:setProperty name="user" property="*"/>
<HTML>
<BODY>
<A HREF="NextPage.jsp">Continue</A>
</BODY>
</HTML>
<jsp:useBean id="user" class="UserData"
scope="session"/>
<HTML>
<BODY>
You entered<BR>
Name: <%= user.getUsername() %><BR>
Email: <%= user.getEmail() %><BR>
Age: <%= user.getAge() %><BR>
</BODY>
</HTML>
<jsp:useBean id="user" class="UserData"
scope="session"/>
<HTML>
<BODY>
You entered<BR>
Name: <%= user.getUsername() %><BR>
Email: <%= user.getEmail() %><BR>
Age: <%= user.getAge() %><BR>
</BODY>
</HTML>
The Enterprise JavaBeans architecture or
EJB for short is an architecture for the development
and deployment of component-based robust, highly
scalable business applications. These Applications
are scalable, transactional, and multi-user secure.
The Enterprise JavaBeans architecture or
EJB for short is an architecture for the development
and deployment of component-based robust, highly
scalable business applications. These Applications
are scalable, transactional, and multi-user secure.
Benefits of EJB
EJB simplifies the development of small and large
enterprise applications. The EJB container provides
system-level services to enterprise beans, the bean
developer can just concentrate on developing logic
to solve business problems.
EJB simplifies the development of small and large
enterprise applications. The EJB container provides
system-level services to enterprise beans, the bean
developer can just concentrate on developing logic
to solve business problems.
What is Advance Java J2EE
Session Bean
Entity Bean
Message-Driven Bean
Session Bean
Entity Bean
Message-Driven Bean
Session is one of  the EJBs and it  represents a
single client inside the Application Server.
Stateless session is easy to develop and its
efficient. As compare to entity beans session
beans require few server resources.
A session bean is similar to an interactive session
and is not shared; it can have only one client, in
the same way that an interactive session can have
only one user. A session bean is not persistent
and it is destroyed once the session terminates. 
Session is one of  the EJBs and it  represents a
single client inside the Application Server.
Stateless session is easy to develop and its
efficient. As compare to entity beans session
beans require few server resources.
A session bean is similar to an interactive session
and is not shared; it can have only one client, in
the same way that an interactive session can have
only one user. A session bean is not persistent
and it is destroyed once the session terminates. 
 Stateless Session Beans
A stateless session bean does not maintain a conversational state for
the client. When a client invokes the method of a stateless bean, the bean's
instance variables may contain a state, but only for the duration of the invocation.
 Stateful Session Beans
The state of an object consists of the values of its instance variables. In
a stateful session bean, the instance variables represent the state of a unique
client-bean session. Because the client interacts ("talks") with its bean,
this state is often called the conversational state.
 
 Stateless Session Beans
A stateless session bean does not maintain a conversational state for
the client. When a client invokes the method of a stateless bean, the bean's
instance variables may contain a state, but only for the duration of the invocation.
 Stateful Session Beans
The state of an object consists of the values of its instance variables. In
a stateful session bean, the instance variables represent the state of a unique
client-bean session. Because the client interacts ("talks") with its bean,
this state is often called the conversational state.
 
Session Bean Types
Entity beans are persistence java objects, whose
state can be saved into the database and later can
it can be restored from Data store. Entity bean
represents a row of the database table.
Entity beans are persistence java objects, whose
state can be saved into the database and later can
it can be restored from Data store. Entity bean
represents a row of the database table.
Message Driven Bean is an enterprise bean that can
be used by JEE applications to process the
messages asynchronously. Message Driven Bean
acts as message consumer and it receives JMS
messages.
Message Driven Bean is an enterprise bean that can
be used by JEE applications to process the
messages asynchronously. Message Driven Bean
acts as message consumer and it receives JMS
messages.

More Related Content

PDF
Introduction to JSP pages
PPT
Unified Expression Language
PPTX
Web API with ASP.NET MVC by Software development company in india
PPTX
PDF
PDF
EJB et WS (Montreal JUG - 12 mai 2011)
PPT
J2EE and Servlet
Introduction to JSP pages
Unified Expression Language
Web API with ASP.NET MVC by Software development company in india
EJB et WS (Montreal JUG - 12 mai 2011)
J2EE and Servlet

What's hot (20)

ODP
A Complete Tour of JSF 2
PPT
J2EE - Practical Overview
PDF
Create Your Own Framework by Fabien Potencier
PPT
JSP Processing
PDF
10 jsp-scripting-elements
PPT
ODP
Dependency Injection, Zend Framework and Symfony Container
PDF
Jsp tutorial
PDF
Introduction to JSP
PPTX
Jsp elements
PPTX
Zend Studio Tips and Tricks
PPTX
Java script
DOC
COLD FUSION TUTORIAL
PDF
Free EJB Tutorial | VirtualNuggets
PPT
Scripting languages
PPTX
Java Server Pages
PPT
1-introduction to ejb
PPT
Html javascript
PPTX
Jsf presentation
PDF
Enterprise JavaBeans(EJB)
A Complete Tour of JSF 2
J2EE - Practical Overview
Create Your Own Framework by Fabien Potencier
JSP Processing
10 jsp-scripting-elements
Dependency Injection, Zend Framework and Symfony Container
Jsp tutorial
Introduction to JSP
Jsp elements
Zend Studio Tips and Tricks
Java script
COLD FUSION TUTORIAL
Free EJB Tutorial | VirtualNuggets
Scripting languages
Java Server Pages
1-introduction to ejb
Html javascript
Jsf presentation
Enterprise JavaBeans(EJB)
Ad

Viewers also liked (20)

ODP
Onlinedesigersareesshopping
PDF
Buscar una ruta amb Google Maps - Opció 2
PDF
Lexev Electric Racing
DOCX
Rebecca Benson Resume
PPT
Presentation
PPT
Java hibernate orm implementation tool
PPTX
Qcl 14-v3 5-s_banasthali university_dhanishtha paliwal
DOC
Jurnal hukum
PPT
What is Java and How its is Generated
PPTX
Spot india ppt mlm
DOCX
Economic Growth Strategies
PPS
airajaib.com hub. 085231867565 (Feed My Brain)
PDF
#Enrico picciotto novela imperio
PDF
#Enrico picciotto novela imperio
PDF
Physical Activity and Wellness at Mount Allison
PDF
Cold Chain Equipment Manufacturers in India
Onlinedesigersareesshopping
Buscar una ruta amb Google Maps - Opció 2
Lexev Electric Racing
Rebecca Benson Resume
Presentation
Java hibernate orm implementation tool
Qcl 14-v3 5-s_banasthali university_dhanishtha paliwal
Jurnal hukum
What is Java and How its is Generated
Spot india ppt mlm
Economic Growth Strategies
airajaib.com hub. 085231867565 (Feed My Brain)
#Enrico picciotto novela imperio
#Enrico picciotto novela imperio
Physical Activity and Wellness at Mount Allison
Cold Chain Equipment Manufacturers in India
Ad

Similar to What is Advance Java J2EE (20)

PPTX
Developing web apps using Java and the Play framework
PPTX
JSP.pptx
PPT
J2EE - JSP-Servlet- Container - Components
PPTX
Introduction to JSP.pptx
PPT
JEE5 New Features
PPTX
Introduction - Java Server Programming (JSP)
PPTX
PPT
Html JavaScript and CSS
PPTX
Java Technology
PPT
Introduction to the Servlet / JSP course
PPTX
Jax ws
 
DOCX
Java server pages
PPTX
JSP- JAVA SERVER PAGES
PPTX
Java Server Pages(jsp)
PPT
J2 Ee Overview
PPTX
C:\fakepath\jsp01
PDF
Restful web services_tutorial
PPT
PPTX
The java server pages
Developing web apps using Java and the Play framework
JSP.pptx
J2EE - JSP-Servlet- Container - Components
Introduction to JSP.pptx
JEE5 New Features
Introduction - Java Server Programming (JSP)
Html JavaScript and CSS
Java Technology
Introduction to the Servlet / JSP course
Jax ws
 
Java server pages
JSP- JAVA SERVER PAGES
Java Server Pages(jsp)
J2 Ee Overview
C:\fakepath\jsp01
Restful web services_tutorial
The java server pages

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Approach and Philosophy of On baking technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
KodekX | Application Modernization Development
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
Teaching material agriculture food technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Cloud computing and distributed systems.
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Big Data Technologies - Introduction.pptx
cuic standard and advanced reporting.pdf
Understanding_Digital_Forensics_Presentation.pptx
Electronic commerce courselecture one. Pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Network Security Unit 5.pdf for BCA BBA.
“AI and Expert System Decision Support & Business Intelligence Systems”
Per capita expenditure prediction using model stacking based on satellite ima...
Approach and Philosophy of On baking technology
Digital-Transformation-Roadmap-for-Companies.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
The Rise and Fall of 3GPP – Time for a Sabbatical?
MIND Revenue Release Quarter 2 2025 Press Release
KodekX | Application Modernization Development
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Teaching material agriculture food technology
Building Integrated photovoltaic BIPV_UPV.pdf
Cloud computing and distributed systems.
MYSQL Presentation for SQL database connectivity
Big Data Technologies - Introduction.pptx

What is Advance Java J2EE