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

PPTX
Java on Windows Azure
PPTX
Windows azure pack overview
PPTX
Windows Azure Pack : How to bring windows azure benefits to your DC
PPTX
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
PPTX
NIC - Windows Azure Pack - Level 300
PPTX
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
PPTX
Architecting For The Windows Azure Platform
PDF
Nuxeo JavaOne 2007 presentation (in original format)
Java on Windows Azure
Windows azure pack overview
Windows Azure Pack : How to bring windows azure benefits to your DC
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
NIC - Windows Azure Pack - Level 300
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
Architecting For The Windows Azure Platform
Nuxeo JavaOne 2007 presentation (in original format)

What's hot (20)

PDF
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
PDF
Introducing WebLogic 12c OTN Tour 2012
PPTX
Combining Private and Public Clouds into Meaningful Hybrids
ODP
ZK MVVM, Spring & JPA On Two PaaS Clouds
PPT
Oracle WebLogic Server Basic Concepts
PPTX
Windows Azure
PPTX
Delivering Hybrid Cloud Solutions on Microsoft Azure
PPTX
Mesh-Enabled Web Applications
PPT
How To Scale v2
PDF
WebLogic for DBAs
PPT
ArcReady - Architecting For The Cloud
PDF
Working with azure database services platform
PDF
WebLogic JMS System Best Practices
PPT
The Top 10 Things Oracle UCM Users Need To Know About WebLogic
PDF
Portfolio
PPTX
6.Live Framework 和Mesh Services
PPT
Scalable Web Architecture
PPT
Unplugged
PPTX
Microsoft Database Options
PPT
Scaling drupal horizontally and in cloud
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Introducing WebLogic 12c OTN Tour 2012
Combining Private and Public Clouds into Meaningful Hybrids
ZK MVVM, Spring & JPA On Two PaaS Clouds
Oracle WebLogic Server Basic Concepts
Windows Azure
Delivering Hybrid Cloud Solutions on Microsoft Azure
Mesh-Enabled Web Applications
How To Scale v2
WebLogic for DBAs
ArcReady - Architecting For The Cloud
Working with azure database services platform
WebLogic JMS System Best Practices
The Top 10 Things Oracle UCM Users Need To Know About WebLogic
Portfolio
6.Live Framework 和Mesh Services
Scalable Web Architecture
Unplugged
Microsoft Database Options
Scaling drupal horizontally and in cloud
Ad

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
PDF
Refactoring Web Services on AWS cloud (PaaS & SaaS)
PDF
Cloud economics design, capacity and operational concerns
PPT
Cloud ppt
DOCX
Online furniture management system
PDF
Components of a Generic Web Application Architecture
PPT
Cloud Computing With AWS
PPTX
Java Introduction and why do I need it?
PPT
WaveMaker tutorial with Flash
PPT
WAD - WaveMaker tutorial
PPT
WaveMaker Presentation
PPTX
KSDG 4th event: Windows Azure Session
PPTX
Microsoft Azure
PPT
Server Farms and XML Web Services
PPTX
Cloud description
PPTX
Presentation about servers
PPT
Cloud Computing basic
PPTX
GNCC-9 cloud architecture (infrastructure as a Service).pptx
PDF
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
PPT
Cloud Computing
java web services - soap and rest services
Refactoring Web Services on AWS cloud (PaaS & SaaS)
Cloud economics design, capacity and operational concerns
Cloud ppt
Online furniture management system
Components of a Generic Web Application Architecture
Cloud Computing With AWS
Java Introduction and why do I need it?
WaveMaker tutorial with Flash
WAD - WaveMaker tutorial
WaveMaker Presentation
KSDG 4th event: Windows Azure Session
Microsoft Azure
Server Farms and XML Web Services
Cloud description
Presentation about servers
Cloud Computing basic
GNCC-9 cloud architecture (infrastructure as a Service).pptx
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
Cloud Computing
Ad

More from WebStackAcademy (20)

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

Recently uploaded (20)

PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Electronic commerce courselecture one. Pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Modernizing your data center with Dell and AMD
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Chapter 2 Digital Image Fundamentals.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
madgavkar20181017ppt McKinsey Presentation.pdf
Review of recent advances in non-invasive hemoglobin estimation
Electronic commerce courselecture one. Pdf
NewMind AI Weekly Chronicles - August'25 Week I
Modernizing your data center with Dell and AMD
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
GamePlan Trading System Review: Professional Trader's Honest Take
“AI and Expert System Decision Support & Business Intelligence Systems”
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Chapter 2 Digital Image Fundamentals.pdf
NewMind AI Monthly Chronicles - July 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....

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]