情况是这样的,在开发环境上所有程序没有异常
然后部署到linux服务器上后,某些跳转action开始跳黄页,错误页面(非500)你懂的
Log中错误异常如下(太长了,删剪版)
10-10-15 15:00:45 ERROR dispatcher.Dispatcher(Line:512) [http-9999-4] - Could not find action or result
No result defined for action com.b2b2c.arro.action.LoginAction and result - action - file:/home/appadmin/B2B2C/webapps/B2B2C/WEB-INF/classes/struts.xml:36:50
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:350)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
然后部署到linux服务器上后,某些跳转action开始跳黄页,错误页面(非500)你懂的
Log中错误异常如下(太长了,删剪版)
10-10-15 15:00:45 ERROR dispatcher.Dispatcher(Line:512) [http-9999-4] - Could not find action or result
No result defined for action com.b2b2c.arro.action.LoginAction and result - action - file:/home/appadmin/B2B2C/webapps/B2B2C/WEB-INF/classes/struts.xml:36:50
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:350)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
也就是说,没有一个对应视图去对应com.b2b2c.arro.action.LoginAction
你把你的struts2的配置文件发下吧。
检查下上struts.xml文件
贴出来看下
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.multipart.maxSize" value="1073741824"/>
<package name="B2B2C" extends="struts-default" namespace="">
</struts>namespace="/" 的时候黄页
现在namespace="" 原先黄页的好的,但是其他地方又出现黄页了
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.multipart.maxSize" value="1073741824"/>
<package name="B2B2C" extends="struts-default" namespace="">
</struts>namespace="\" 的时候黄页
现在namespace="" 原先黄页的好的,但是其他地方又出现黄页了
你看下你XML里面这个action com.b2b2c.arro.action.LoginAction的跳转配置。问题肯定在这里。
然后检查一下这个ACTION里面所有方法的RETURN是否和XML里面<param name="root">result</param> name="root"的值一致。
这个NAME是你自己的。我贴的是我的