I am working on a new project which would be a web application with a front end UI and a back end web service. I started looking into what servers to use like Tomcat / Jetty and so .. I also noticed that there is an embedded version of these HTTP servers. I don't understand when to use an embedded version against a standalone version. I tried googling but could not find a convincing answer, So would appreciate if some one to explain me the use-case for an embedded server. Thanks in advance.
Embedded vs Stand alone Tomcat ( HTTP ) server
15.7k Views Asked by broun AtThere are 2 best solutions below
kdabir
On
Embedded servers are useful when you treat your application as an OS process and it will be started with something like java -jar youapp.jar. In this scenario, setting up the box upfront with a given app server, say, Tomcat, is not necessary. Such applications can be run by the end user without needing extra installation and configuration of an app server.
Applications like Jenkins for example hugely benefit from such packaging. Another scenario is when deploying on cloud services like Heroku. You wrapping the app server within your jar eliminates the need to get the server installed on such cloud boxes.
Here essentially a single web app runs on a given embedded server. However if you wish to install two web apps on lets say two contexts ${root}/app1 ${root}/app2 then embedded app server is not a good option for you.
Related Questions in TOMCAT
- Best way to pass an environment variable to several config files
- Openshift context path
- KeyStore file is not found in jar, although present in jar
- phpseclib of how to get PID and kill
- Unable to connect database of lamp instance from servlet running on tomcat instance of google cloud
- Spring and Tomcat: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
- How can I get a custom header from the client in Tomcat?
- why lost Mysql connection pool after a period?
- Eclipse Java EE + Bitnami Tomcat Stack
- Service not starting using Spring-boot during integration tests
- Image not loading in web page and says 404 error
- Maven Tomcat plugin - 404 WebServlet not found
- How to deploy a spring boot MVC application in traditional tomcat webapps folder?
- Tomcat Manager is not accessible in multi-domain configuration
- JSP return Jasper Exceptions on my friend's pc's when it works on mine
Related Questions in JETTY
- What's the difference between a ServletHandler and a ServletContextHandler in Jetty?
- How to configure standalone Jetty 9 as a reverse proxy to a node app?
- Starting a ScheduledExecutorService from a servlet with a set of parameters
- jetty replay request on timeout
- Jetty server running SPDY behind an Apache firewall
- Java agent not forwarding traces to appneta tracelytics/traceview
- Dropwizard how to configure a datasource?
- Dropwizard 0.7 service hangs while writing output
- View http request when using mvn jetty:run
- How to Close HikariCP JNDI DataSource on Shutdown/Redeploy
- UnsatisfiedLinkError when running Jetty9's setUID feature
- Jetty Web Socket Timeout
- Where does Jetty store information about authenticated user?
- spring + Embedded jetty + <web-app> how to create context
- Jetty + Jersey + Spring DI with no web.xml
Related Questions in EMBEDDED-JETTY
- What's the difference between a ServletHandler and a ServletContextHandler in Jetty?
- Embedded Jetty doesn't recognise Spring MVC Security
- Is it possible to store static resources inside the uber jar created with an embedded jetty project?
- Embedded Jetty REST service with Welcome File
- Setting up JAX-RS to provide an API and serve up static resources
- Partial response in jetty REST service
- Embedded Jetty: How do I call setSessionTrackingModes without a ServletContextListener
- Jetty ResourceHandler in multi project gradle build looks in the wrong directory
- jetty Persistent Sessions
- Jetty custom authentication
- I am trying to a servlet based application to work
- Spring Boot 1.4.2 + Jetty fails on startup with NullPointerException
- Jetty "javax.net.ssl.SSLHandshakeException: no cipher suites in common"
- Embedded Jetty responds to clear http on port 443
- Cant locate swagger.json on Java + Jetty + httpservlet + swagger integration
Related Questions in HTTPSERVER
- HTTP Server in iOS to list files Documents directory
- How to add http server to eclipse server runtime environments?
- Simple https web server as command line application for Mac in objective C
- Running an Http Server in Background in iOS
- Get request body from node.js's http.IncomingMessage
- Strange behavior after relaunching an iOS app after termination
- When should I include Content-Disposition header in a Partial-Content HTTP response?
- not found using http-server node.js
- Java - HttpServer not serving images
- HTTP GET server in C, long waiting (TTFB)
- Java HttpsServer class - support for multiple protocols?
- Simple-Web-Server crashes on probably wrongly catched exception
- Allow TIdHTTPServer to be accessed only from one client
- Java httpServer basic authentication for different request methods
- Java basic httpserver using apache httpcompoments
Related Questions in EMBEDDED-TOMCAT-7
- spring boot basic http authentication with multiple roles throws 403 forbidden error
- Why EhCache not caching this query?
- When I run grails run-app command I get Caching deactivated failed to create cache
- How can I configure embedded tomcat to listen to port 80 and 8443?
- Embedded Tomcat 6.0.37, set ssl redirect and restart connector
- static resources not deploying to tomcat-docbase folder - (IntelliJ 2018 / Spring Boot 2 / Embedded Tomcat)
- tomcat 7 embedded doesn't shutdown correctly ClassNotFoundException ContainerBase$StopChild
- Embedded vs Stand alone Tomcat ( HTTP ) server
- configure hibernate with embedded tomcat 7 programmatically
- Deployment of resources on embedded Tomcat server using Spring Boot
- Non-ASCII symbols in path variable of Spring MVC application on embedded Tomcat server setup using Spring Boot
- Embedded Tomcat and jersey
- Where should i get context.xml for tomcat7-maven-plugin
- Gracefully shut down embedded tomcat 7
- Load webapp from the compiled jar file with embedded Tomcat 7
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I have used
embedded-jettyfor a web app. The reason I used is was that I didn't want to set up a separate web server for just one App,. So I made a simple java program with embedding jetty in it and configure all server properties through java code. Now I can run this program on any machine without web server installed and it will act as a web app running in a server. I can associate any port and program many-to-many context/servlet mapping in it.