1. 首先安装好了tom猫(eclipse插件)。
以及windows->preference->server选项要存在(支持WTP(web-tool-package)web开发工具包)
2. 相关配置如下
2.1 window->preference
2.2 server->Runtime Environment
如果右侧没有apachtomcat7.x ,则add.(可以添加已经下载好的软件包,也可以在线安装软件包).
2.3 Tomcat
选择你的apach tomcat的版本,以及context files的配置路径。(我的apache 安装在sofeware/apache/ 下面)。
3. 选择自己的工程项目 我的工程项目(webMonitor) 右键选择 Properties.
3.1 Java Build Path (这个比较关键)
有个Default output folder 修改为class文件所在的目录!!
3.2 tomcat选项
一般都默认配置好了。
3.3 server选项和project facets选项
遇到的问题:
. 启动tomcat出现关于applicationContext.xmlcannot be opened because it does not exist.
解决方案:class的路径配置没有修改,即3.1中标红色的部分!