struts2异常处理:struts2请求处理过程整理总结

在处理使用ModelDriven接口过程中直简单以为FilterDispatcher处理是:请求--Dispatcher-------action--erceptor--Dispatcher返回用户请求界面但是实际上并不是这样

这个过程就是在我自定义erceptor时发现

具体处理流程应该是:

请求-----------dispatcher----------DefaultInvocation(这步就算是上面指Interceptor)---------Interceptors(run as the order they applyed)---------------action---------dispatcher---------result(This is an Result object and there is not some PreListener object ,this result Object will doExecute before the Interceptor object)-----------Interceptor----------DefaultInvocation

This is really a great process for running order!!!!!!!!

最大问题是在这个过程中对valueStack处理是影响非常大ValueStack并不是简单作为个传递数据工具处理页面标签过程可以从ValueStack和ActioncontextMap两个地方进行查找!!

其实jsp页面struts2标签对象主要还是从ValueStack中进行后台数据抽取只不过查询时是先查找这个指定名称是否存在不存在就查找是否在ValueStack保存对象中!
Tags:  struts2教程 struts2标签 struts2 struts2异常处理

延伸阅读

最新评论

发表评论