SlideShare une entreprise Scribd logo
1  sur  25
Summer Industrial
Training (PS1)
R.VIGNESH
2013BTECHCSE024
Java 2 Platform Enterprise Edition(J2EE)
1. J2EE is an architecture for implementing enterprise class applications using Java and
Internet Technology
2. The original J2EE specification was developed by Sun Microsystems.
3. The J2EE platform consists of a set of services, APIs, and protocols that provide the
functionality for developing multitierd, Web-based applications.
4. The server side java industry has gone through a whirl wind of change in following years.
A timeline with the release dates of some Web frameworks.
Advantages of J2EE
1. High availability
2. Scalability
3. Integration with existing systems
4. Freedom to choose vendors of application servers, tools, components
5. Multi-platform
J2EE Components & Services
Primary technologies
1. Servlets
2. Java Server Pages (JSP)
3. Enterprise JavaBeans (EJB)
Standard services & supporting technologies
1. Java database connectivity(JDBC) data access API
2. Remote Method Invocations (RMI)
3. Extensible Markup Languages(XML)
4. JavaIDL
5. JavaMail
J2EE Tiers
1. Client Presentation
• HTML or Java applets deployed in Browser
• XML documentations transmitted through HTTP
• Java clients running in Client Java Virtual Machine (JVM)
2. Presentation Logic
◦ Servlets or Java Server Pages running in web server
3. Application Logic
◦ Enterprise JavaBeans running in Server
J2EE Application Model
Browser is able to process HTML and applets pages.
It forwards requests to the web server, which has JSPs and Servlets
Servlets and JSPs may access EJB server.
Java Stand alone runs on java client, which access EJB server using RMI.
J2EE Application Model
JSP
1. Used for web pages with dynamic content
2. Processes HTTP requests (non-blocking call-and-return)
3. Accepts HTML tags, special JSP tags, and script-lets of Java code
4. Separates static content from presentation logic
5. Can be created by web designer using HTML tools
JSP Tags
JSP example
</td> </tr>
</form> </table>
<%
if (request.getParameter("username") != null) {
%>
<%@ include file="response.jsp" %>
<%
}
%>
</body>
</html>
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
Servlet Overview
1. Server is Java program that runs as separate thread and processes HTTP request inside
servlet container.
2. Replaced Common Gateway Interface(CGI) or Active Server Pages (ASP)
3. Generate dynamic response to requests from web based clients
4. It interact with web client using response request paradigm
5. Written in Java; uses print statements to render HTML
6. Loaded into memory once and then called many times
7. Provides APIs for session management
Servlet example
public class HelloWorldServlet extends HttpServlet {
public void service(HttpServletRequest req,
HttpServletResponse res) throws IOException {
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("<html><head><title>Hello
World Servlet</title></head>");
out.println("<body><h1>Hello
World!</h1></body></html>");
}}
Java Beans
According to Oracle java bean is a reusable software component. A bean encapsulates many
objects into one object, so we can access this object from multiple places. Moreover, it provides
the easy maintenance.
A java class is considered java bean class if it follows following condition:-
1. It should have a no-arg constructor.
2. It should be Serializable.
3. It should provide methods to set and get the values of the properties, known as getter and
setter methods.
Example of Java Bean Class
package mypack;
public class Employee implements java.io.Serializable{
private int id;
private String name;
public Employee(){}
public void setId(int id){this.id=id;}
public int getId(){return id;}
public void setName(String name){this.name=name;}
public String getName(){return name;} }
package mypack;
public class Test{
public static void main(String args[]){
Employee e=new Employee();
//object is created
e.setName("Arjun");
//setting value to the object
System.out.println(e.getName());
}}
Accessing
Java Bean
Making Java
Bean Class
Working
Enterprise Java Beans (EJBs)
Enterprise Java Beans (EJB) is a development architecture for building highly scalable and robust
enterprise level applications to be deployed on J2EE compliant Application Server such as JBOSS,
Web Logic.
• Entity Beans
1. Represent persistent business Entity.
2. Persisted in storage system ( usually Database).
3. Might contain Application logic intrinsic to entity.
• Session Beans
1. Perform work for individual clients on the server.
2. Encapsulate complex business logic.
3. Can coordinate transactional work on multiple entity beans.
Summer Project-
Online Recruitment Process
Online Recruitment Portal is one of the large commercial and informative website providing its
services to all kinds of people. Major functionalities of the site include providing services to
recruitment agencies, software and hardware development companies, job seekers and e-
learners.
There are two modules in this project
1.Job Provider/HR
2.Job Seeker
1.Job Provider is the one who offers jobs to the job seekers.
Initially, he has to register himself to the site. Once the job
providers register with site by giving the details of their
company he can login into the site using the email address and
password set during registration and achieve the services like
placing the job advertisement for the people with specific skills
.He is provided with two specific services such as:
1. Add jobs: - The employer can add the jobs according to his
requirements.
2. List jobs: - The employer can view the list of jobs he
previously added, he can view applicants for the jobs and can
delete the jobs that are filled.
3. Change profile: - The job seeker can change his profile as the
academic qualifications, skillset, etc., can change with time.
4. Change Password: - The job seeker has the option to change
his password as and when required.
2.Job Seeker is the one who is need for the job. Initially, he has
to register himself to the site. After
Registration he can login using his email id and password. Job
seekers can search for the jobs by giving the queries and
getting the information. He is provided with 3 specific services
such as:
1. Search jobs: - The job seeker can search for the jobs
depending on his skills, academic qualifications and can apply
for the job.
2. Change profile: - The job seeker can change his profile as the
academic qualifications, skillset, etc., can change with time.
3. Change Password: - The job seeker has the option to change
his password as and when required.
Working
Sources & Resources
•Java 2 Platform Enterprise Edition Specification, v1.3
•Designing Enterprise Applications with the Java 2,
Enterprise Edition. Nicholas Kassen and the Enterprise Team
•Javatpoint.com
•Oracle.com
•Wikipedia.com
Summer industrial trainingnew

Contenu connexe

Tendances

Entity beans in java
Entity beans in javaEntity beans in java
Entity beans in javaAcp Jamod
 
Enterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEnterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEmprovise
 
Spring framework Controllers and Annotations
Spring framework   Controllers and AnnotationsSpring framework   Controllers and Annotations
Spring framework Controllers and AnnotationsAnuj Singh Rajput
 
Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Courseguest764934
 
Lab 5a) create a struts application
Lab 5a) create a struts applicationLab 5a) create a struts application
Lab 5a) create a struts applicationtechbed
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionKelum Senanayake
 
Spring (1)
Spring (1)Spring (1)
Spring (1)Aneega
 
Introduction To Building Enterprise Web Application With Spring Mvc
Introduction To Building Enterprise Web Application With Spring MvcIntroduction To Building Enterprise Web Application With Spring Mvc
Introduction To Building Enterprise Web Application With Spring MvcAbdelmonaim Remani
 
Introduction to Java EE (J2EE)
Introduction to Java EE (J2EE)Introduction to Java EE (J2EE)
Introduction to Java EE (J2EE)Atit Patumvan
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsKaml Sah
 

Tendances (20)

J2ee
J2eeJ2ee
J2ee
 
Entity beans in java
Entity beans in javaEntity beans in java
Entity beans in java
 
EJB .
EJB .EJB .
EJB .
 
Enterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEnterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business Logic
 
Spring framework Controllers and Annotations
Spring framework   Controllers and AnnotationsSpring framework   Controllers and Annotations
Spring framework Controllers and Annotations
 
Jsp
JspJsp
Jsp
 
Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Course
 
Chapter2 j2ee
Chapter2 j2eeChapter2 j2ee
Chapter2 j2ee
 
enterprise java bean
enterprise java beanenterprise java bean
enterprise java bean
 
Lab 5a) create a struts application
Lab 5a) create a struts applicationLab 5a) create a struts application
Lab 5a) create a struts application
 
Ejb notes
Ejb notesEjb notes
Ejb notes
 
Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)
 
Enterprise java beans
Enterprise java beansEnterprise java beans
Enterprise java beans
 
Java bean
Java beanJava bean
Java bean
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another Introduction
 
Spring (1)
Spring (1)Spring (1)
Spring (1)
 
Introduction To Building Enterprise Web Application With Spring Mvc
Introduction To Building Enterprise Web Application With Spring MvcIntroduction To Building Enterprise Web Application With Spring Mvc
Introduction To Building Enterprise Web Application With Spring Mvc
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Introduction to Java EE (J2EE)
Introduction to Java EE (J2EE)Introduction to Java EE (J2EE)
Introduction to Java EE (J2EE)
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - Components
 

Similaire à Summer industrial trainingnew

Similaire à Summer industrial trainingnew (20)

Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010
 
Get things done with Yii - quickly build webapplications
Get things done with Yii - quickly build webapplicationsGet things done with Yii - quickly build webapplications
Get things done with Yii - quickly build webapplications
 
JavaServer Pages
JavaServer PagesJavaServer Pages
JavaServer Pages
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applications
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
 
Struts 2 Overview
Struts 2 OverviewStruts 2 Overview
Struts 2 Overview
 
SpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptx
 
AJ.pptx
AJ.pptxAJ.pptx
AJ.pptx
 
Transformation of Java Server Pages: A Modern Approach
Transformation of Java Server Pages: A Modern ApproachTransformation of Java Server Pages: A Modern Approach
Transformation of Java Server Pages: A Modern Approach
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
 
J2 Ee Overview
J2 Ee OverviewJ2 Ee Overview
J2 Ee Overview
 
Java EE Services
Java EE ServicesJava EE Services
Java EE Services
 
Spring boot
Spring bootSpring boot
Spring boot
 
Java part 3
Java part  3Java part  3
Java part 3
 
WEB TECHNOLOGIES JSP
WEB TECHNOLOGIES  JSPWEB TECHNOLOGIES  JSP
WEB TECHNOLOGIES JSP
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
Spatial approximate string search Doc
Spatial approximate string search DocSpatial approximate string search Doc
Spatial approximate string search Doc
 
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
 
CORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVACORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVA
 
JEE5 New Features
JEE5 New FeaturesJEE5 New Features
JEE5 New Features
 

Dernier

DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 

Dernier (20)

DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 

Summer industrial trainingnew

  • 2. Java 2 Platform Enterprise Edition(J2EE) 1. J2EE is an architecture for implementing enterprise class applications using Java and Internet Technology 2. The original J2EE specification was developed by Sun Microsystems. 3. The J2EE platform consists of a set of services, APIs, and protocols that provide the functionality for developing multitierd, Web-based applications. 4. The server side java industry has gone through a whirl wind of change in following years.
  • 3. A timeline with the release dates of some Web frameworks.
  • 4. Advantages of J2EE 1. High availability 2. Scalability 3. Integration with existing systems 4. Freedom to choose vendors of application servers, tools, components 5. Multi-platform
  • 5. J2EE Components & Services Primary technologies 1. Servlets 2. Java Server Pages (JSP) 3. Enterprise JavaBeans (EJB) Standard services & supporting technologies 1. Java database connectivity(JDBC) data access API 2. Remote Method Invocations (RMI) 3. Extensible Markup Languages(XML) 4. JavaIDL 5. JavaMail
  • 6. J2EE Tiers 1. Client Presentation • HTML or Java applets deployed in Browser • XML documentations transmitted through HTTP • Java clients running in Client Java Virtual Machine (JVM) 2. Presentation Logic ◦ Servlets or Java Server Pages running in web server 3. Application Logic ◦ Enterprise JavaBeans running in Server
  • 7. J2EE Application Model Browser is able to process HTML and applets pages. It forwards requests to the web server, which has JSPs and Servlets Servlets and JSPs may access EJB server. Java Stand alone runs on java client, which access EJB server using RMI.
  • 9. JSP 1. Used for web pages with dynamic content 2. Processes HTTP requests (non-blocking call-and-return) 3. Accepts HTML tags, special JSP tags, and script-lets of Java code 4. Separates static content from presentation logic 5. Can be created by web designer using HTML tools
  • 11.
  • 12. JSP example </td> </tr> </form> </table> <% if (request.getParameter("username") != null) { %> <%@ include file="response.jsp" %> <% } %> </body> </html>
  • 13. 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
  • 14. Servlet Overview 1. Server is Java program that runs as separate thread and processes HTTP request inside servlet container. 2. Replaced Common Gateway Interface(CGI) or Active Server Pages (ASP) 3. Generate dynamic response to requests from web based clients 4. It interact with web client using response request paradigm 5. Written in Java; uses print statements to render HTML 6. Loaded into memory once and then called many times 7. Provides APIs for session management
  • 15. Servlet example public class HelloWorldServlet extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) throws IOException { res.setContentType("text/html"); PrintWriter out = res.getWriter(); out.println("<html><head><title>Hello World Servlet</title></head>"); out.println("<body><h1>Hello World!</h1></body></html>"); }}
  • 16. Java Beans According to Oracle java bean is a reusable software component. A bean encapsulates many objects into one object, so we can access this object from multiple places. Moreover, it provides the easy maintenance. A java class is considered java bean class if it follows following condition:- 1. It should have a no-arg constructor. 2. It should be Serializable. 3. It should provide methods to set and get the values of the properties, known as getter and setter methods.
  • 17. Example of Java Bean Class package mypack; public class Employee implements java.io.Serializable{ private int id; private String name; public Employee(){} public void setId(int id){this.id=id;} public int getId(){return id;} public void setName(String name){this.name=name;} public String getName(){return name;} } package mypack; public class Test{ public static void main(String args[]){ Employee e=new Employee(); //object is created e.setName("Arjun"); //setting value to the object System.out.println(e.getName()); }} Accessing Java Bean Making Java Bean Class
  • 19. Enterprise Java Beans (EJBs) Enterprise Java Beans (EJB) is a development architecture for building highly scalable and robust enterprise level applications to be deployed on J2EE compliant Application Server such as JBOSS, Web Logic. • Entity Beans 1. Represent persistent business Entity. 2. Persisted in storage system ( usually Database). 3. Might contain Application logic intrinsic to entity. • Session Beans 1. Perform work for individual clients on the server. 2. Encapsulate complex business logic. 3. Can coordinate transactional work on multiple entity beans.
  • 20. Summer Project- Online Recruitment Process Online Recruitment Portal is one of the large commercial and informative website providing its services to all kinds of people. Major functionalities of the site include providing services to recruitment agencies, software and hardware development companies, job seekers and e- learners. There are two modules in this project 1.Job Provider/HR 2.Job Seeker
  • 21. 1.Job Provider is the one who offers jobs to the job seekers. Initially, he has to register himself to the site. Once the job providers register with site by giving the details of their company he can login into the site using the email address and password set during registration and achieve the services like placing the job advertisement for the people with specific skills .He is provided with two specific services such as: 1. Add jobs: - The employer can add the jobs according to his requirements. 2. List jobs: - The employer can view the list of jobs he previously added, he can view applicants for the jobs and can delete the jobs that are filled. 3. Change profile: - The job seeker can change his profile as the academic qualifications, skillset, etc., can change with time. 4. Change Password: - The job seeker has the option to change his password as and when required.
  • 22. 2.Job Seeker is the one who is need for the job. Initially, he has to register himself to the site. After Registration he can login using his email id and password. Job seekers can search for the jobs by giving the queries and getting the information. He is provided with 3 specific services such as: 1. Search jobs: - The job seeker can search for the jobs depending on his skills, academic qualifications and can apply for the job. 2. Change profile: - The job seeker can change his profile as the academic qualifications, skillset, etc., can change with time. 3. Change Password: - The job seeker has the option to change his password as and when required.
  • 24. Sources & Resources •Java 2 Platform Enterprise Edition Specification, v1.3 •Designing Enterprise Applications with the Java 2, Enterprise Edition. Nicholas Kassen and the Enterprise Team •Javatpoint.com •Oracle.com •Wikipedia.com