1、server/service/engine/host/context} setting property 'source' to 'org.eclips.......
双击tomcat,修改服务器配置,勾选Publish module contexts to separate XML files保存
2、There is no Action mapped for namespace / and action name
问题原因:struts.xml中有错误字段,比如某个关键字写错了,或是各属性值与其关联文件的指定值不同
此次错点:action 的name 写错了。
3、The requested resource is not available.
Exception starting filter struts2
Class: com.opensymphony.xwork2.spring.SpringObjectFactory
File: SpringObjectFactory.java
Method: getClassInstance
解决方案:删除lib下的struts2-spring-plugin-2.3.14 参照网上例子还有且并未验证struts2-plexus-plugin-2.0.11.jar,struts-sitegraph-plugin-2.0.11.jar
2015.7.3更新:此错误当只用struts2时可删去这个文件,但是当做ssh2整合时绝对不可删,纠结一上午终于找到了问题所在:jar包的问题。jar包导入过多了
4、控制台显示内容:
log4j:WARN No appenders could be found for logger (com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory).
log4j:WARN Please initialize the log4j system properly.未解决
5、点击事件后,数据流经过action并正确返回到预期的jsp,但取值失败
原因:预期的jsp页面中取元素值<s:property value=" xxxx">value没有写成与action中定义的预取字段值。
如action中定义了 message,并给予了值,而jsp中value!=“message”