通过手动加入Struts包来开发J2EE工程,可是结果却发现不能使用Struts的默认编辑器来打开Struts配置文件,双击打开Struts配置文件时,就出错:
Unable to create this part due to an internal error. Reason for the failure: Project fuNan_Demo is not configured as a MyEclipse Web-Struts Project. Therefore the MyEclipse Struts Editor may not be used with struts-action.xml. The default XML Editor has been used to open the file instead.
解决方案:
在在项目下的.project文件里少了一行代码<nature>com.genuitec.eclipse.cross.easystruts.eclipse.easystrutsnature</nature>,把这个加上去,刷新,搞定
一般情况
在新建工程之后,右键单击工程,选择MyEclipse-> add Struts capabilities。根据提示将struts组建添加到工程里,再把原工程导入进来。新的工程没有添加Struts能力