当前位置: 首页>>代码示例>>Java>>正文


Java ActionMapping.getMultipartClass方法代码示例

本文整理汇总了Java中org.apache.struts.action.ActionMapping.getMultipartClass方法的典型用法代码示例。如果您正苦于以下问题:Java ActionMapping.getMultipartClass方法的具体用法?Java ActionMapping.getMultipartClass怎么用?Java ActionMapping.getMultipartClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.struts.action.ActionMapping的用法示例。


在下文中一共展示了ActionMapping.getMultipartClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processPopulate

import org.apache.struts.action.ActionMapping; //导入方法依赖的package包/类
/**
 * <p>Populate the properties of the specified <code>ActionForm</code> instance from
 * the request parameters included with this request.  In addition,
 * request attribute <code>Globals.CANCEL_KEY</code> will be set if
 * the request was submitted with a button created by
 * <code>CancelTag</code>.</p>
 *
 * @param request The servlet request we are processing
 * @param response The servlet response we are creating
 * @param form The ActionForm instance we are populating
 * @param mapping The ActionMapping we are using
 *
 * @exception ServletException if thrown by RequestUtils.populate()
 */
protected void processPopulate(HttpServletRequest request, HttpServletResponse response,
        ActionForm form, ActionMapping mapping) throws ServletException {
    if (form == null)
        return;

    // Populate the bean properties of this ActionForm instance
    if (log.isDebugEnabled())
        log.debug(" Populating bean properties from this request");

    form.setServlet(this.servlet);

    //*** Jaffa-customization: Moved in the custom populate method ***
    //form.reset(mapping, request);

    if (mapping.getMultipartClass() != null)
        request.setAttribute(Globals.MULTIPART_KEY, mapping.getMultipartClass());

    //*** Jaffa-customization: Invoke a custom version of the RequestUtils.populate() method, which will invoke the reset() method ***
    //RequestUtils.populate(form, mapping.getPrefix(), mapping.getSuffix(), request);
    customRequestUtilsPopulate(form, mapping.getPrefix(), mapping.getSuffix(), request, mapping);

    // Set the cancellation request attribute if appropriate
    if ((request.getParameter(Constants.CANCEL_PROPERTY) != null) || (request.getParameter(Constants.CANCEL_PROPERTY_X) != null))
        request.setAttribute(Globals.CANCEL_KEY, Boolean.TRUE);
}
 
开发者ID:jaffa-projects,项目名称:jaffa-framework,代码行数:40,代码来源:CustomRequestProcessor.java


注:本文中的org.apache.struts.action.ActionMapping.getMultipartClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。