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 answers
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
- Unable to compile the class for JSP in tomcat 8.5.95
- detect catalina.out log path from a running tomcat on non-Windows
- Tomcat 9.0.80 with Open JDK (JRE only) v16.0.2 crashing/unresponsive several times a day with load: Thread Count hits Max and All Threads are Busy
- JAX-RS webapp deployed to Tomcat returns HTTP 404 error while it works fine in Eclipse
- Illegal access: this web application instance has been stopped already. Could not load [org.apache.logging.log4j.message.SimpleMessage]
- File Upload Handling: Inconsistent HTTP Response Codes for Different File Sizes with Exception in Tomcat
- Don't get any public folder when deployment in svelte kit app
- Accessing solr web interface behind reverse proxy returns "Content Encoding Error"
- java.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.SSL.renegotiatePending(J)I
- Cannot decrypt the password in application.yml properly if war file in the tomcat/webapps
- how to deploy mock json data api's(json-server) and angular 17 application in apache tomcat server 9 version
- version compatibility issue between spring boot, struts2-core and tomcat-embed-jasper in web application
- Is there any possibility to use JTA with Spring Framework 6 and Tomcat or Payara?
- Eclipse issue with publishing to Tomcat server
- null in Camunda variables
Related Questions in JETTY
- Validate File Upload Request BEFORE File is Uploaded to Jetty
- BSON Error in Jetty Custom Configuration for persisting sessions in mongo
- Would a jetty sdkman candidate be worthwhile?
- In jetty websocket framework, what is the difference between WebSocketConnectionListener and WebSocketSessionListener?
- Jetty server 12 - Not able to get the HttpServletRequest and HttpServletResponse objects inside handler method
- Jetty 12: inject business object into Server Endpoint without annotations
- Kuberntes Pod not reachable with https o http
- jetty9 in open suse: how to start?
- jax-rs nested provider with Jersey+Jetty
- Embedded Jetty WebSocket server in a different context
- Upgrading jetty for geoserver
- unexpected error 404 - for resources registered in nested springboot jar
- shibboleth 5 with slapd integration login
- jakarta.servlet dependencies mismatch while upgrading spring version
- class io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet is not a javax.servlet.Servlet
Related Questions in EMBEDDED-JETTY
- Upgrading Jetty 9.4.12 to 9.4.53.v20231009
- Jetty server 12 - Not able to get the HttpServletRequest and HttpServletResponse objects inside handler method
- Add jsp-support to embedded Jetty 12
- Embedded Jetty WebSocket server in a different context
- unexpected error 404 - for resources registered in nested springboot jar
- Jetty 12 ResourceHandler configuration and MIME-types issues
- WSS server/client/jetty example
- How to create Rest API in Jetty 12 using Handler.Abstract
- How to migrate from embedded Jetty 10 to jetty 12 ee8?
- Getting 404 when accessing classes annotated with @Path in {war}/WEB-INF/classes in Jetty 9
- CONNECT through proxy removes additional headers required for authorization
- embedded jetty 9 restarting the server in every 3 minutes
- Embedded Jetty 12.0.3 - Running both EE8 and EE10 Webapps - Servlet class org.eclipse.jetty.ee8.jsp.JettyJspServlet is not a javax.servlet.Servlet
- How to use Jetty quickstart with embedded Jetty?
- Problem upgrading from gwt 2.9 to GWT 2.10
Related Questions in HTTPSERVER
- how to stop accepting new requests before closing existing ones?
- Rust TCP Server: Connection Reset by Peer During Concurrent Requests
- Starting a Grizzly HTTP server on a fargate container
- Is there a bug in the calculation of the winner in the Tic-Tac-Toe game React app? Could you assist me in identifying the mistake?
- How to write data to client and then exit process in golang http server?
- Configuring ALB in Existing Application
- Nginx resolver with proxy pass and variables not functioning
- Moving my personal server from "http:" to secure "https:" version doesn't work with "HttpServer" in C# and "WebSocket" in javascript
- Upon submitting a html form, method POST an uncalled GET request follows causing an error in my node JS http server, why is this redirect happening?
- Need a help to establish the connection between content server and sap server using archive link
- How to use EnableFullDuplex() method in golang 1.21
- Can I drop a handler after a certain timeout on POCO Http Server?
- What is a default port range for server.port=0 in spring boot application?
- Java httpserver cannot send large files
- No Access to external https source despite CORS is enabled for al in vite.config
Related Questions in EMBEDDED-TOMCAT-7
- Embedded Tomcat, how to replace existing web.xml meant for standard Tomcat with new logic for Embedded Tomcat
- static resources not deploying to tomcat-docbase folder - (IntelliJ 2018 / Spring Boot 2 / Embedded Tomcat)
- How to create/find application jar to deploy your spring boot maven application using embedded tomcat?
- How I can deploy existing web applications (wars) in the Spring Boot embedded server (tomcat)
- How I can start and stop applications deployed in a tomcat embedded server
- tomcat.util.scan.DefaultJarScanner.jarsToSkip property not working
- How to check if app is running on Tomcat 7 embedded?
- Add war to spring boot embedded tomcat
- Spring boot with Java 7 in Weblogic
- Embedded Tomcat without unpacking
- Spring boot and Tomcat : Is it better to use embeded Tomcat or external Tomcat installation.
- How to run a spring web app without a full Tomcat install?
- Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
- Persistent Connections With HTTPS not working
- Using Spring Boot 2.0 with Tomcat 7.0.82
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?
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)
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.