All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
Gustavo's user avatar
  • 3,611
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 ...
Michał Styś's user avatar
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 ...
Ravindu's user avatar
  • 2,480
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 ...
milan.latinovic's user avatar
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: ...
Daniil Shevelev's user avatar
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....
user3556304's user avatar
  • 1,027
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 ...
Chris's user avatar
  • 929
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 ...
Duncan Jones's user avatar
  • 68.5k
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 ...
Dave's user avatar
  • 7,639
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?
yglodt's user avatar
  • 14.2k
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 ...
szxnyc's user avatar
  • 2,535
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 ...
Mahmoud Saleh's user avatar
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 ...
Sandoval0992's user avatar
  • 1,317
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 ...
Roberto Pegoraro's user avatar
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 ...
bNd's user avatar
  • 7,600
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: ...
amar's user avatar
  • 451
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 ...
kayahr's user avatar
  • 21.4k
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-...
Mati's user avatar
  • 2,526
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 ...
Rop's user avatar
  • 3,409
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 ...
zeodtr's user avatar
  • 11k
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 ...
Aram Aslanyan's user avatar
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 = ...
alexanoid's user avatar
  • 25k
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 ...
0xiamjosh's user avatar
  • 423
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 ...
DavidR's user avatar
  • 6,802
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 ...
philthomas26's user avatar
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 ...
sat's user avatar
  • 5,609
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 ...
Arun Gowda's user avatar
  • 3,149
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 ...
barcom's user avatar
  • 559
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. - ...
membersound's user avatar
  • 84.2k
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. ...
loganasherjones's user avatar
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?...
progonkpa's user avatar
  • 3,780
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>...
tuty_fruity's user avatar
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?
Les Hazlewood's user avatar
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 ...
Hengwei's user avatar
  • 425
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 ...
Alejandro Agapito Bautista's user avatar
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,...
Daniel Mora's user avatar
  • 2,599
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 ...
azizunsal's user avatar
  • 2,134
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 --> <...
jamesbond007's user avatar
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 ...
Mehraj Malik's user avatar
  • 15.3k
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 ...
countryroadscat's user avatar
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 ...
samanime's user avatar
  • 25.9k
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 ...
so-random-dude's user avatar
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....
SanjaySSN's user avatar
  • 229
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 ...
Ryan Fasching's user avatar
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 ...
Alex Karasev's user avatar
  • 1,118
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. ...
ALM's user avatar
  • 2,625
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" ...
Erik's user avatar
  • 3,018
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 ...
ilya's user avatar
  • 302
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 ...
Matthew I.'s user avatar
  • 1,803
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. ...
Macskasztorik's user avatar

1
2 3 4 5
53