SlideShare a Scribd company logo
1 of 21
Web application with Mule
By Raju
There are often question raised on deploying and running Web application in
Mule.
People often ask “is it possible to deploy and run Web application in Mule
“ ??
And the answer is Yes
Before we start how, I like to have a overview on the similarities and
difference between Mule server and a Web application server
Similarities
• They both allow you to run multiple applications simultaneously.
• They both provide an application container. What that means is, they
both provide an environment in which an application can run, acting as
an intermediary between application code and the operating system, and
providing database access, easier communication over the network,
memory management, lifecycle management, and other services.
• They both allow us to manage your applications at runtime.
Source : MuleSoft
Differences
Mule specializes in three things:-
• It acts as a platform for applications that move data from one place to
another and often transform that data along the way so that it is
readable at the other end
• It exports services to other applications
• It provides orchestrating services
Source : MuleSoft
Now, the question is it possible to deploy a Web application in Mule server
which can interact or integrate with Mule application running on the server
???
Yes .. It is possible …… Let’s see how ….
Mule can run JavaEE web-apps thanks to its embedded Jetty container.
Let us consider our web-app is mule.war, the layout we want in our Mule
application Zip is
And our mule-config.xml will host the jetty server:
Now, let’s create our application such that the Web application can interact with
our Mule :-
Here we can see we enter some value from a web page which
is carried at the backend by a web service and the data is
stored/retrieve from Database
So, we will create another Mule flow that will expose the web service to
carry the data backend :-
So, the Mule flow will be :-
.
And our User interface file will be :-
The folder structure of our Mule application will be :-
.
Let’s test our application , and we will be hitting url http://localhost:8083/mule/
and we will get following :-
We can see our JSP page has appeared on the screen
.
Now let’s put some value and hit insert button, :-
.
We will get the response back to the browser
You can see easily that the backend web service exposed in Mule has inseted
the data into the database and returned the response back to the JSP page
This is what happened behind …. When we entered the value in our web page
(JSP) and hit the insert button, the data is carried into the database by the
backend web service hosted in Mule
Now after the data has been inserted into database, the web service carries the
response back to the web page (JSP)
So, we can see that Mule can host the web application using Jetty connector
and we can interact with the web application with our other Mule flows
easily, ad we have done here with a web service from our Mule flow which
carried all the data to and from the web page .
Hope you liked this small tricks in Mule.
If you have any similar tricks in Mule, please do share it with all and let our
Mule community grow
Happy coding 
Webapplicationwithmule by raju

More Related Content

What's hot

What's hot (18)

Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Validate Soap Request in Mule
Validate Soap Request in MuleValidate Soap Request in Mule
Validate Soap Request in Mule
 
Soap in mule
Soap in muleSoap in mule
Soap in mule
 
Mulesoft vm transport reference
Mulesoft vm transport referenceMulesoft vm transport reference
Mulesoft vm transport reference
 
Configuration patterns in mule
Configuration patterns in muleConfiguration patterns in mule
Configuration patterns in mule
 
Using mule with web services
Using mule with web servicesUsing mule with web services
Using mule with web services
 
Mule velocity
Mule velocityMule velocity
Mule velocity
 
Mule message enricher
Mule message enricherMule message enricher
Mule message enricher
 
Configurare http mule
Configurare http muleConfigurare http mule
Configurare http mule
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
 
Mule and web services
Mule and web servicesMule and web services
Mule and web services
 
Mule with composite source
Mule with composite sourceMule with composite source
Mule with composite source
 
Map in Mule
Map in MuleMap in Mule
Map in Mule
 
Soap request in mule
Soap request in mule Soap request in mule
Soap request in mule
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
 
Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
 
Using spring task scheduler in java in mule
Using spring task scheduler in java in muleUsing spring task scheduler in java in mule
Using spring task scheduler in java in mule
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 

Similar to Webapplicationwithmule by raju

Sending the data already gathered from the client to the Server
Sending the data already gathered from the client to the ServerSending the data already gathered from the client to the Server
Sending the data already gathered from the client to the Serverhussam242
 
Mashups and Web Services
Mashups and Web ServicesMashups and Web Services
Mashups and Web Servicesgiurca
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a databaseSon Nguyen
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored proceduremdfkhan625
 
Stored procedure in mule
Stored procedure in muleStored procedure in mule
Stored procedure in muleManav Prasad
 
Mulethenewtechnology 12549172699166-phpapp03-160421133841
Mulethenewtechnology 12549172699166-phpapp03-160421133841Mulethenewtechnology 12549172699166-phpapp03-160421133841
Mulethenewtechnology 12549172699166-phpapp03-160421133841ppts123456
 
Mule technology
Mule technologyMule technology
Mule technologyF K
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedurejaveed_mhd
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedureMohammed625
 
Jmp206 Web Services Bootcamp Final Draft
Jmp206   Web Services Bootcamp Final DraftJmp206   Web Services Bootcamp Final Draft
Jmp206 Web Services Bootcamp Final DraftBill Buchan
 
Introduction to mule soft
Introduction to mule softIntroduction to mule soft
Introduction to mule softrajnishjha29
 

Similar to Webapplicationwithmule by raju (20)

Using ajax in mule
Using ajax in muleUsing ajax in mule
Using ajax in mule
 
Sending the data already gathered from the client to the Server
Sending the data already gathered from the client to the ServerSending the data already gathered from the client to the Server
Sending the data already gathered from the client to the Server
 
Mashups and Web Services
Mashups and Web ServicesMashups and Web Services
Mashups and Web Services
 
Web Service
Web ServiceWeb Service
Web Service
 
Mule soft ppt 3
Mule soft ppt  3Mule soft ppt  3
Mule soft ppt 3
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a database
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
Stored procedure in mule
Stored procedure in muleStored procedure in mule
Stored procedure in mule
 
Mulethenewtechnology 12549172699166-phpapp03-160421133841
Mulethenewtechnology 12549172699166-phpapp03-160421133841Mulethenewtechnology 12549172699166-phpapp03-160421133841
Mulethenewtechnology 12549172699166-phpapp03-160421133841
 
Mule technology
Mule technologyMule technology
Mule technology
 
Mule technology
Mule technologyMule technology
Mule technology
 
Mule technology
Mule technologyMule technology
Mule technology
 
Mule ESB
Mule ESBMule ESB
Mule ESB
 
Introduction to mule soft
Introduction to mule softIntroduction to mule soft
Introduction to mule soft
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
Mule stored procedure
Mule stored procedureMule stored procedure
Mule stored procedure
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
Jmp206 Web Services Bootcamp Final Draft
Jmp206   Web Services Bootcamp Final DraftJmp206   Web Services Bootcamp Final Draft
Jmp206 Web Services Bootcamp Final Draft
 
Mule ESB
Mule ESBMule ESB
Mule ESB
 
Introduction to mule soft
Introduction to mule softIntroduction to mule soft
Introduction to mule soft
 

Recently uploaded

Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
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
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
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.
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 

Recently uploaded (20)

Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
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...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
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...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 

Webapplicationwithmule by raju

  • 1. Web application with Mule By Raju
  • 2. There are often question raised on deploying and running Web application in Mule. People often ask “is it possible to deploy and run Web application in Mule “ ?? And the answer is Yes
  • 3. Before we start how, I like to have a overview on the similarities and difference between Mule server and a Web application server Similarities • They both allow you to run multiple applications simultaneously. • They both provide an application container. What that means is, they both provide an environment in which an application can run, acting as an intermediary between application code and the operating system, and providing database access, easier communication over the network, memory management, lifecycle management, and other services. • They both allow us to manage your applications at runtime. Source : MuleSoft
  • 4. Differences Mule specializes in three things:- • It acts as a platform for applications that move data from one place to another and often transform that data along the way so that it is readable at the other end • It exports services to other applications • It provides orchestrating services Source : MuleSoft
  • 5. Now, the question is it possible to deploy a Web application in Mule server which can interact or integrate with Mule application running on the server ???
  • 6. Yes .. It is possible …… Let’s see how ….
  • 7. Mule can run JavaEE web-apps thanks to its embedded Jetty container. Let us consider our web-app is mule.war, the layout we want in our Mule application Zip is
  • 8. And our mule-config.xml will host the jetty server:
  • 9. Now, let’s create our application such that the Web application can interact with our Mule :- Here we can see we enter some value from a web page which is carried at the backend by a web service and the data is stored/retrieve from Database
  • 10. So, we will create another Mule flow that will expose the web service to carry the data backend :-
  • 11. So, the Mule flow will be :-
  • 12. . And our User interface file will be :-
  • 13. The folder structure of our Mule application will be :-
  • 14. . Let’s test our application , and we will be hitting url http://localhost:8083/mule/ and we will get following :- We can see our JSP page has appeared on the screen
  • 15. . Now let’s put some value and hit insert button, :-
  • 16. . We will get the response back to the browser You can see easily that the backend web service exposed in Mule has inseted the data into the database and returned the response back to the JSP page
  • 17. This is what happened behind …. When we entered the value in our web page (JSP) and hit the insert button, the data is carried into the database by the backend web service hosted in Mule
  • 18. Now after the data has been inserted into database, the web service carries the response back to the web page (JSP)
  • 19. So, we can see that Mule can host the web application using Jetty connector and we can interact with the web application with our other Mule flows easily, ad we have done here with a web service from our Mule flow which carried all the data to and from the web page .
  • 20. Hope you liked this small tricks in Mule. If you have any similar tricks in Mule, please do share it with all and let our Mule community grow Happy coding 