使用eclipse创建一个简单的web项目

新建项目

 

 

填下项目名称之后点击 next, 

 

 

继续点击next

 

 

 

可以修改文件名称

 

新建 .jsp 文件

 

 

 

启动运行

 

 

 

 

 

 

如果报错

The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.

 则设置的tomcat端口有问题, 先查看tomcat配置,点击 window-preferences

 

 

 

 在这里进行添加和修改 tomcat 配置

 

 

 指定tomcat 和 jre

点击 window-show view,  选择other  添加services

双击 tomcat,

 

 

 在这里设置端口号, 填完之后保存(启动的时候, 使用的是 http/1.1 配置的端口)

 

 

 

 

 

 

 

 

 

 

 

 

posted @ 2022-05-09 22:18  工具人的自觉  阅读(207)  评论(0编辑  收藏  举报