tomcat8

how to limit post size in tomcat 8? How to make a custom reply for it?

老子叫甜甜 提交于 2019-12-31 02:49:35
问题 I have this configured in my server.xml file <Connector URIEncoding="UTF-8" connectionTimeout="20000" maxHttpHeaderSize="65536" **maxPostSize="1024"** port="8080" protocol="HTTP/1.1" redirectPort="8443"/> However, requests more than 1 KB pass as if maxPostSize is never set. Can anyone suggest what can cause that? Another thing, I would like to know how to make a custom http reply from tomcat if the post size is more than 1 KB UPDATE Since I have been for so long in this issue. I had the

IntelliJ Tomcat Server plugin fails to auto-populate my empty external Tomcat `base` folder

独自空忆成欢 提交于 2019-12-30 11:53:25
问题 When I point the Tomcat and TomEE Integration plugin in IntelliJ Ultimate 2017.2 via menu item Run > Edit Configurations to a fresh download of Tomcat 8.5.16, my Vaadin 8.1 app runs successfully. Good. But when I optionally point the configuration’s Server > Application Server > Configure button > Tomcat base directory to an empty folder, I get a message: Cant find directory 'Users/basilbourque/apache-tomcat-base-dev/conf' ➠ Must I create this conf folder? In contrast to IntelliJ, when I

Access static property or method in JSP via EL 3.0 (JEE7; Tomcat 8)

旧城冷巷雨未停 提交于 2019-12-29 05:40:08
问题 I'm using tomcat 8.0.9 (servlet 3.1, jsp 2.3, el 3.0) and trying to access a static property from a jsp page like so: ${Boolean.TRUE} There is no error, but no output appears in the rendered result. What am I doing wrong? EDIT The answer to this question (marked as duplicate question) claims that since EL 3.0 (JSR-341, part of Java EE 7), it is possible to reference constants for all java.lang.* classes as they are implicitly imported and available like so ${Boolean.TRUE} This answer is NOT

Why does my Tomcat only open 8 JDBC connections

久未见 提交于 2019-12-29 01:17:09
问题 When setting up the database connections in Tomcat 8, for some reason Tomcat is not following what I configured in the context.xml, with as result that I run out of connections, leading to resource contentions at the application server side (BLOCKED/WAITING threads). I always have 8 connections (show processlist in mariadb/mysql) after the pool initializes. My configuration states a minimum of 10 connections and a maximum of 100 connections. I tested different configurations, but this does

More than one fragment with the name [spring_web] was found. This is not legal with relative ordering

自作多情 提交于 2019-12-27 15:42:08
问题 I have a spring boot application that works fine when I run it using the embedded server from Intellj. However, when I package it into .war file and deploy it on tomcat I get the following error: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/file-upload-0.0.1-SNAPSHOT]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) at org.apache.catalina.core.ContainerBase.addChildInternal

More than one fragment with the name [spring_web] was found. This is not legal with relative ordering

烂漫一生 提交于 2019-12-27 15:41:29
问题 I have a spring boot application that works fine when I run it using the embedded server from Intellj. However, when I package it into .war file and deploy it on tomcat I get the following error: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/file-upload-0.0.1-SNAPSHOT]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) at org.apache.catalina.core.ContainerBase.addChildInternal

Using locations outside of tomcat folder to store and access Image files within Tomcat 8 - GNU Linux OS

断了今生、忘了曾经 提交于 2019-12-25 17:45:08
问题 I am running a webpage + some ws in Tomcat that is running on a GNU Linux OS. The page will display images after a search on the images, the actual images are located within a folder within the webapp/appname folder. Recently the free space within the system has gone short so I asked the sys admin for more space and in response they added a new NetApp volume and mounted it in /data folder. This is outside of the Tomcat folder and I am having difficulty accessing it. Looking around I found

Severe exception on servlet with java.lang.NoClassDefFoundError

我的梦境 提交于 2019-12-25 09:03:41
问题 I get this exception on my tomcat8 running on this java version OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13) SEVERE [http-nio-80-exec-9] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [restSdkService] in context with path [/RestService] threw exception [java.lang.NoClassDefFoundError: Could not initialize class com.example.bean.SomeBean] with root cause java.lang.NoClassDefFoundError: Could not initialize class com.example

SSL certificates in tomcat server

廉价感情. 提交于 2019-12-25 08:50:05
问题 I have developed a Rest service and deployed it in tomcat 8 server. It is working fine with http URL. I have a requirement to install SSL certificate for the server. But there is already a service running on this server which has SSL certificate. Now my questions are 1) do I need to install another SSL certificate for the same server ? 2) How do i find that previously installed certificate belongs to server or service ? 3) if I install new SSL certificate what configuration changes are to be

Tomcat Realm: Not able to set realm for my web application

*爱你&永不变心* 提交于 2019-12-25 08:13:25
问题 I am trying to set Tomcat JDBC Realm for my Testing web application. I am following the standard documentation, https://tomcat.apache.org/tomcat-8.0-doc/realm-howto.html#JDBCRealm. My server.xml is as following: <Server port="8005" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />