Questions about running Apache Tomcat 7 as an embedded server in another application.
Questions tagged [embedded-tomcat-7]
155 questions
133
votes
13 answers
Spring Boot - How to get the running port
I have a spring boot application (using embedded tomcat 7), and I've set server.port = 0 in my application.properties so I can have a random port. After the server is booted up and running on a port, I need to be able to get the port that that was…

Tucker
- 7,017
- 9
- 37
- 55
59
votes
8 answers
How to create JNDI context in Spring Boot with Embedded Tomcat Container
import org.apache.catalina.Context;
import org.apache.catalina.deploy.ContextResource;
import org.apache.catalina.startup.Tomcat;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import…

DaShaun
- 3,722
- 2
- 27
- 29
21
votes
2 answers
Embedded vs Stand alone Tomcat ( HTTP ) server
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…

broun
- 2,483
- 5
- 40
- 55
12
votes
1 answer
Specify a custom web.xml to an embedded tomcat
Is there a way to specify a different web.xml from the standard WEB-INF/web.xml when using an embedded tomcat instance?
I would like to put a web.xml in my src/test/resources (or some other area) and refer to that web.xml when starting the embedded…

Jeffrey Cameron
- 9,975
- 10
- 45
- 77
9
votes
1 answer
tomcat 7 embedded doesn't shutdown correctly ClassNotFoundException ContainerBase$StopChild
I'm trying to make work integration test with Tomcat7 embedded plugin with this config:
org.apache.tomcat.maven
tomcat7-maven-plugin
…

user358501
- 438
- 6
- 8
8
votes
2 answers
tomcat7-maven-plugin / tomcat7:run where to store custom context.xml?
I like to develop using the tomcat7-maven-plugin, especially the mvn tomcat7:run / tomcat7:run-war goal in order to quickly test my app,
this plugin allows you to specify a custom Context.xml (which is very handy to provide stub for jndi…

gjambet
- 369
- 5
- 13
7
votes
1 answer
Add war to spring boot embedded tomcat
I have a spring-boot 2.1.2.RELEASE application that uses embedded tomcat webserver and uses OpenKM via it's SDK.
Now, I have some integration tests that use restassured lib to make REST calls and verify response structure. My idea is to integrate…

greengold
- 1,184
- 3
- 18
- 43
7
votes
1 answer
java.net.SocketTimeoutException on embedded tomcat with jersey
My server application use embedded tomcat with Jersey.
From time to time I'm getting the following error:
02-03-2014 10:06:05 [com.sun.jersey.spi.container.ContainerResponse] [http-nio-8243-exec-4] [ERROR] - The exception contained within…

danieln
- 4,795
- 10
- 42
- 64
6
votes
2 answers
tomcat7-maven-plugin: run multiple webapps but port 8080 already in use
I'm trying to use tomcat7-maven-plugin to setup an embedded tomcat container, run webapps in pre-integration-test phase, run integration tests, then shutdown tomcat in post-integration-test phase. The project is a multi-module maven project…

zihaoyu
- 5,483
- 11
- 42
- 46
5
votes
5 answers
Java+Maven+Embedded Tomcat: Project refuses to recognize web page
I have been trying to make my Java application host a web page (an HTML page, not JSP) through Apache Tomcat embedded in the application. I am using Maven for the build system on NetBeans IDE 8.0.2. For some reason, Tomcat refuses to recognise the…

Mayukh Nair
- 623
- 1
- 6
- 26
5
votes
4 answers
spring boot application in cluster
I am developing a spring boot application.
Since spring boot created a .jar file for an application.
I want to cluster this particular application on different server. Lets say I build a jar file and ran a project then it should run in cluster mode…

mahendra kawde
- 855
- 4
- 25
- 44
5
votes
2 answers
Gradle Spring Boot project not working in Tomcat as a WAR
I have a simple sample application written in Spring Boot using Gradle dependency. It says helloworld on calling localhost:8080/greetings. I packaged it as WAR and deployed it to a Tomcat as a myWebApp.war.
When i call…

Vinodh Thiagarajan
- 758
- 3
- 9
- 19
5
votes
2 answers
How do I tell Spring Boot to ignore Jetty and always use Tomcat?
I have the following setup:
spring-boot application (using embedded tomcat)
spring-date-neo4j (embedded mode)
spring-websockets
and neo4j-browser included using (the goal is to be able to use REST and web browser to debug embedded database):
…

MarSik
- 211
- 1
- 2
- 7
5
votes
2 answers
Make EL work with tomcat 7 embedded (using spring MVC)
I made an example, available on github, that uses tomcat embedded to boot a simple spring MVC application. The application boot with apparently no problem, but in the rendered jsp, el expression is not processed.
Here is my pom.xml :

baraber
- 3,296
- 27
- 46
5
votes
1 answer
How to use different web.xml descriptor in tomcat7-maven-plugin:run?
I would like to have two different web.xml descriptor files in my maven project. First (default) should be included in war file for deployment to application server and second should be used for development using tomcat7-maven-plugin:run. I know…

Vojta
- 1,583
- 17
- 19