永发信息网

Struts2配置文件

答案:2  悬赏:70  手机版
解决时间 2021-03-13 01:52
  • 提问者网友:酱爆肉
  • 2021-03-12 12:36
严重: Dispatcher initialization failed
Unable to load configuration. - action - file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/Struts_2/WEB-INF/classes/example.xml:22:73

Caused by: Error building results for action LoginAction_* in namespace / - action - file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/Struts_2/WEB-INF/classes/example.xml:22:73
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:367)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:468)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:264)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 31 more
Caused by: There is no result type defined for type 'redirect-action' mapped with name 'success'. Did you mean 'redirectAction'? - result - file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/Struts_2/WEB-INF/classes/example.xml:24:50
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:621)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
... 36 more

struts.xml



/main.jsp
/login.jsp



/userList.jsp
crud!list
/userForm.jsp




最佳答案
  • 五星知识达人网友:一叶十三刺
  • 2021-03-12 13:17
result type="redirect-action" 改成result type="redirect"
全部回答
  • 1楼网友:天凉才是好个秋
  • 2021-03-12 14:54
lz是新手,struts2 return null时是不会去执行配置文件的的,出来当然没有数据。多看看基础的东西吧
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯