
SSH框架,struts2 拦截器的问题。
在struts2文件配置了<global-results><resultname="test">/notfound.jsp</result></global-result...
在struts2文件配置了
<global-results>
<result name="test">/notfound.jsp</result>
</global-results>
<global-exception-mappings>
<exception-mapping exception="java.lang.Exception" result="test"/>
</global-exception-mappings>
Action 中throws exception 。但是出现 了异常不会跳到notfound.jsp,而是在现在的页面提示了一堆错误信息。请问该怎么解决。3Q 展开
<global-results>
<result name="test">/notfound.jsp</result>
</global-results>
<global-exception-mappings>
<exception-mapping exception="java.lang.Exception" result="test"/>
</global-exception-mappings>
Action 中throws exception 。但是出现 了异常不会跳到notfound.jsp,而是在现在的页面提示了一堆错误信息。请问该怎么解决。3Q 展开
2个回答
展开全部
把type加上试试,
<result name="test" type="redirect">/notfound.jsp</result>
另外把异常拦截器先配置到那个action下面 单独试试。
<result name="test" type="redirect">/notfound.jsp</result>
另外把异常拦截器先配置到那个action下面 单独试试。

2023-07-25 广告
StormProxies是一家可靠的代理服务提供商,提供原生IP(住宅原生IP)和高匿名代理服务。以下是关于StormProxies的原生IP服务的一些信息:1. 住宅原生IP:StormProxies提供的住宅原生IP是指从真实的家庭或企...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询