public String intercept(ActionInvocation actionInvocation) throws Exception {
System.out.println("before");
actionInvocation.invoke();
System.out.println("after");
return "error";
}
这个自定义拦截器为什么不能返回error页面?struts.xml 有设置全局result
<global-results>
<result name="error">/pages/error.jsp</result>
</global-results>
public String intercept(ActionInvocation actionInvocation) throws Exception {
System.out.println("before");
return "error";
actionInvocation.invoke();
System.out.println("after");}
这样就可以成功返回error页面。
请问为什么?谢谢!
解决方案 »
- 查询结果拼接成字符串的问题
- 一个java源文件,如何通过JAVA代码,得到其所有的包,方法和类?谢谢!!!
- 目前有哪些大型企业或者网站用到struts2 spring 或者hibernate其中的一种或几种
- 利用hibernatedaosupport,如何实现多表连接查询?
- 外企外面的或者想进外企的请进
- 请问在哪了能下载到EJB容器的linux版本,并且如何安装
- hibernate使用连接池的问题
- showModalDialog打开的窗口中找不到dwr怎么回事?
- 同样的问题:resin中下载的word文件内容是乱码,怎么解决?!?!再给100分!
- 刚看EJB,不懂乱问.
- j2ee名词解释
- J2EE 新手问题
比如 调用下一个拦截器 或 执行下一个Action
就等于退出了你自己编写的这个interceptor了.
System.out.println("after");能打印出来,那又如何解释呢?