问题:tomcat:run启动项目后访问Servlet报错
后台报错信息:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 1 in the generated java file
The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files
页面报错信息:
解决方案:在pom.xml中添加tomcat插件
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<port>8888</port>
</configuration>
</plugin>
</plugins>
用tomcat7:run启动后正常访问。