eclipse 中的run on server 问题

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了eclipse 中的run on server 问题相关的知识,希望对你有一定的参考价值。

我编写了一个jsp文件,右键run on server以后弹出:No launchable artifact could be found in the selection
应该怎么解决?
回复一楼:我工作空间没有.metadata这个文件夹,删除工程重新导入我也试过,结果还是一样(PS:你给的答案我之前就看过,没办法了才来提问的)
回复二楼:那三点都确认,没问题

可以参考以下方法:
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
参考技术A 确认一下几点
eclipse是否Eclipse JEE ide(手动安装wtp插件也可以)
是否创建了dynamic web project,普通java project是不会发布到服务器上的。
是否配置tomcat服务器

在项目上右击,选择properties,选择target runtime,看看是否有tomcat runtime 没有则new一个

eclipse鍑虹幇 the selection cannot be run on any server 瑙e喅鍔炴硶

鏍囩锛?a href='http://www.mamicode.com/so/1/ips' title='ips'>ips   tomcat   lips   mon   鍑虹幇   tin   ann   http   space   

鏈変竴娆℃垜瀵煎叆浜嗕竴涓猼omcat鏄?.0鐗堟湰鐨勬枃浠讹紙鎴戠殑eclipse鐢ㄧ殑鏄?.5鐗堟湰鐨勶級锛屾敼浜唈ar鍖呭悗杩樻槸鍙戠幇浼氬嚭鐜?/p>

the selection cannot be run on any server,

鍚庢潵鎴戝氨鎵惧埌鎴戠殑eclipse锛?/p>

D:eclipseworkspace-jee椤圭洰鍚嶇О.settingsorg.eclipse.wst.common.project.facet.core.xml杩欎釜閰嶇疆鏂囦欢锛屾妸<runtime name="Apache Tomcat v9.0" />鏀逛负8.5灏卞彲浠ョ敤浜嗐€?br />濡傛灉杩樺嚭鐜颁簡

Server Tomcat v9.0 Server at localhost failed to start.

閭e氨鎶?lt;installed facet="jst.web" version="2.5" />鐨剉ersion鏀逛负璺熶綘鐨別clipse鐗堟湰涓€鑷达紝鍋囧鐗堟湰鏄?/p>

 

3.1鐨勯偅灏辨敼涓?.1


鍘熸枃閾炬帴锛?a href="https://blog.csdn.net/weixin_42019223/article/details/80770181" target="_blank">https://blog.csdn.net/weixin_42019223/article/details/80770181

以上是关于eclipse 中的run on server 问题的主要内容,如果未能解决你的问题,请参考以下文章

eclipse中boot项目run as ——> run on server时遇到的问题

eclipse 中web文件,run on server 与先add到tomcat再start 有

eclipse web run on server 404

eclipse j2ee项目run on server总没有,怎么办?

svn check下来的代码在eclipse中没有run on server

eclipse的run as里面没有run on server