在startup.bat中,把原来 call "%EXECUTABLE%" start %CMD_LINE_ARGS% 替换成 call "%EXECUTABLE%" run %CMD_LINE_ARGS%  > D:\Tomcat\logs\console.log 副作用是:    1.控制台看不到了    2.catalina.bat和startup.bat在同一个DOS窗口中运行

maxPostSize in Tomcat and in JBOSS

If a http post exceeds the size the ‘maxPostSize’,    Tomcat will thrown an "post too large" exception and return HTTP 500.    But JBoss will just discard the posted values and go on.


<Connector>标签下: acceptCount The maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. The default value is 10.     建议:Don’t set too high, this sets the number of pending requests awaiting processing.  In my opinion it is better …

tomcat-sever.xml中跟性能有关的配置 Read More »


在catalina.bat中加上红色那行 set _EXECJAVA=%_RUNJAVA% set MAINCLASS=org.apache.catalina.startup.Bootstrap set ACTION=start set SECURITY_POLICY_FILE= set DEBUG_OPTS= set JPDA= set JAVA_OPTS= -Xms512M -Xmx1024M ===JSP中查看当前的内存使用状况= Runtime lRuntime = Runtime.getRuntime(); out.println("*** BEGIN MEMORY STATISTICS ***"); out.println("Free  Memory: "+lRuntime.freeMemory()/1024/1024+"M"); out.println("Max   Memory: "+lRuntime.maxMemory()/1024/1024+"M"); out.println("Total Memory: "+lRuntime.totalMemory()/1024/1024+"M"); out.println("Available Processors : "+lRuntime.availableProcessors()+""); out.println("*** END MEMORY STATISTICS ***");