1.无法通过外部浏览器访问url
工具/选项/常规:web浏览器下设置默认的浏览器
2.java.lang.OutOfMemoryError: PermGen space
堆内存溢出,解决方法:
在tomcat_home/bin/catalina.bat ,加上下面一行:
set JAVA_OPTS= -Xms1024M -Xmx1024M -XX:PermSize=256M -XX:MaxNewSize=256M -XX:MaxPermSize=256M
解释一下各个参数:
-Xms1024M:初始化堆内存大小
-Xmx1029M:最大堆内存大小
-XX:PermSize=256M:初始化类加载内存池大小
-XX:MaxPermSize=256M:最大类加载内存池大小
-XX:MaxNewSize=256M:暂时不清楚啥意思
3.通配符的匹配很全面, 但无法找到元素 'context:component-scan' 的声明
applicationContext.xml的头改为以下内容:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
4.java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
需要导入spring-web.jar
5.java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
需要将mysql-connector-java-5.1.7-bin.jar放入tomcat/lib目录下