<pre class="lang:default decode:true">tomcat

allow access from

&lt;filter-name&gt;Remote Address Filter&lt;/filter-name&gt;
&lt;filter-name&gt;Remote Address Filter&lt;/filter-name&gt;

check if running
in win
netstat -an | find "8080"

error spring3

As M. Deinum mentioned, Tomcat 7 is using 3.0.x servet APIs. Spring Boot by default uses 3.1. To change it, Spring Boot understands these Maven properties if you are using older servlet and tomcat APIs:


endpoints.jmx.unique-names to true.
I was able to solve this by defining both:
name: my-app-name
default-domain: my-app-name

outof memory GermSize

edit tomcatPath/bin/
CATALINA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC"
Update This answer is relevant for Java 5-7, Java 8 has this fixed:,-permanent-generation-and-metaspace Kudos go to mt.uulu

For Java 5-7:

The standard Oracle/Sun VM look on the world is: Classes are forever. So once loaded, they stay in memory even if no one cares anymore. This usually is no problem since you don't have that many purely "setup" classes (= used once for setup and then never again). So even if they take up 1MB, who cares.

But lately, we have languages like Groovy, that define classes at runtime. Every time you run a script, one (or more) new classes are created and they stay in PermGen forever. If you're running a server, that means you have a memory leak.

If you enable CMSClassUnloadingEnabled the GC will sweep PermGen, too, and remove classes which are no longer used.

[EDIT] You will also have to enable UseConcMarkSweepGC (thanks to Sam Hasler). See this answer:
Increase Tomcat memory settings [duplicate]
try setting this

CATALINA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8
-server -Xms1536m -Xmx1536m
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m
-XX:MaxPermSize=256m -XX:+DisableExplicitGC"
in {$tomcat-folder}\bin\ (create it if necessary).

See for more details.

Configure tomcat memory usage
tomcatPath/bin/ export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx2048m -XX:PermSize=265m -XX:MaxPermSize=1024m" -Xms: This the initial java heap size. -Xmx: This is the maximum java heap size. The heap is the memory space which holds all the objects created by your application, it is the memory space allocated for your application, normally an application wouldn’t require more than maximum 2 GB of memory. In case of low heap space, “OutOfMemoryError: java heap space” exception is thrown. -XX:PermSize: This is the initial perm gen size. -XX: MaxPermSize: This is the maximum perm gen size. The perm gen size is the space where your code base is stored inside the memory , the bigger your code base is, the more perm gen space is required, normally application wouldn’t require more than maximum 1 GB of Perm gen space. In case of low perm gen space, “OutOfMemoryError: PermGen” exception is thrown. CATALINA_OPTS vs JAVA_OPTS - What is the difference? There are two environment variables - CATALINA_OPTS and JAVA_OPTS - which are both used in the startup and shutdown script for Tomcat. They are described in comments within that file as: [JAVA_OPTS]: (optional) Java runtime options used when the "start", "stop" or "run" command is executed and [CATALINA_OPTS]: (optional) Java runtime options used when the "start" or "run" command is executed So why are there two different variables? And what's the difference? Firstly, anything specified in EITHER variable is passed, identically, to the command that starts up Tomcat - the "start" or "run" command - but only values set in JAVA_OPTS are passed to the "stop" command. That probably doesn't make any difference to how Tomcat runs in practise as it only effects the end of a run, not the start. The second difference is more subtle. Other applications may also use JAVA_OPTS, but only Tomcat will use CATALINA_OPTS. So if you're setting environment variables for use only by Tomcat, you'll be best advised to use CATALINA_OPTS, whereas if you're setting environment variables to be used by other java applications as well, such as by JBoss, you should put your settings in JAVA_OPTS. Source: CATALINA_OPTS v JAVA_OPTS - What is the difference? Remote Debug export CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n" sh ./ start timeout web.xml &lt;!-- ==================== Default Session Configuration ================= --&gt; &lt;!-- You can set the default session timeout (in minutes) for all newly --&gt; &lt;!-- created sessions by modifying the value below. --&gt; &lt;session-config&gt; &lt;!--&lt;session-timeout&gt;1&lt;/session-timeout&gt;--&gt; &lt;session-timeout&gt;60&lt;/session-timeout&gt; &lt;/session-config&gt; server version cd tomcat/lib java -cp catalina.jar org.apache.catalina.util.ServerInfo if you can upload a JSP file you may print out some info like in this example: Save this code into a file called tomcat_version.jsp: Tomcat Version : &lt;%= application.getServerInfo() %&gt;&lt;br&gt; Servlet Specification Version : &lt;%= application.getMajorVersion() %&gt;.&lt;%= application.getMinorVersion() %&gt; &lt;br&gt; JSP version : &lt;%=JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %&gt;&lt;br&gt; When you access,, the output should look similar to: Tomcat Version : Apache Tomcat/5.5.25 Servlet Specification Version : 2.4 JSP version: 2.0 param java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize|PermSize|ThreadStackSize' ' [/kbd] </pre>



邮箱地址不会被公开。 必填项已用*标注