All Questions
Tagged with spring-boot tomcat
2,625
questions
197
votes
11
answers
329k
views
What is username and password when starting Spring Boot with Tomcat?
When I deploy my Spring application via Spring Boot and access localhost:8080 I have to authenticate, but what is the username and password or how can I set it? I tried to add this to my tomcat-users ...
156
votes
20
answers
244k
views
How to set the max size of upload file
I'm developing application based on Spring Boot and AngularJS using JHipster.
My question is how to set max size of uploading files?
If I'm trying to upload to big file I'm getting this information ...
106
votes
8
answers
162k
views
Max limit of MultipartFile in Spring Boot
Is there a maximum file size that spring boot can handle in a MultipartFile upload process. I know that I can set the maxFileSize in the property like multipart.maxFileSize=1Mb.
So, like that can I ...
78
votes
31
answers
376k
views
8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE
I have strange thing when I try to modify Spring project inside my Spring Tool Suite. On the first load (deploy) everything is fine, application compiles and runs on localhost:8080
When I change ...
78
votes
13
answers
124k
views
Spring Boot War deployed to Tomcat
I am trying to deploy a Spring Boot app to Tomcat, because I want to deploy to AWS.
I created a WAR file, but it does not seem to run on Tomcat, even though it is visible.
Details:
0. Here is my app:
...
76
votes
3
answers
141k
views
How to configure embedded Tomcat integrated with Spring to listen requests to IP address, besides localhost?
I am trying to run the example from the spring guide : Building a RESTful Web Service .
It works well if I open localhost:8080/greeting.
But it cannot make connection if I open either 192.168.1....
64
votes
3
answers
119k
views
Deploying Java webapp to Tomcat 8 running in Docker container
I am pretty new to Tomcat and Docker - so I am probably missing a Tomcat fundamental somewhere in this question.
What I am trying to do is build a Docker container that runs a SpringBoot Restful web ...
61
votes
9
answers
63k
views
Spring Boot application gives 404 when deployed to Tomcat but works with embedded server
Guided by Serving Web Content with Spring MVC, I'm creating a Spring Boot web application that I can run using both the embedded Tomcat instance as well as on a standalone Tomcat 8 server.
The ...
57
votes
5
answers
164k
views
How can I specify my .keystore file with Spring Boot and Tomcat?
I'm trying to set up Spring Security to work with Spring Boot's embedded Tomcat instance. There are quite a few basic samples that do this but I'm stuck where they leave off -- they do basic ...
55
votes
5
answers
64k
views
Enable HTTP2 with Tomcat in Spring Boot
Tomcat 8.5, which will be the default in Spring Boot 1.4, supports HTTP/2.
How can HTTP/2 be enabled in a Spring Boot application?
54
votes
22
answers
103k
views
Terminating mvn spring-boot:run doesn't stop tomcat
I can successfully start spring-boot with mvn spring-boot, the documentation mentions to gracefully exit the application hit ctrl-c.
Terminate batch job (Y/N)? Y
The maven process does terminate ...
54
votes
6
answers
161k
views
The web application appears to have started a thread named [Timer-0] but has failed to stop it
I am using Spring Boot 1.5.9.RELEASE + Java 8 + Tomcat 9
+ Jersey + Oracle and my app has scheduled method defined as follows:
@Configuration
@EnableScheduling
public class ScheduleConfig implements ...
49
votes
20
answers
240k
views
Spring Boot application in eclipse, the Tomcat connector configured to listen on port XXXX failed to start
I'm developing a REST API using Spring Framework.
First I wasn't able to run my application because of the same problem. The port 8080 on my computer is busy.
Then I found out that one alternative ...
46
votes
14
answers
75k
views
Process finished with exit code 1 Spring Boot Intellij
I've received the message "Process finished with exit code 1" when I run my project. I have tried several solutions but no topic is the same error as mine. My project doesn't execute any ...
46
votes
9
answers
116k
views
How to know which tomcat version embedded in spring boot
I used spring boot in project. It has inbuild tomcat server. I find out a jar spring-boot-starter-tomcat-1.2.5.RELEASE.jar. I required to do certain tomcat related configuration on linux server.
How ...
44
votes
13
answers
326k
views
Spring boot: Unable to start embedded Tomcat servlet container
I'm new to Spring Boot and having with error while running my application.
I'm following a tutorial and I believe I'm having proper parent and dependencies with POM, please help me
main class:
...
41
votes
1
answer
59k
views
How to write a proper global error handler with Spring MVC / Spring Boot
I'm writing a web application with Spring 4.0.4 and Spring Boot 1.0.2 using Tomcat as embedded web container and I want to implement a global exception handling which intercepts all exceptions and ...
40
votes
5
answers
53k
views
Spring Boot enable http requests logging (access logs)
How to enable access logs in an embedded tomcat server provided by spring boot? I've tried this in application.properties but it doesn't create file, neither logs to console.
server.tomcat.access-log-...
40
votes
8
answers
67k
views
Spring Boot with embedded Tomcat behind Apache proxy
We have a Spring Boot (Spring MVC) app with embedded Tomcat on a dedicated appserver behind an Apache SSL proxy.
The SSL port on the proxy server is 4433, forwarding to port 8080 on the appserver.
So ...
34
votes
3
answers
25k
views
Spring Boot: How to add another WAR files to the embedded tomcat?
Spring Boot's embedded tomcat is very handy, for both development and deploy.
But what if an another (3rd-party) WAR file (for example, GeoServer) should be added?
Perhaps the following is the ...
33
votes
4
answers
38k
views
External configuration for spring-boot application
I have a spring-boot application which I want to run with external configuration file.
When I run it as jar (with embedded servlet container), everything is fine.
But I want to run it under external ...
33
votes
2
answers
80k
views
org.apache.catalina.connector.ClientAbortException: java.io.IOException: APR error: -32
At my Spring Boot + Tomcat 8 project I have configured @ControllerAdvice which looks like:
@ControllerAdvice
public class GlobalControllerExceptionHandler {
final static Logger logger = ...
33
votes
5
answers
87k
views
Spring boot 3 - Jakarta and Javax
In the new Spring boot 3 Release notes, They tells that this version is going to use Jakarta EE 9 (libs named as jakarta) instead of JEE (libs named as javax).
They advise developers to replace ...
32
votes
2
answers
25k
views
spring-boot-starter-tomcat vs spring-boot-starter-web
I'm trying to learn Spring boot and I notice there are two options.
spring-boot-starter-web - which according to the docs gives support for full-stack web development, including Tomcat and web-mvc
...
31
votes
3
answers
50k
views
Deploy Spring Boot to Tomcat
So I am new to Spring - so I thought I would try Spring Boot
I am using a Maven to build - I set up a view requests, when I run it as "App" looks like it starts tomcat up itself and i have a service ...
30
votes
6
answers
38k
views
Spring Boot actuator with multiple web applications in a tomcat container throws javax.management.InstanceAlreadyExistsException exception
I am running multiple spring boot applications inside a tomcat container (not embedded - just standalone tomcat container). However, it is giving me the following exceptions when launching the web ...
30
votes
1
answer
37k
views
Spring server.forward-headers-strategy NATIVE vs FRAMEWORK
I recently upgraded spring boot from 1.x to 2.y and was facing this issue where hateoas links were generated with http scheme instead of https.
Later I discovered that with spring boot 2.2+, it is ...
29
votes
3
answers
58k
views
Spring boot enable/disable embedded tomcat with profile
I'm writing a Spring Boot application that uses one of several @Configuration classes depending on which @Profile is set in the application.propertiesfile.
One of those Configuration classes uses a ...
28
votes
8
answers
62k
views
How to externalize application.properties in Tomcat webserver for Spring?
SpringApplication will load properties from application.properties
files in the following locations and add them to the Spring
Environment:
- A /config subdirectory of the current directory.
- ...
28
votes
4
answers
39k
views
Tomcat Not reading Spring-Boot Application Properties
I'm fairly new to spring/java and have been checking out spring-boot for a project I have at work. I've been following guides and finally have a (semi) working web app MVC + JPA for data access. ...
28
votes
1
answer
28k
views
How can you scale a Spring Boot application?
I understand that Spring Boot has a built-in Tomcat server (or Jetty) which facilitates rapid development. But what do you do when you need to scale out your application because traffic has increased?...
28
votes
4
answers
62k
views
springboot embedded tomcat and tomcat-embed-jasper
I sometimes see these following declaration in pom.xml...
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>...
27
votes
5
answers
32k
views
How do you tell Spring Boot to send the embedded Tomcat's access logs to stdout?
In a standalone Spring Boot web application (executable jar), how do you tell Spring Boot that we want the embedded Tomcat instance's HTTP access logs to be sent to stdout?
27
votes
1
answer
24k
views
How to deploy AngularJS app and Spring Restful API service on the same domain/server?
I'm new to Spring and AngularJS. I followed the steps here to build the back end restful API, and it sends Json upon requests. So, according to the guide, When I run "mvn spring-boot:run" the tomcat ...
26
votes
5
answers
9k
views
Spring boot embedded container or war file in an external container for production
I'm complete able to configure spring boot in both cases, the question here is which of them are more robust and is the more recommended, because I didn't find in the spring boot documentation the ...
25
votes
3
answers
34k
views
How to externalize Spring Boot application.properties to tomcat/lib folder
I need a configuration free, deployable war, myapp1.war that can retrieve the configuration files from the tomcat/lib folder.
As I have other web applications coexisting on the same Tomcat: myapp2.war,...
25
votes
5
answers
32k
views
How to deploy SpringBoot Maven application with Jenkins ?
I have a Spring Boot application which runs on embedded Tomcat servlet container mvn spring-boot:run . And I don’t want to deploy the project as separate war to standalone Tomcat.
Whenever I push ...
25
votes
4
answers
13k
views
How to disable Tomcat session persistence in Spring Boot via Manager pathname?
In Tomcat there is a well known configuration option in conf/context.xml to disable session persistence:
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<...
23
votes
2
answers
19k
views
Why it is necessary to extend`SpringBootServletInitializer` while deploying it to an external tomcat
Why should we extend SpringBootServletInitializer in order to run a SpringBoot application to a external tomcat?
If without extending SpringBootServletInitializer it runs on embedded tomcat then why ...
22
votes
2
answers
18k
views
Spring boot app vs .war file deployed on Tomcat/Jetty [closed]
In my case let's consider a simple RESTful service created and configured with Spring Boot. This service communicates with a database (e.g. Postgres).
What is a difference between:
Building a ...
22
votes
2
answers
5k
views
Handle Embedded Tomcat Exception in Spring Boot
We have an issue where embedded Tomcat is throwing IllegalArgumentException from the LegacyCookieProcessor. It throws a 500 HTTP response code.
We need to handle the exception and do something with ...
21
votes
1
answer
8k
views
Tomcat takes too much time to start - Java SecureRandom
Please don't mark it as duplicate. It is a follow up question for both these questions.
Tomcat7 starts too late on Ubuntu 14.04 x64 [Digitalocean]
https://stackoverflow.com/a/2325109/6785908
I ...
20
votes
3
answers
14k
views
How to add context.xml file to embedded tomcat server
I'm trying to run my application in an embedded tomcat server using Spring-boot. I'm having my JNDI Resources and Environments configured in an XML file, placed under src/main/webapp/META-INF/context....
19
votes
7
answers
35k
views
Spring upload file size limit error
I am using Spring Boot and I can send images that are smaller than 1MB, but when I make a post request with a large image larger than 1MB I get this error:
Maximum upload size exceeded; nested ...
19
votes
4
answers
21k
views
Setting 'relaxedQueryChars' for embedded Tomcat
How can I set relaxedQueryChars for Spring Boot embedded Tomcat?
The connector attribute described here, but Spring Boot documentation has no such parameter listed.
How to set Tomcat's Connector ...
19
votes
4
answers
85k
views
How to setup spring-boot to allow access to the webserver from outside IP addresses
I have been looking into how to setup tomcat within spring-boot to allow access from outside IP addresses. Currently I can view the UI from locahost:port but I can not access this from other systems.
...
19
votes
3
answers
33k
views
Spring RESTful Service as a WAR instead of JAR in Tomcat
I am in the process of creating a REST web service in Java Spring. I've successfully loaded STS and the example detailed at :
"This guide walks you through the process of creating a "hello world" ...
18
votes
6
answers
26k
views
Unable to create tempDir, java.io.tmpdir is set to C:\Windows\
I'm using Spring Boot with embedded tomcat, everything worked fine and suddenly I got the error :
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to ...
18
votes
3
answers
22k
views
Spring Boot graceful shutdown
I am developing a Spring Boot application backed by embedded Tomcat and I need to develop a graceful shutdown with the following steps:
stop processing new HTTP requests (stop web container)
process ...
18
votes
6
answers
30k
views
Adding .crt to Spring Boot to enable SSL
I have never done this before, and most of the tutorials do not mention how to deal with .crt files.
I bought an SSL certificate from GoDaddy, and selected Tomcat as a platform when downloading it. ...