Questions tagged [embedded-tomcat]
The embedded-tomcat tag has no usage guidance.
55
questions
0
votes
1
answer
31
views
How to define rewrite rules for a jhipster application with angular frontend running productive as jar with embedded tomcat?
One needs to configure some rewrite rules for Angular SPAs to redirect requests to the index.html: https://angular.io/guide/deployment#server-configuration
We use the Jhipster generator (Spring Boot) ...
0
votes
1
answer
115
views
how to set maxHttpHeaderSize in spring-boot 3.x
As stated in the Spring Boot 3 Migration Guide the server.max-http-header-size property has been deprecated. You can use the server.max-http-request-header-size property to set the max http request ...
0
votes
1
answer
57
views
Basic Weld example with Embedded Tomcat not working
I am trying to use Weld with Embedded Tomcat (10.1.5) using a basic example and settings from official weld docs.
This weld injection with same code works fine with Tomcat on Eclipse.
However, on ...
0
votes
0
answers
39
views
Passing @PropertySource and Maven variable from command line
I have create a SpringBoot fat war application to run it inside his embedded Tomcat.
Now I have a older configuration like follow:
@SpringBootApplication
@PropertySources({
@PropertySource(value = &...
1
vote
0
answers
70
views
How can I convert a Web Application with multiple servlet contexts to Spring Boot using embedded Tomcat?
I need to convert an old web application containing multiple tomcat contexts into a Spring Boot application that utilizes Embedded Tomcat.
The following is the server.xml file defining the contexts:
...
0
votes
0
answers
31
views
How to implement websocket by embed-tomcat?
I want to implement websocket by embed-tomcat, but when I run my program, the tomcat can't handle websocket request, it just can handle servlet request, this is my github demo program: https://github....
0
votes
1
answer
170
views
Packaging Spring MVC project with embedded Tomcat server into a JAR file
I need to create a JAR file for the Spring MVC (not spring boot) project with an embedded tomcat server. I am using shadow gradle plugin to create the JAR.
Everything works fine when I run the main ...
1
vote
2
answers
382
views
How to add health endpoint in Apache Tomcat 9?
I am using Apache Tomcat 9 server as a Maven dependency in my project. It is working fine and now I need to add a health endpoint so that it will return 200 OK if everything is running fine.
I came to ...
0
votes
0
answers
50
views
Set max session age with spring security
I would like to set the max session age, but I cannot see how to do this, I am already setting a session inactivity timeout of 15 minutes, but I also want to enforce a session max age of 12 hours, ...
0
votes
1
answer
316
views
Handle tomcat request parsing failure in Spring-Boot
I have a Spring-Boot-Web JSON-API that has a custom error handling with specific error responses. However, if I call my server with a bad URL then neither Spring's ErrorController, nor Spring's @...
2
votes
1
answer
229
views
How do I integrate Tomcat APR protocol connector with embedded Tomcat 9 in Springboot 2.3.12?
I need to use APR protocol connector to replace the default NIO protocol connector in embedded Tomcat 9 of Springboot 2.3.12, may I ask how to implement it?
0
votes
1
answer
197
views
Configuring access log pattern for Spring Boot application on external Tomcat
I have a Spring Boot 2.7.2 web application. The Tomcat access log properties are defined as
server.tomcat.accesslog.enabled=TRUE
server.tomcat.accesslog.directory=log
server.tomcat.accesslog.pattern=%...
0
votes
0
answers
50
views
Location of embedded Tomcat 9 session files / folder while running tomcat from IntelliJ IDEA 2022.1.2 (Community Edition)
Where can I find temporary files created by an embedded tomcat 9 while running project from IntelliJ IDEA 2022.1.2 (Community Edition)
P.S I see this class path
"Desktop\open_JDKs\jdk-11\bin\...
0
votes
0
answers
396
views
Spring boot - embedded Tomcat SSL config [duplicate]
My Spring Boot service runs on server.name.com:8088 and I have purchased a certificate for server.name.com . I already installed the certificate on the server, the thing is, I don't know if I can use ...
0
votes
0
answers
17
views
Deploy a war to a Tomcat that is originally designed to work with embedded Tomcat
I encountered a 404 error while trying to access a Spring Boot web app on Tomcat 10. The war is designed and work OK with embedded Tomcat (thru the cmd: mvn spring-boot:run). An example of invocation ...
0
votes
0
answers
27
views
Embedded tomcat in spring application
Hi, I am trying implement embedded tomcat server in spring application but problem is, it shows warning line no global web.xml and server was not started. Kindly help if someone face this same ...
3
votes
0
answers
764
views
Spring Boot 2.6.6 upgrade JNDI lookup Failure : Name [java:comp/env/jdbc/testdatasource] is not bound in this context. unable to find [java:comp]
I am trying to upgrade from Spring Boot 2.2.4.Release to 2.6.6. I have a embedded tomcat server configured in older version of the Spring boot 2.2.4 which works perfectly fine.
@override
protected ...
0
votes
0
answers
331
views
springboot embeded tomcat @Requestbody default content type charset utf-8
i am using springboot with embeded tomcat to process http requests.
if a post (content-type=application/json, it was encode with utf-8) request to my springboot server, it can not recogine charset ...
0
votes
0
answers
149
views
Spring boot Embedded Tomcat does not establish multiple connections from the same src IP
I have spring boot application 2.5.8 that uses embedded Tomcat. This server listens to port 8081.
When a client establishes TCP connection with my server, it works ok.
But when client is trying ...
3
votes
2
answers
2k
views
Simple Embedded Tomcat 10 Example
I'm trying to get a simple embedded tomcat 10.1.0-M11 example working but I keep getting localhost refused to connect when I go to http://localhost:8080/aa. There is no StackOverflow label yet for ...
0
votes
0
answers
298
views
struts2.5.26 only file field is getting null on action class and rest fields are getting set
Recently I moved from struts2.3.35 to struts2.5.26 and along with this I moved to spring boot app from spring which was using external tomcat and now it's using embedded one.
So whenever I try to ...
0
votes
0
answers
649
views
Spring Boot & Embedded Tomcat - Problems with ClassLoader?
i have a rest service project using Spring Boot with embedded Tomcat. But when i start the project (with IntelliJ/Eclipse) i got an error thrown by external library saying "Can not assign an ...
0
votes
1
answer
364
views
Internal Magic of a multipart file upload Springboot
I have spend lots of time to understand the internal working of a multipart file upload in spring boot.
Couldn't get a clear picture on it.
Bit confused about the role of spring boot tmp directory.
I ...
0
votes
1
answer
712
views
How to enable tomcat servlet metrics in Spring Boot 2.1.3
I'm trying to monitor actuator metrics in Spring Boot 2.1.3 with embedded tomcat, but the metrics do not include the tomcat.servlet.* and tomcat.cache.* metrics.
Currently available metrics are below
{...
0
votes
1
answer
135
views
Are there security concerns with embedded Tomcat's Context.docBase?
When creating a org.apache.catalina.Context, you need to specify a "docBase" argument. docBase is supposed to be an existing directory. Context creation fails if it's not an existing, ...
1
vote
2
answers
266
views
how to use digest.sh in embedded-tomcat
I know that $CATALINE_HOME/bin/digest.sh is used to generate hashed passwords which can be used in tomcat_users.xml but how can I implement the same behavior where I am using embedded tomcat in the ...
3
votes
1
answer
1k
views
How to set context root path in spring boot embedded tomcat?
I want to add my own application name as the prefix. Example: http://localhost:8084/MyApp/some-url. But when I click on some link (href) it redirects me to http://localhost:8084/some-url.
Also I've ...
0
votes
1
answer
137
views
Get Angular working with Waffle Spring boot + Spring Security and embedded tomcat
I am using this example to find out more about waffle:
https://github.com/Waffle/waffle/tree/master/Source/JNA/waffle-demo/waffle-spring-boot-filter2
I am happy because everything works nice in this ...
1
vote
1
answer
953
views
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter cannot be cast to javax.servlet.Filter in Struts 2 using embedded Tomcat
I have a Struts 2.5.5 web app. I want to run it with integrated Tomcat. I am using the below plugin
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId&...
0
votes
1
answer
790
views
Starting springboot application from IntelliJ community edition
How can we start a spring boot application in IntelliJ community edition. I don't see an embedded tomcat Included here. When I start the application from SpringBootApplication annotated class, getting ...
0
votes
0
answers
515
views
How to remove the default web application and remove unused connectors from Embeded Tomcat 9.0.41?
My project is using an Embedded Tomcat with the Java Springboot application, and the customer requires the Tomcat to comply with a hardening guideline for security purpose, which contains follows, for ...
0
votes
0
answers
676
views
Embedded Tomcat, how to replace existing web.xml meant for standard Tomcat with new logic for Embedded Tomcat
Given existing web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<display-name>/</display-name>
<listener><listener-class>m.Web.startup.Listener</...
0
votes
2
answers
2k
views
Getting exception ClientAbortException: java.io.IOException while download large zip file
I am trying to download large zip file from rest API but getting
org.apache.catalina.connector.ClientAbortException: java.io.IOException: connection reset by peer.
Because of connection closed - ...
1
vote
0
answers
300
views
Spring Boot: StackOverflowError HttpServletRequestWrapper getUserPrincipal
in our production log we got the following very long stack traces:
java.lang.StackOverflowError: null
at javax.servlet.http.HttpServletRequestWrapper.getUserPrincipal(HttpServletRequestWrapper....
1
vote
1
answer
1k
views
How to hide the embedded tomcat version when we have errors while using springboot with microservices?
As we have default tomcat in our springboot project, not able to set as in the below url.
https://www.inoks.com/hide-tomcat-version-from-the-error-message/
https://www.thegeekstuff.com/2013/08/hide-...
2
votes
0
answers
47
views
Different reactions from diffrent projects on same machine for calling same API -> SSLException
I have a single page web application(Spring MCV + JSF(primefaces) + tomca 8) that runs on a Development-server , it makes API call for getting data from providers (for example https://stream.xyz.com),
...
0
votes
1
answer
188
views
How to persist session when server restart?
I'm trying to implement tomcat embedded web server. Everything working good. But session is cleared when I restart.
I'm trying to implement correct session persistence configuration. But no success. ...
1
vote
0
answers
575
views
Spring Boot Embedded Tomcat Internal Working
I recently read an article regarding Tomcat architecture and a high level overview of its working and monitoring.
Key metrics for monitoring Tomcat - DataDog
In this article, it mentions Tomcat ...
-1
votes
1
answer
63
views
Make war with with embedded tomcat
I have recently created a web application using spring mvc, gradle and tomcat to host it. I have been trying to create a war file of the web application which can be executed on its own with no need ...
0
votes
1
answer
275
views
Tomcat unexpected maximum response time for a request when load testing is done using jmeter
I have a spring boot application which has a post endpoint which takes the request and send it to another service and get the response back and save it to mongo database and returned the response back ...
2
votes
0
answers
99
views
Enbedded Tomcat configuration in Spring boot
I was going through the tomcat configuration for embedded tomcat in spring boot doc, I was not able to get prestartminSpareThreads property for embedded tomcat. However this prestartminSpareThreads is ...
5
votes
1
answer
1k
views
SpringBoot - HttpMessageNotReadableException: JSON parse error: java.net.SocketTimeoutException
My code is throwing an exception as follows
JSON parse error: java.net.SocketTimeoutException; nested exception is com.fasterxml.jackson.databind.JsonMappingException: java.net....
5
votes
1
answer
673
views
Gradle excecution freezes for 3 mins for certain tasks
I have 2 relatively simple Gradle 6.1.1 configs, one is using https://plugins.gradle.org/plugin/com.github.node-gradle.node to build a react app, and the other one is based on https://plugins.gradle....
0
votes
1
answer
302
views
Mutual TLS with embedded Tomcat and Common Name (CN)
We run a REST service using embedded Tomcat. Our app requires Mutual TLS to authenticate and authorizes by extracts the CN from the client certificate and verifies the permissions in a set of ...
1
vote
0
answers
54
views
Get NoInitialContext Spring Boot 2.0.x Embedded Tomcat Resource and DataSource Configuration Using JavaConfig
Following other links I have tried all configurations including enabling jndi of embedded tomcat container. (A very good detailed like is: https://www.roytuts.com/spring-boot-jndi-datasource/) But the ...
7
votes
2
answers
14k
views
How to increase file size upload limit in spring boot using embedded tomcat
I am try to upload the file using my spring boot API. The function is working fine when I am using small file (less than 1 MB), but when I upload large file it gives me an exception. I am using ...
0
votes
2
answers
919
views
Exclude embedded server based on maven profile
I have two different profiles (dev and prod) defined in my pom.xml. I don't want to include an embedded server while building a project with a prod profile. I know even if I don't exclude embedded ...
9
votes
2
answers
9k
views
Why my Springboot with embbeded tomcat too slow when process first request?
Env.
OS:macOS Mojave Version 10.14.5(centOS have same problem)
Springboot:2.1.6.RELEASE(embedded tomcat 9.0.21),war
I am a new player of Spring Boot, which I think is helpful to build my project. Now ...
0
votes
1
answer
443
views
Timeouts are not correct for servlet in spring boot
This is remote server properties:
server.servlet.session.timeout=3m
SAme for my local.properties
also we have a config like this:
http
.sessionManagement()
....
0
votes
1
answer
2k
views
How to enable connection pooling in spring boot embedded tomcat
I have a spring boot application which is not a web application. In this application i have configured embedded tomcat with the help of following bean.
@Bean
public TomcatServletWebServerFactory ...