J2EE is a platform-independent, Java-centric environment from Sun for developing, building and deploying Web-based enterprise applications online. The J2EE platform consists of a set of services, APIs, and protocols that provide the functionality for developing multitiered, Web-based applications
8. 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
14. 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
18. 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" %>
20. 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>
21. 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 %>
22.
23. 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>
24.
25. 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 --%>
28. 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;
}
29. 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>
31. 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.
32. 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.
35. 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.
36. 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
37. 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.
38. 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.