step1.创建Java web项目
step2.在web/WEB-INF下新建classes和lib目录(New—>Directory)
step3. File->Project Structure->Modules->Paths,修改Output path和Test output path为classes的路径
step4.再点旁边的Dependencies->点击"+"号->选择1 JARs or directories -> 选择lib文件->选择“jar Directory”
step5.Run->选择Edit Configurations->Deployment
step6.index.jsp和web.xml
index.jsp:
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h2>Hello World!</h2>
</body>
</html>
web.xml可以添加:
<welcome-file-list>
<welcome-file>aaa.jsp</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>