New--> Project --> Web --> Dynamic Web Project
1.填写JavaWeb程序名称
2.选择Targetruntime(目标环境)
3.配置tomcat服务器及路径
4.JRE运行环境,选择自己下载的JDK版本
也可先在整体环境下先设置运行环境:
windows--> preferences --> Server --> Runtime Environments
-->Add --> 添加相应的Tomcat版本
创建首页:
右键点击"WebContent" --> New --> JSP file --> 命名为 index.jsp
运行该程序:
1.右键项目名 --> 选择“Run As” --> "On Server" --> “Finish”