• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

子把瓢总

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

struts1的parameter

1、配置文件    parameter="method" 

2、请求路径      http://localhost:8081/purchaseDeclareAction.do?method=edit&。。。。。。。。

 

 

 

 

 

 

3、public abstract class DispatchAction extends BaseAction

// --------------------------------------------------------- Public Methods

   /**
    * Process the specified HTTP request, and create the corresponding HTTP
    * response (or forward to another web component that will create it).
    * Return an <code>ActionForward</code> instance describing where and how
    * control should be forwarded, or <code>null</code> if the response has
    * already been completed.
    *
    * @param mapping  The ActionMapping used to select this instance
    * @param form     The optional ActionForm bean for this request (if any)
    * @param request  The HTTP request we are processing
    * @param response The HTTP response we are creating
    * @return The forward to which control should be transferred, or
    *         <code>null</code> if the response has been completed.
    * @throws Exception if an exception occurs
    */
   public ActionForward execute(ActionMapping mapping, ActionForm form,
       HttpServletRequest request, HttpServletResponse response)
       throws Exception {
       if (isCancelled(request)) {
           ActionForward af = cancelled(mapping, form, request, response);

           if (af != null) {
               return af;
           }
       }

       // Get the parameter. This could be overridden in subclasses.
       String parameter = getParameter(mapping, form, request, response);

       // Get the method's name. This could be overridden in subclasses.
       String name =
           getMethodName(mapping, form, request, response, parameter);

       // Prevent recursive calls
       if ("execute".equals(name) || "perform".equals(name)) {
           String message =
               messages.getMessage("dispatch.recursive", mapping.getPath());

           log.error(message);
           throw new ServletException(message);
       }

       // Invoke the named method, and return the result
       return dispatchMethod(mapping, form, request, response, name);
   }

posted on 2014-12-10 16:19  子把瓢总  阅读(341)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3