Eclipse Run On Server 异常:could not load the Tomcat Server configuration at Servers\tomcat V5.0 Ser



Run On Server 异常:could not load the Tomcat Server configuration at Servers\tomcat V5.0 Ser.

在Eclipse中运行web工程时,总是出现 couldnotloadtheTomcatServerconfigurationat Servers\tomcat V5.0Server@localhost-config  
这个错误提示,tomcat的配置冲突,无论如何修改server.xml都不行,最后索性将tomcat卸载,然后再重新安装tomcat后成功,不再出现错误提示
 
还有就是上面这个问题解决了之后,又冒出另外一个问题:No launchable artifact could be found in the selection
这真是有点傻眼了,前面的工程可以运行,为什么另外的一个工程就没法运行了,看来是后面这个工程的配置问题。最后尝试修改工程的配置
都无效,最后选择工程properties->server 发现 提示信息:this project cannot be deployed to a server
最后没有办法,将工程删除,不删除内容。然后从新新建一个Dynamic Web Project ,然后建好空的框架之后,将原来的源代码以及WebContent
目录里面的内容全部复制到新工程里面,最后选择Run on Server ,弹出配置新Server ,OK.总算可以run on Server 了。
 

No launchable artifact could be found in the selection

可以参考一下方法:
1:重启Eclipse
2:关闭Eclipse,删除工作空间的。metadata整个文件夹,然后重新导入工程
3:切换到J2EE视图,然后删除Server并重启Eclipse。
4:(来自IBM)If you are developing an EJB jar and you select the Run, Run on server option from its context menu, you will see a pop-up error message that reports No launchable artifact could be found in the selection.

To avoid this problem, deploy your EJB jar by changing to the Server view, right clicking on the server to display the context menu, and selecting the Add/remove project action. Then add the EJB project to your server.

5:删除工程,仅保留源代码,然后新建Dynamic Web Project ,将工程的目录设置为原来工程目录,然后建好之后,将Jsp,js,WEB-INF,META-INF等页面或配置信息导入到WebConten目录,将源代码导入到src目录,同时配置工程源代码和库。编译没有问题即可OK