struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DavidLiu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4683) some of actions did not work.
Date Fri, 02 Sep 2016 09:23:20 GMT

    [ https://issues.apache.org/jira/browse/WW-4683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15458034#comment-15458034
] 

DavidLiu commented on WW-4683:
------------------------------

It works well on tomcat 7. so  I think this problem is another reason. 

> some of actions did not work.
> -----------------------------
>
>                 Key: WW-4683
>                 URL: https://issues.apache.org/jira/browse/WW-4683
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Results
>    Affects Versions: 2.3.24
>         Environment: struts2.3.24.3,weblogic12c, jdk8,centos7  
>            Reporter: DavidLiu
>             Fix For: 2.3.31, 2.5.3
>
>
> 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.
> {code:java}
>  @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);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message