javaweb项目
项目步骤
先创建maven的工程
1.导包
java蓝色包和resource资源的包
2.在web.xml中修改新版文件
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0"
metadata-complete="true">
</web-app>
3.pome中删除只剩下
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
<name>javaweb-session-cookie</name>
<groupId>org.example</groupId>
<artifactId>javaweb-session-cookie</artifactId>
<version>1.0-SNAPSHOT</version>
4.pome中导包
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
全部的包
servlet包
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
jsp包
<! --JSP依赖-->
<dependency>
<groupId>javax.servlet.jsp</groupid>
<groupId>javax.servlet.jsp-api</gropid> <version>2.3.3</version>
</dependency>
jstl包
<!-~jstl表达式的依赖->
<dependency>
<groupId>javax.servlet.jsp.jstl</ groupId>
<artifactId>jstl-api</artifactId>
<version>1.2</version>
</dependency>
standard包
<!-标准标签库->
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
连接数据库包
<!-连接数姻库-->
<dependency>
<groupId>mysql</groupId>
<groupId>mysq1-connector-java</groupId>
<version>5.1.47</version>
</ dependency>