1
回答
jfinal jsp视图问题
注册华为云得mate10,2.9折抢先购!>>>   

后台报错 

java.lang.ClassNotFoundException: javax.servlet.HttpConstraintElement

pom.xml文件如下 请问还缺失什么包呢

@12叔 @JFinal   

<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");
	}




举报
凌云水
发帖于4年前 1回/646阅
顶部