struts的PrepareOperations

PrepareOperations在StrutsPrepareAndExecuteFilter有用到

其中一个是得到ActionMapping

public ActionMapping findActionMapping(HttpServletRequest request, HttpServletResponse response, boolean forceLookup) {ActionMapping mapping = (ActionMapping) request.getAttribute(STRUTS_ACTION_MAPPING_KEY);if (mapping == null || forceLookup) {try {mapping = dispatcher.getContainer().getInstance(ActionMapper.class).getMapping(request, dispatcher.getConfigurationManager());if (mapping != null) {request.setAttribute(STRUTS_ACTION_MAPPING_KEY, mapping);}} catch (Exception ex) {dispatcher.sendError(request, response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex);}}return mapping;}

如果已经有在request中得得到 没有则创建

key为STRUTS_ACTION_MAPPING_KEY = "struts.actionMapping"

怎么创建?

通过ActionMapper的getMapping方法

,我诚恳地希望能够获得你的原谅。只是你懂得的,对于有一些委屈,

struts的PrepareOperations

相关文章:

你感兴趣的文章:

标签云: