想通过拦截器的后处理改变页面的显示结果 ,发现行不通.
看看以下的调用栈就知道:
at com.opensymphony.webwork.ServletActionContext.getServletContext(ServletActionContext.java:105)
at com.opensymphony.webwork.views.freemarker.FreemarkerResult.getConfiguration(FreemarkerResult.java:96)
at com.opensymphony.webwork.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:67)
at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:109)
at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:258)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:182)
at moxtv.central.web.interceptor.SearchInterceptor.intercept(SearchInterceptor.java:60)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:164)
at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116)
at moxtv.central.ActionTest.testSearchAction(ActionTest.java:25)
当action执行完,页面已经渲染了,通过后处理改变action的属性值或者改变 值栈的值都是徒劳!
看看以下的调用栈就知道:
at com.opensymphony.webwork.ServletActionContext.getServletContext(ServletActionContext.java:105)
at com.opensymphony.webwork.views.freemarker.FreemarkerResult.getConfiguration(FreemarkerResult.java:96)
at com.opensymphony.webwork.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:67)
at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:109)
at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:258)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:182)
at moxtv.central.web.interceptor.SearchInterceptor.intercept(SearchInterceptor.java:60)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:164)
at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116)
at moxtv.central.ActionTest.testSearchAction(ActionTest.java:25)
当action执行完,页面已经渲染了,通过后处理改变action的属性值或者改变 值栈的值都是徒劳!