myeclipse不能使用默认编辑器打开导入的struts项目的struts-config.xml,Therefore the MyEclipse Struts Editor may not be u

当将Eclipse中的Struts1项目导入到MyEclipse2014后,struts-config.xml文件无法用默认的MyEclipse Struts Editor打开,出现错误提示。为解决此问题,可以尝试临时解决方案,通过右键选择使用MyEclipse XML Editor打开,但这无法使用图形化界面。更好的办法是通过MyEclipse的Project Facets安装Apache Struts 1.x Facet,选择对应版本和服务器。在遇到“Servlet named action already exists.”错误时,需要暂时重命名web.xml,重新安装Struts Facet,之后恢复web.xml并用MyEclipse的Struts Config Editor打开struts-config.xml,即可正常使用编辑器。
摘要由CSDN通过智能技术生成

将eclipse中的struts1项目的导入到myeclipse2014后发现struts-config.xml不能用默认的编辑器打开,报错如下:

Project Struts1Test is not configured as a MyEclipse Web-Struts Project. Therefore the MyEclipse Struts Editor may not be used with struts-config.xml. The default XML Editor has been used to open the file instead.

解决方法如下:

方法1. 临时解决,在struts-config.xml上右键----->选择openwith----->选择 myeclipse XML Editor。这样就没法使用图形化的界面了。

方法2.项目上右键,选择MyEclipse--->选择Project Facets [Capabilities] ----->选择Install Apache Struts(1.x) Facet


 弹出窗口选择对应的struts版本和服务器,我这选择的1.2,如果没有服务器环境可以新建一个。


这个时候会提示:" Servlet named action already exists." ,这个地方是说明你的web.xml中已经有了对应的action配置了


接下来是最关键的地方了,先将web.xml改名为web.xml.bak,再重复上面Install Apache Struts(1.x) Facet的步骤,你会发现这次没有提示错误,直接点击finish

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值