Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3D233200B74 for ; Thu, 1 Sep 2016 09:34:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2C9B6160AB7; Thu, 1 Sep 2016 07:34:32 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 75163160AAE for ; Thu, 1 Sep 2016 09:34:31 +0200 (CEST) Received: (qmail 49962 invoked by uid 500); 1 Sep 2016 07:34:20 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 49945 invoked by uid 99); 1 Sep 2016 07:34:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2016 07:34:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 758CA2C1B77 for ; Thu, 1 Sep 2016 07:34:20 +0000 (UTC) Date: Thu, 1 Sep 2016 07:34:20 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4683) some of actions did not work. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 01 Sep 2016 07:34:37 -0000 [ https://issues.apache.org/jira/browse/WW-4683?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1545462= 2#comment-15454622 ]=20 Lukasz Lenart commented on WW-4683: ----------------------------------- It's probably due to you are writing directly to response in action and res= ult cannot generate response as response was already committed. > 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 =20 > Reporter: DavidLiu > Fix For: 2.3.31, 2.5.3 > > > If I change struts.devMode =3Dfalse ,the struts2 occur error. the error i= nfo as below. > error message : No result defined for action guangdu.admin.action.Borrowe= rAccountManager and result success > If I change struts.devMode =3Dtrue ,the struts2 work well. > {code:java} > @Action("/borrowerAccount/depositSaving") > public String depositSaving(){ > try{ > if(amount<=3D0){ > throw new IllegalArgumentException("=E9=87=91=E9=A2=9D=E4= =B8=8D=E8=83=BD=E5=B0=8F=E4=BA=8E0"); > } > String orderNo=3D_sequence.generateBackgroundSequence(); > UserAgentInfo userAgentInfo=3Dnew UserAgentInfo(request.getRe= moteAddr(),"web",request.getSession().getAttribute("username").toString(),"= admin"); > String html=3DorderService.generatorDeposit(orderNo,enterpris= eId,-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 =3D ServletActionContext.getResponse(); > res.setContentType("html/text;charset=3Dutf-8"); > PrintWriter out =3D res.getWriter(); > out.write(html); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)