eclipse 中怎么配置tomcat

  1. 点击 window–>preferences–>Server–>Server Runime Environments -->add–选择你所需要的Apache目录下的tomcat
    注意这里面会需要选择你系统中的tomcat目录,如果你其他的软件中配置过tomcat,你可以直接选择那个目录,这里的tomcat版本需要和你的tomcat目录的版本要一致,下面是我的tomcat版本和tomcat文件夹在文

在这里插入图片描述
2:添加tomcat版本之后,需要配置tomcat
右键点击项目,build path–>configure build path–>Add Library–>Server Runtime -->选择你已添加的tomcat版本点击finish
注意一般到这里是已经添加好了的,但是如果的你项目中的文件还是报错则需要还进行一步操作,
右键点击项目,build path–>configure build path–>Order and Export–>勾选你的项目名–>点击apply
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_45760909/article/details/106622566