您的位置:首页 > 移动开发 > WebAPP

maven新建 webapp项目后JSP文件报错怎样chul

2017-09-22 23:58 330 查看


在pom.xml配置文件中添加上javax.servlet的相关依赖:

  <dependencies>
  
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    
   <dependency>

     <groupId>javax.servlet</groupId>

     <artifactId>servlet-api</artifactId>

     <version>2.5</version>

     <scope>provided</scope>

  </dependency>
    
  </dependencies>


依赖tomcat类库:

项目右击—>build path —> configure build path — >libraries — > add libraries —> Server Runtime — >选择tomcat —> ok


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: