后台报错
java.lang.ClassNotFoundException: javax.servlet.HttpConstraintElement
pom.xml文件如下 请问还缺失什么包呢
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.test.base</groupId> <artifactId>base_demo</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <dependencies> <dependency> <groupId>com.jfinal</groupId> <artifactId>jfinal</artifactId> <version>1.6</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.jfinal</groupId> <artifactId>jetty-server</artifactId> <version>8.1.8</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.jfinal</groupId> <artifactId>cos</artifactId> <version>26Dec2008</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.7</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.eclipse.jetty.orbit</groupId> <artifactId>org.apache.taglibs.standard.glassfish</artifactId> <version>1.2.0.v201112081803</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.eclipse.jetty.orbit</groupId> <artifactId>javax.servlet.jsp.jstl</artifactId> <version>1.2.0.v201105211821</version> <scope>provided</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.9</version> </dependency> <dependency> <groupId>c3p0</groupId> <artifactId>c3p0</artifactId> <version>0.9.1.2</version> <scope>provided</scope> </dependency> </dependencies> </project>
public void configConstant(Constants me) { // TODO Auto-generated method stub me.setDevMode(true); me.setBaseViewPath("/jsp"); me.setViewType(ViewType.JSP); }
JFinal.start("src/main/webapp", 8081, "/", 5);
public void login(){ System.out.println("login"); renderJsp("index.jsp"); }
servlet-api
回复 @红色是酒:哦,我没看到,那pom就没错。这个类就是servlet-api里的。你是怎么运行的,用什么IDE。是用插件运行的,还是用war包方式。上面有引入2.5的你具体指的是什么呢版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。