Tomcat
关于tomcat的安装这里不再赘述,每次在调试新的程序的时候,请先去对应的安装目录下,开启服务:

新建工程
选择Maven类型:

点击finish:

输入对应的名字,点击next:

输入路径和工程名字,然后点击finish,生成对应的工程,如图所示:

然后发现,其实在工程下,并没有web文件夹。我们需要右键点击工程,增加新的支持:

选择JavaWeb类型:

点击确定,这是再看工程下,已经有了Web文件夹:

点开index.jsp,随便做一些修改:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>$Title$</title>
</head>
<body>
<h2>dddddd</h2>
</body>
</html>
然后配置Tomcat:

点击进入配置界面:

如上图所示,选择Local:

然后点击Deployment标签:

然后点击运行:

如上图所示,8887是端口,hello是刚才在Deployment标签下输入的对应页面地址。
网友评论