SlideShare a Scribd company logo
Web Component Development
with Servlet & JSP Technologies
(EE 6)
Module-13: Deploying J2EE Application to Cloud
www.webstackacademy.com
Objectives
Upon completion of this module, you should be able to:
ā— What is Cloud?
ā— Types of Cloud.
ā— Cloud Sevice Models.
ā— Advantages of Cloud-Computing.
ā— What is Web Service?
ā— Types of Web Services.
ā— Building Web services with JAX-WS
ā— Deploy JAX-WS web services on Tomcat
ā— AWS (Amazon Web Service)
ā— AWS and Normal Web Hosting Service
ā— AWS Architecture
www.webstackacademy.com
Relevance
Discussion –
www.webstackacademy.com
What is Cloud?
ā— Cloud Computing is a general term used to describe a
new class of network based computing that takes place
over the Internet ,
- a collection/group of integrated and networked
hardware, software and Internet Infrastructure (called a
plateform).
- Using the internet for communication and transport
provides hardware ,software and networking services to
clients.
ā— These services hide the compexity and details of the
underlying infrastructure from users and applications by
providing Application Programming Interface.
www.webstackacademy.com
What is Cloud?
SERVERS
Shared pool of configurable computing resources
ā— On-demand network access
ā— Provisioned by the Service Provider
www.webstackacademy.com
Types of Cloud
ā— Public Cloud :- Public cloud allows the accessibility of systems and
services easily to general public. Eg. Amazon , IBM , Microsoft
,Google etc.
ā— Private Cloud :- Private cloud allows the accessibility of systems and
services within organization.
ā— Hybrid Cloud :- Hybrid Cloud is the mixture of public and private
cloud. Non critical activities are performed by public cloud and critical
activities are performed by private cloud.
www.webstackacademy.com
Cloud Service Models
Software as a
Service (SaaS)
Platform as a
Service (PaaS)
Infrastructure as a
Service (IaaS)
www.webstackacademy.com
Advantages of Cloud
ā— Lower Cost Computers for users - In Cloud , we don't
require a high-powered computer to run cloud computing's
web based applications because applications run on cloud
not on desktop PC or laptop.
ā— Lower IT infrastructure cost - By using cloud computing ,
we don't need to invest in larger numbers of more powerful
servers ,not require IT staff also for handling such powerful
servers.
ā— Lower Software Cost - It reduces the software cost
because we don't need to purchase separate software
packages fo each computer in the organization.
www.webstackacademy.com
Advantages of Cloud
ā— Instant Software updates – Another software related
advantage in cloud computing is that users don't need to
face with the choice between obsolete software and high
upgrade costs . If the app is web-based , updates happen
automatically and are available next time when the user
logs in to the cloud.
ā— Increased Computing Power – The execution capacity
of cloud servers are very high. It processes the
application very fast.
ā— Unlimited storage capacity - Cloud offers a huge
amount of storage capacity like 2000GB or more than that
if required.
www.webstackacademy.com
Web Services
A Web Service can be defined in following ways :
ā— is a client server application or application component for
communication.
ā— method of communication between two devices over network.
ā— is a software system for interoperable machine to machine
communication.
ā— is a collection of standards or protocols for exchanging
information between two devices or application.
www.webstackacademy.com
Types of Web Services
There are two types of Web Services:
1) Soap Web Services
2) RESTful Web Services
www.webstackacademy.com
Soap Web Services
Soap web services use XML messages that follow the
Simple Object Access Protocol (SOAP) standard , an XML
language defining a message architecture and message
formats. Such system often contain a machine -readable
description of the opeations offered by the service, written in
the Web Services Description Language(WSDL) , an XML
lanaguage for defining interface syntactically.
www.webstackacademy.com
RESTful Web Services
In Java EE 6 , JAX-RS provides the functionality for
Representational State Transfer(RESTful) web services.
RESTful web services often better integrated with HTTP than
SOAP-based services are , do not require XML messages or
WSDL service -API definitions.
RESTful web services use existing W3C and internet
Engineering Task Force (IETF) standards (HTTP , XML ,URI
,MIME) and have a lightweight infrastructure that allows services
to be built with minimal tooling ,devloping RESTful services is
inexpensive.
www.webstackacademy.com
SOAP & RESTful Web
Service
www.webstackacademy.com
Building Web services
with JAX-WS
JAX-WS allows developers to write message-oriented as
well as Remote Procedure Call-oriented(RPC -oriented)
web services.
The starting point for developing a JAX-WS web service
is a java class annoted javax.jws.WebService annotation.
The @ WebService annotation defines the web service
endpoint.
A service endpoint interface or service endpoint
Implementation (SEI) is a java class ,that declares the
methods that a client can invoke on the service. An
interface is not required when building a JAX-WS
endpoint.
www.webstackacademy.com
Deploy JAX-WS web
services on Tomcat
Steps of a web service deployment
ā— Create a web service
ā— Create a sun-jaxws.xml , defines web service implementation class
ā— Create a standard web.xml ,defines WSServletContextLitener
,WSServlet and structure of a web project.
ā— Build tool to generate WAR file.
ā— Copy JAX-WS dependencies to ā€œ${Tomcat}/libā€ folder.
ā— Copy WAR to ā€œ${Tomcat}/webappā€ folder.
ā— Start it.
www.webstackacademy.com
Creating Web Service
File : HelloWeb.java
package com.emertxe.ws;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
//Service Endpoint Interface
@WebService
@SOAPBinding(style = Style.RPC)
public interface HelloWeb{
@WebMethod String getHelloWebAsString();
}
www.webstackacademy.com
Creating Web Service
File : HelloWebImpl.java
package com.emertxe.ws;
import javax.jws.WebService;
//Service Implementation Bean
@WebService(endpointInterface = "com.emertxe.ws.HelloWeb")
public class HelloWebImpl implements HelloWeb{
@Override
public String getHelloWebAsString() {
return "Hello Web JAX-WS";
}
}
www.webstackacademy.com
Create a web service deployment
descriptor
File : sun-jaxws.xml
<?xml version="1.0" encoding="UTF-8"?>
<endpoints
xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"
version="2.0">
<endpoint
name="HelloWeb"
implementation="com.emertxe.ws.HelloWebImpl"
url-pattern="/hello"/>
</endpoints>
www.webstackacademy.com
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<listener>
<listener-class>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
</listener-class>
</listener>
www.webstackacademy.com
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>
com.sun.xml.ws.transport.http.servlet.WSServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>120</session-timeout>
</session-config>
</web-app>
web.xml
www.webstackacademy.com
WAR Content
WEB-INF/classes/com/emertxe/ws/HelloWeb.class
WEB-INF/classes/com/emertxe/ws/HelloWebImpl.class
WEB-INF/web.xml
WEB-INF/sun-jaxws.xml
www.webstackacademy.com
JAX-WS
Dependencies
Go here http://jax-ws.java.net/.
copy following JAX-WS dependencies to Tomcat library
folder ā€œ{$TOMCAT}/libā€œ.
jaxb-impl.jar
jaxws-api.jar
jaxws-rt.jar
gmbal-api-only.jar
management-api.jar
stax-ex.jar
streambuffer.jar
policy.jar
www.webstackacademy.com
Deployment
Copy the generated WAR file to {$TOMCAT}/webapps/ folder
and start the Tomcat server.
For testing, access this URL :
http://localhost:8080/HelloWeb/hello
www.webstackacademy.com
AWS (Amazon Web
Service)
ā— AWS is a subsidiary of Amazon.com ,offers a suite
of cloud computing services that make up an on-
demand computing plateform.
ā— The most central and best-known of these
services include Amazon Elastic Compute Cloud ,
also known as ā€œEC2ā€ and Amazon Simple Storage
Service, also known as ā€œS3ā€.
www.webstackacademy.com
AWS (Amazon Web
Service)
ā— Amazon Web Services offers a broad set of global cloud-
based products including storage , database ,analytics,
networking ,mobile, developer tools ,management tools,
security, compute and enterprise applications.
ā— These services help organizations move faster , lower IT
costs and scale .
ā— AWS is trusted by the largest enterprises and starts-ups to
power a wide variety of workloads including : web and
mobile applications ,game development ,data processing
and warehousing ,storage ,archieve and many others.
www.webstackacademy.com
Normal Web Hosting
Service
ā— Shared :- A physical server that is shared by many
different customers. User account is restricted to certain
files , and very limited access. Usually this web server runs
one Web Server (usually Apache).
ā— Virtual Private :- Many virtual server are stored on one
physical server. Each Customer has their own private virtual
server.
ā— Dedicated : A physical server that is leased to a single
customer.
www.webstackacademy.com
Amazon Web Service
Standard :- AWS allows for dedicated root access to
the server , which is a feature not available in most
virtual private servers.
Dedicated :- Dedicated Amazon will provide a
virtual server that is not on a shared server ,but its own
private cloud . It is similar to a dedicated server , but
with the flexibility of a virtual private server.
www.webstackacademy.com
Amazon Web Service
advantages over normal
Web Hosting Service
ā— High -availability (Eliminating Single points of failure)
ā— Distributed Infrastructure ,reducing latency to all
regions of the world.
ā— Cost saving ,scaling down on hardware being
used,saving money in the long term.
ā— On-demand infrastructure for scaling applications
or tasks (adding servers or ā€œhorizontal scaling ā€œ to
massively increase the hardware power available to
the application)
www.webstackacademy.com
AWS Architecture for a
Web App
www.webstackacademy.com
AWS Architecture for a
Web App
ā— The Web Application tiers runs on EC2( Amazon Elastic
Compute Cloud) instances in VPC.
ā— Access to the EC2 instances over SSH is controlled by a
security group which acts as a firewall.
ā— The Autoscaling maintains a fleet of EC2.Auto Scaling group
spans multiple availability Zones to protect against the potential
failureof a single scaling group.
ā— When the Auto Scaling group launches or terminates instances
based on the load ,the load balancer automatically adjusts
accordingly.
www.webstackacademy.com
ā— The database tier consists of DB instances in VPC,
including a master and a local slavelocated in multiple
Availability Zones.
ā— Access to the DB instances from the EC2 instances is
controlled by a security group.
ā— Amazon Route 53 provides secure and Reliable routing of
the domain name to infrastructure hosted on AWS.
AWS Architecture for a
Web App
Web Stack Academy (P) Ltd
#83, Farah Towers,
1st floor,MG Road,
Bangalore – 560001
M: +91-80-4128 9576
T: +91-98862 69112
E: info@www.webstackacademy.com

More Related Content

What's hot (20)

PDF
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Spiffy
Ā 
PDF
Introducing WebLogic 12c OTN Tour 2012
Bruno Borges
Ā 
PPTX
Combining Private and Public Clouds into Meaningful Hybrids
David Chou
Ā 
ODP
ZK MVVM, Spring & JPA On Two PaaS Clouds
Simon Massey
Ā 
PPT
Oracle WebLogic Server Basic Concepts
James Bayer
Ā 
PPTX
Windows Azure
Murali Krishna Alluri
Ā 
PPTX
Delivering Hybrid Cloud Solutions on Microsoft Azure
Kemp
Ā 
PPTX
Mesh-Enabled Web Applications
goodfriday
Ā 
PPT
How To Scale v2
Georgio_1999
Ā 
PDF
WebLogic for DBAs
Simon Haslam
Ā 
PPT
ArcReady - Architecting For The Cloud
Microsoft ArcReady
Ā 
PDF
Working with azure database services platform
ssuser79fc19
Ā 
PDF
WebLogic JMS System Best Practices
Trivadis
Ā 
PPT
The Top 10 Things Oracle UCM Users Need To Know About WebLogic
Brian Huff
Ā 
PDF
Portfolio
addl D
Ā 
PPTX
6.Live Framework 和Mesh Services
GaryYoung
Ā 
PPT
Scalable Web Architecture
Aleksandr Tsertkov
Ā 
PPT
Unplugged
Nigel Parker
Ā 
PPTX
Microsoft Database Options
David Chou
Ā 
PPT
Scaling drupal horizontally and in cloud
Vladimir Ilic
Ā 
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Spiffy
Ā 
Introducing WebLogic 12c OTN Tour 2012
Bruno Borges
Ā 
Combining Private and Public Clouds into Meaningful Hybrids
David Chou
Ā 
ZK MVVM, Spring & JPA On Two PaaS Clouds
Simon Massey
Ā 
Oracle WebLogic Server Basic Concepts
James Bayer
Ā 
Windows Azure
Murali Krishna Alluri
Ā 
Delivering Hybrid Cloud Solutions on Microsoft Azure
Kemp
Ā 
Mesh-Enabled Web Applications
goodfriday
Ā 
How To Scale v2
Georgio_1999
Ā 
WebLogic for DBAs
Simon Haslam
Ā 
ArcReady - Architecting For The Cloud
Microsoft ArcReady
Ā 
Working with azure database services platform
ssuser79fc19
Ā 
WebLogic JMS System Best Practices
Trivadis
Ā 
The Top 10 Things Oracle UCM Users Need To Know About WebLogic
Brian Huff
Ā 
Portfolio
addl D
Ā 
6.Live Framework 和Mesh Services
GaryYoung
Ā 
Scalable Web Architecture
Aleksandr Tsertkov
Ā 
Unplugged
Nigel Parker
Ā 
Microsoft Database Options
David Chou
Ā 
Scaling drupal horizontally and in cloud
Vladimir Ilic
Ā 

Similar to Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 13 - Deploying J2EE Application to Cloud (20)

PPT
java web services - soap and rest services
VasantPrasad
Ā 
PDF
Refactoring Web Services on AWS cloud (PaaS & SaaS)
IRJET Journal
Ā 
PDF
Cloud economics design, capacity and operational concerns
Marcos GarcĆ­a
Ā 
PPT
Cloud ppt
SamreenAkhtar8
Ā 
DOCX
Online furniture management system
Yesu Raj
Ā 
PDF
Components of a Generic Web Application Architecture
MadonnaLamin1
Ā 
PPT
Cloud Computing With AWS
Munish Gupta
Ā 
PPTX
Java Introduction and why do I need it?
upendra429505
Ā 
PPT
WaveMaker tutorial with Flash
marina2207
Ā 
PPT
WAD - WaveMaker tutorial
marina2207
Ā 
PPT
WaveMaker Presentation
Alexandru Chica
Ā 
PPTX
KSDG 4th event: Windows Azure Session
Jeff Chu
Ā 
PPTX
Microsoft Azure
Mohab El-Shishtawy
Ā 
PPT
Server Farms and XML Web Services
Jorgen Thelin
Ā 
PPTX
Cloud description
thanuambika
Ā 
PPTX
Presentation about servers
Sasin Prabu
Ā 
PPT
Cloud Computing basic
Himanshu Pareek
Ā 
PPTX
GNCC-9 cloud architecture (infrastructure as a Service).pptx
AdeelAsghar36
Ā 
PDF
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
IMC Institute
Ā 
PPT
Cloud Computing
Rishu Mehra
Ā 
java web services - soap and rest services
VasantPrasad
Ā 
Refactoring Web Services on AWS cloud (PaaS & SaaS)
IRJET Journal
Ā 
Cloud economics design, capacity and operational concerns
Marcos GarcĆ­a
Ā 
Cloud ppt
SamreenAkhtar8
Ā 
Online furniture management system
Yesu Raj
Ā 
Components of a Generic Web Application Architecture
MadonnaLamin1
Ā 
Cloud Computing With AWS
Munish Gupta
Ā 
Java Introduction and why do I need it?
upendra429505
Ā 
WaveMaker tutorial with Flash
marina2207
Ā 
WAD - WaveMaker tutorial
marina2207
Ā 
WaveMaker Presentation
Alexandru Chica
Ā 
KSDG 4th event: Windows Azure Session
Jeff Chu
Ā 
Microsoft Azure
Mohab El-Shishtawy
Ā 
Server Farms and XML Web Services
Jorgen Thelin
Ā 
Cloud description
thanuambika
Ā 
Presentation about servers
Sasin Prabu
Ā 
Cloud Computing basic
Himanshu Pareek
Ā 
GNCC-9 cloud architecture (infrastructure as a Service).pptx
AdeelAsghar36
Ā 
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
IMC Institute
Ā 
Cloud Computing
Rishu Mehra
Ā 
Ad

More from WebStackAcademy (20)

PDF
Webstack Academy - Course Demo Webinar and Placement Journey
WebStackAcademy
Ā 
PDF
WSA: Scaling Web Service to Handle Millions of Requests per Second
WebStackAcademy
Ā 
PDF
WSA: Course Demo Webinar - Full Stack Developer Course
WebStackAcademy
Ā 
PDF
Career Building in AI - Technologies, Trends and Opportunities
WebStackAcademy
Ā 
PDF
Webstack Academy - Internship Kick Off
WebStackAcademy
Ā 
PDF
Building Your Online Portfolio
WebStackAcademy
Ā 
PDF
Front-End Developer's Career Roadmap
WebStackAcademy
Ā 
PDF
Angular - Chapter 9 - Authentication and Authorization
WebStackAcademy
Ā 
PDF
Angular - Chapter 7 - HTTP Services
WebStackAcademy
Ā 
PDF
Angular - Chapter 6 - Firebase Integration
WebStackAcademy
Ā 
PDF
Angular - Chapter 5 - Directives
WebStackAcademy
Ā 
PDF
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
Ā 
PDF
Angular - Chapter 3 - Components
WebStackAcademy
Ā 
PDF
Angular - Chapter 2 - TypeScript Programming
WebStackAcademy
Ā 
PDF
Angular - Chapter 1 - Introduction
WebStackAcademy
Ā 
PDF
JavaScript - Chapter 10 - Strings and Arrays
WebStackAcademy
Ā 
PDF
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
Ā 
PDF
JavaScript - Chapter 14 - Form Handling
WebStackAcademy
Ā 
PDF
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
Ā 
PDF
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
Ā 
Webstack Academy - Course Demo Webinar and Placement Journey
WebStackAcademy
Ā 
WSA: Scaling Web Service to Handle Millions of Requests per Second
WebStackAcademy
Ā 
WSA: Course Demo Webinar - Full Stack Developer Course
WebStackAcademy
Ā 
Career Building in AI - Technologies, Trends and Opportunities
WebStackAcademy
Ā 
Webstack Academy - Internship Kick Off
WebStackAcademy
Ā 
Building Your Online Portfolio
WebStackAcademy
Ā 
Front-End Developer's Career Roadmap
WebStackAcademy
Ā 
Angular - Chapter 9 - Authentication and Authorization
WebStackAcademy
Ā 
Angular - Chapter 7 - HTTP Services
WebStackAcademy
Ā 
Angular - Chapter 6 - Firebase Integration
WebStackAcademy
Ā 
Angular - Chapter 5 - Directives
WebStackAcademy
Ā 
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
Ā 
Angular - Chapter 3 - Components
WebStackAcademy
Ā 
Angular - Chapter 2 - TypeScript Programming
WebStackAcademy
Ā 
Angular - Chapter 1 - Introduction
WebStackAcademy
Ā 
JavaScript - Chapter 10 - Strings and Arrays
WebStackAcademy
Ā 
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
Ā 
JavaScript - Chapter 14 - Form Handling
WebStackAcademy
Ā 
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
Ā 
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
Ā 
Ad

Recently uploaded (20)

PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
Ā 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
Ā 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
Ā 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
Ā 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
Ā 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
Ā 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
Ā 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
Ā 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
Ā 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
Ā 
PDF
ā€œSquinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
Ā 
PDF
Kit-Works Team Study_20250627_ķ•œė‹¬ė§Œģ—ė§Œė“ ģ‚¬ė‚“ģ„œė¹„ģŠ¤ķ‚¤ė§(ģ–‘ė‹¤ģœ—).pdf
Wonjun Hwang
Ā 
PDF
ā€œComputer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,ā€ a ...
Edge AI and Vision Alliance
Ā 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
Ā 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
Ā 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
Ā 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
Ā 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
Ā 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
Ā 
PDF
ā€œNPU IP Hardware Shaped Through Software and Use-case Analysis,ā€ a Presentati...
Edge AI and Vision Alliance
Ā 
The Project Compass - GDG on Campus MSIT
dscmsitkol
Ā 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
Ā 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
Ā 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
Ā 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
Ā 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
Ā 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
Ā 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
Ā 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
Ā 
How do you fast track Agentic automation use cases discovery?
DianaGray10
Ā 
ā€œSquinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
Ā 
Kit-Works Team Study_20250627_ķ•œė‹¬ė§Œģ—ė§Œė“ ģ‚¬ė‚“ģ„œė¹„ģŠ¤ķ‚¤ė§(ģ–‘ė‹¤ģœ—).pdf
Wonjun Hwang
Ā 
ā€œComputer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,ā€ a ...
Edge AI and Vision Alliance
Ā 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
Ā 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
Ā 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
Ā 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
Ā 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
Ā 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
Ā 
ā€œNPU IP Hardware Shaped Through Software and Use-case Analysis,ā€ a Presentati...
Edge AI and Vision Alliance
Ā 

Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 13 - Deploying J2EE Application to Cloud

  • 1. Web Component Development with Servlet & JSP Technologies (EE 6) Module-13: Deploying J2EE Application to Cloud
  • 2. www.webstackacademy.com Objectives Upon completion of this module, you should be able to: ā— What is Cloud? ā— Types of Cloud. ā— Cloud Sevice Models. ā— Advantages of Cloud-Computing. ā— What is Web Service? ā— Types of Web Services. ā— Building Web services with JAX-WS ā— Deploy JAX-WS web services on Tomcat ā— AWS (Amazon Web Service) ā— AWS and Normal Web Hosting Service ā— AWS Architecture
  • 4. www.webstackacademy.com What is Cloud? ā— Cloud Computing is a general term used to describe a new class of network based computing that takes place over the Internet , - a collection/group of integrated and networked hardware, software and Internet Infrastructure (called a plateform). - Using the internet for communication and transport provides hardware ,software and networking services to clients. ā— These services hide the compexity and details of the underlying infrastructure from users and applications by providing Application Programming Interface.
  • 5. www.webstackacademy.com What is Cloud? SERVERS Shared pool of configurable computing resources ā— On-demand network access ā— Provisioned by the Service Provider
  • 6. www.webstackacademy.com Types of Cloud ā— Public Cloud :- Public cloud allows the accessibility of systems and services easily to general public. Eg. Amazon , IBM , Microsoft ,Google etc. ā— Private Cloud :- Private cloud allows the accessibility of systems and services within organization. ā— Hybrid Cloud :- Hybrid Cloud is the mixture of public and private cloud. Non critical activities are performed by public cloud and critical activities are performed by private cloud.
  • 7. www.webstackacademy.com Cloud Service Models Software as a Service (SaaS) Platform as a Service (PaaS) Infrastructure as a Service (IaaS)
  • 8. www.webstackacademy.com Advantages of Cloud ā— Lower Cost Computers for users - In Cloud , we don't require a high-powered computer to run cloud computing's web based applications because applications run on cloud not on desktop PC or laptop. ā— Lower IT infrastructure cost - By using cloud computing , we don't need to invest in larger numbers of more powerful servers ,not require IT staff also for handling such powerful servers. ā— Lower Software Cost - It reduces the software cost because we don't need to purchase separate software packages fo each computer in the organization.
  • 9. www.webstackacademy.com Advantages of Cloud ā— Instant Software updates – Another software related advantage in cloud computing is that users don't need to face with the choice between obsolete software and high upgrade costs . If the app is web-based , updates happen automatically and are available next time when the user logs in to the cloud. ā— Increased Computing Power – The execution capacity of cloud servers are very high. It processes the application very fast. ā— Unlimited storage capacity - Cloud offers a huge amount of storage capacity like 2000GB or more than that if required.
  • 10. www.webstackacademy.com Web Services A Web Service can be defined in following ways : ā— is a client server application or application component for communication. ā— method of communication between two devices over network. ā— is a software system for interoperable machine to machine communication. ā— is a collection of standards or protocols for exchanging information between two devices or application.
  • 11. www.webstackacademy.com Types of Web Services There are two types of Web Services: 1) Soap Web Services 2) RESTful Web Services
  • 12. www.webstackacademy.com Soap Web Services Soap web services use XML messages that follow the Simple Object Access Protocol (SOAP) standard , an XML language defining a message architecture and message formats. Such system often contain a machine -readable description of the opeations offered by the service, written in the Web Services Description Language(WSDL) , an XML lanaguage for defining interface syntactically.
  • 13. www.webstackacademy.com RESTful Web Services In Java EE 6 , JAX-RS provides the functionality for Representational State Transfer(RESTful) web services. RESTful web services often better integrated with HTTP than SOAP-based services are , do not require XML messages or WSDL service -API definitions. RESTful web services use existing W3C and internet Engineering Task Force (IETF) standards (HTTP , XML ,URI ,MIME) and have a lightweight infrastructure that allows services to be built with minimal tooling ,devloping RESTful services is inexpensive.
  • 15. www.webstackacademy.com Building Web services with JAX-WS JAX-WS allows developers to write message-oriented as well as Remote Procedure Call-oriented(RPC -oriented) web services. The starting point for developing a JAX-WS web service is a java class annoted javax.jws.WebService annotation. The @ WebService annotation defines the web service endpoint. A service endpoint interface or service endpoint Implementation (SEI) is a java class ,that declares the methods that a client can invoke on the service. An interface is not required when building a JAX-WS endpoint.
  • 16. www.webstackacademy.com Deploy JAX-WS web services on Tomcat Steps of a web service deployment ā— Create a web service ā— Create a sun-jaxws.xml , defines web service implementation class ā— Create a standard web.xml ,defines WSServletContextLitener ,WSServlet and structure of a web project. ā— Build tool to generate WAR file. ā— Copy JAX-WS dependencies to ā€œ${Tomcat}/libā€ folder. ā— Copy WAR to ā€œ${Tomcat}/webappā€ folder. ā— Start it.
  • 17. www.webstackacademy.com Creating Web Service File : HelloWeb.java package com.emertxe.ws; import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; //Service Endpoint Interface @WebService @SOAPBinding(style = Style.RPC) public interface HelloWeb{ @WebMethod String getHelloWebAsString(); }
  • 18. www.webstackacademy.com Creating Web Service File : HelloWebImpl.java package com.emertxe.ws; import javax.jws.WebService; //Service Implementation Bean @WebService(endpointInterface = "com.emertxe.ws.HelloWeb") public class HelloWebImpl implements HelloWeb{ @Override public String getHelloWebAsString() { return "Hello Web JAX-WS"; } }
  • 19. www.webstackacademy.com Create a web service deployment descriptor File : sun-jaxws.xml <?xml version="1.0" encoding="UTF-8"?> <endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0"> <endpoint name="HelloWeb" implementation="com.emertxe.ws.HelloWebImpl" url-pattern="/hello"/> </endpoints>
  • 20. www.webstackacademy.com web.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"> <web-app> <listener> <listener-class> com.sun.xml.ws.transport.http.servlet.WSServletContextListener </listener-class> </listener>
  • 23. www.webstackacademy.com JAX-WS Dependencies Go here http://jax-ws.java.net/. copy following JAX-WS dependencies to Tomcat library folder ā€œ{$TOMCAT}/libā€œ. jaxb-impl.jar jaxws-api.jar jaxws-rt.jar gmbal-api-only.jar management-api.jar stax-ex.jar streambuffer.jar policy.jar
  • 24. www.webstackacademy.com Deployment Copy the generated WAR file to {$TOMCAT}/webapps/ folder and start the Tomcat server. For testing, access this URL : http://localhost:8080/HelloWeb/hello
  • 25. www.webstackacademy.com AWS (Amazon Web Service) ā— AWS is a subsidiary of Amazon.com ,offers a suite of cloud computing services that make up an on- demand computing plateform. ā— The most central and best-known of these services include Amazon Elastic Compute Cloud , also known as ā€œEC2ā€ and Amazon Simple Storage Service, also known as ā€œS3ā€.
  • 26. www.webstackacademy.com AWS (Amazon Web Service) ā— Amazon Web Services offers a broad set of global cloud- based products including storage , database ,analytics, networking ,mobile, developer tools ,management tools, security, compute and enterprise applications. ā— These services help organizations move faster , lower IT costs and scale . ā— AWS is trusted by the largest enterprises and starts-ups to power a wide variety of workloads including : web and mobile applications ,game development ,data processing and warehousing ,storage ,archieve and many others.
  • 27. www.webstackacademy.com Normal Web Hosting Service ā— Shared :- A physical server that is shared by many different customers. User account is restricted to certain files , and very limited access. Usually this web server runs one Web Server (usually Apache). ā— Virtual Private :- Many virtual server are stored on one physical server. Each Customer has their own private virtual server. ā— Dedicated : A physical server that is leased to a single customer.
  • 28. www.webstackacademy.com Amazon Web Service Standard :- AWS allows for dedicated root access to the server , which is a feature not available in most virtual private servers. Dedicated :- Dedicated Amazon will provide a virtual server that is not on a shared server ,but its own private cloud . It is similar to a dedicated server , but with the flexibility of a virtual private server.
  • 29. www.webstackacademy.com Amazon Web Service advantages over normal Web Hosting Service ā— High -availability (Eliminating Single points of failure) ā— Distributed Infrastructure ,reducing latency to all regions of the world. ā— Cost saving ,scaling down on hardware being used,saving money in the long term. ā— On-demand infrastructure for scaling applications or tasks (adding servers or ā€œhorizontal scaling ā€œ to massively increase the hardware power available to the application)
  • 31. www.webstackacademy.com AWS Architecture for a Web App ā— The Web Application tiers runs on EC2( Amazon Elastic Compute Cloud) instances in VPC. ā— Access to the EC2 instances over SSH is controlled by a security group which acts as a firewall. ā— The Autoscaling maintains a fleet of EC2.Auto Scaling group spans multiple availability Zones to protect against the potential failureof a single scaling group. ā— When the Auto Scaling group launches or terminates instances based on the load ,the load balancer automatically adjusts accordingly.
  • 32. www.webstackacademy.com ā— The database tier consists of DB instances in VPC, including a master and a local slavelocated in multiple Availability Zones. ā— Access to the DB instances from the EC2 instances is controlled by a security group. ā— Amazon Route 53 provides secure and Reliable routing of the domain name to infrastructure hosted on AWS. AWS Architecture for a Web App
  • 33. Web Stack Academy (P) Ltd #83, Farah Towers, 1st floor,MG Road, Bangalore – 560001 M: +91-80-4128 9576 T: +91-98862 69112 E: [email protected]