1. eclispe内tomcat的内存配置
Tomcat 启动 Error : Caused by: java.lang.OutOfMemoryError: PermGen space
1.1.点击eclipse上的debug图标旁边的下拉箭头
1.2.然后选择Run Configurations,
1.3.系统弹出设置tomcat配置页面,在Argument中末尾添加参数中的VM arguments中追加:
-Xms256M -Xmx512M -XX:PermSize=256m -XX:MaxPermSize=512m
2.tomcat运行对个web项目,报错
严重: Exception sending context initialized event to listener instance of class org.springframework.web.util.Log4jConfigListener
java.lang.IllegalStateException: Web app root system property already set to different value: 'webapp.root' = [G:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\ford-vdm-web\] instead of [G:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\ford-leads-web\] - Choose unique values for the 'webAppRootKey' context-param in your web.xml files!
解决方法:因为tomcat启用多个web项目时,要为每个web项目定于webAppRootKey
web项目的web.xml文件添加:
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>leads</param-value>
</context-param>