Chinaunix首页 | 论坛 | 博客
  • 博客访问: 382340
  • 博文数量: 80
  • 博客积分: 2682
  • 博客等级: 少校
  • 技术积分: 907
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-16 09:55
文章分类

全部博文(80)

文章存档

2012年(80)

分类: 系统运维

2012-06-17 11:32:07

通过手动加入Struts包来开发J2EE工程,可是结果却发现不能使用Struts的默认编辑器来打开Struts配置文件,双击打开Struts配置文件时,就出错

org.eclipse.ui.PartInitException: Project newsjq 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.
at com.genuitec.eclipse.struts.editor.multipage.StrutsConfigEditor.init(StrutsConfigEditor.java:475)


修改办法,如下:

解决办法一:,在项目下的.project文件里添加一行代码com.genuitec.eclipse.cross.easystruts.eclipse.easystrutsnature,结果如下


......

......
com.genuitec.eclipse.cross.easystruts.eclipse.easystrutsnature


刷新工程就可以正常打开了

解决办法二:
右键单击工程,选择MyEclipse-> add Struts capabilities


Unable to access Struts Flow View due to XML and Struts validation errors
detected in source. Please make corrections and try again.

在网上查的很多人说是MyEclipse的Bug

也有人说是“出现这种情况可能是你的struts-config.xml里有重名了,比如说form-bean 的name重复了,还有action里的path重复了"

仔细检查了一下。确实是action重复了。删除后,问题解决




阅读(1631) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~