Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4683

some of actions did not work.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 2.3.24
    • None
    • Core Results
    • None
    • struts2.3.24.3,weblogic12c, jdk8,centos7

    • Important

    Description

      If I change struts.devMode =false ,the struts2 occur error. the error info as below.
      error message : No result defined for action guangdu.admin.action.BorrowerAccountManager and result success

      If I change struts.devMode =true ,the struts2 work well.

       @Action("/borrowerAccount/depositSaving")
          public String depositSaving(){
              try{
                  if(amount<=0){
                      throw new IllegalArgumentException("金额不能小于0");
                  }
      
                  String orderNo=_sequence.generateBackgroundSequence();
                  UserAgentInfo userAgentInfo=new UserAgentInfo(request.getRemoteAddr(),"web",request.getSession().getAttribute("username").toString(),"admin");
                  String html=orderService.generatorDeposit(orderNo,enterpriseId,-1,amount,request.getRequestURL().toString().replace("depositSaving", "manager"),userAgentInfo);
      
                  generateHtml(html);
      
                  return SUCCESS;
              }
              catch (Exception exp){
                  return showMessageAction(SUCCESS,exp);
              }
              catch (Error error){
                  return showMessageAction(SUCCESS,error);
              }
          }
      
      private void generateHtml(String html) throws IOException {
              HttpServletResponse res = ServletActionContext.getResponse();
              res.setContentType("html/text;charset=utf-8");
              PrintWriter out = res.getWriter();
      
              out.write(html);
          }
      

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            skysoftwaredotnet@gmail.com DavidLiu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: