Return-Path: X-Original-To: apmail-struts-dev-archive@www.apache.org Delivered-To: apmail-struts-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5826EDE58 for ; Wed, 26 Sep 2012 18:16:18 +0000 (UTC) Received: (qmail 16521 invoked by uid 500); 26 Sep 2012 18:16:17 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 16480 invoked by uid 500); 26 Sep 2012 18:16:17 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 16469 invoked by uid 99); 26 Sep 2012 18:16:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2012 18:16:17 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fredricus@gmail.com designates 209.85.212.182 as permitted sender) Received: from [209.85.212.182] (HELO mail-wi0-f182.google.com) (209.85.212.182) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2012 18:16:09 +0000 Received: by wibhm2 with SMTP id hm2so896115wib.17 for ; Wed, 26 Sep 2012 11:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=SJ/Wap2lEmTccNVev8loMjk1nIK98iKAg1fc2sOwlSw=; b=wNbdltpCRe43kn7sVfT1QwCe/jKedKyXltO6D6vPYqOKSjMfkMakVtUj77VOKcTUWK 8nefaFH5d6aoAlDRC24PsTJSVmZtKfVYl7vgxF9Z9dV9N047zE4er29M/mCDBxbCv2pI qMGjom/MLO9em6MbhuLA9IccjkCuOUKI5zVhlj2NdhDKrjX23XNVped44ZxcrEBwWGWX o+G2hHlWBxET2j0n+ggJ9eFA9MrU9le9kd+OWXb3SEfrijGoczfzlfhh1i0G28LoJXSA 2eayk2eNoOdLBy+klavpgVA9THIR4VXJFPNV5voK3LBukwcdCbFFHJaQcnyOyp+xWdgI znRQ== MIME-Version: 1.0 Received: by 10.180.100.35 with SMTP id ev3mr31273140wib.7.1348683349255; Wed, 26 Sep 2012 11:15:49 -0700 (PDT) Received: by 10.194.24.193 with HTTP; Wed, 26 Sep 2012 11:15:49 -0700 (PDT) In-Reply-To: References: Date: Wed, 26 Sep 2012 21:15:49 +0300 Message-ID: Subject: Re: Redirect-action alternative in Struts2 without browser redirect From: Fredrik Lindberg To: Struts Developers List Content-Type: text/plain; charset=ISO-8859-1 Hi! Yes, this is possible, but, as you said, should not. =) Besides all the bad things of mixing presentational and business logic, I would have to write (and later maintain) quite a lot of code when all I really would like to do is replace a result type in the action-mappings.xml. Thanks anyway! =) / Fredrik Lindberg (2012-09-26). On Wed, Sep 26, 2012 at 8:54 PM, Ken McWilliams wrote: > You _could_ (but in general certainly not _should_) create a new view > which only contains an action tag and use that for your result. > > You can specify the desired parameters using the param tags, and you > can set executeResult to true so it then renders it's view. > > On Wed, Sep 26, 2012 at 11:39 AM, Chris Pratt wrote: >> If you're configuring this in struts.xml, you're not in the browser (i.e. >> presentation side), you're in the server! You either need to stream the >> results directly from the server using one of the direct rendering engines >> (jsp/freemarker/velocity/tiles) or you need to redirect to another URL or >> Action. Maybe you need to take a step back and lay out exactly what you're >> trying to accomplish. >> (*Chris*) >> >> On Wed, Sep 26, 2012 at 10:15 AM, Fredrik Lindberg wrote: >> >>> Hi! >>> >>> Yes, but then we are already on the presentation side of things. I >>> want to forward to a different action and have it execute without a >>> browser redirect. >>> >>> / Fredrik Lindberg (2012-09-26) >>> >>> On Wed, Sep 26, 2012 at 7:45 PM, Chris Pratt >>> wrote: >>> > The default jsp/freemarker/velocity/tiles results do send the response >>> > directly. The redirect & redirect-action results do exactly as you'd >>> > expect and redirect the browser to retrieve the response. >>> > (*Chris*) >>> > >>> > On Wed, Sep 26, 2012 at 9:30 AM, Fredrik Lindberg >> >wrote: >>> > >>> >> Hi! >>> >> >>> >> I am looking for if there is any alternative to the redirect-action >>> >> result type where it does not generate a browser redirect? The issue >>> >> with the browser redirect is that it results in a longer response >>> >> times for the users and also means the server is put under higher load >>> >> when it has to handle two requests in rapid succession (noticeable >>> >> under high load). Also why not send what the client wants right away? >>> >> >>> >> I have read about request chaining and using the ChainingInterceptor, >>> >> but this is fundamentally wrong in the sense that all request >>> >> parameters that the first action was fed also are passed on to the >>> >> next action. What I want is having control over what properties are >>> >> passed on to the next action in the same way as for the redirects, but >>> >> without the overhead. Can anyone help? =) >>> >> >>> >> / Fredrik Lindberg (2012-09-26). >>> >> >>> >> --------------------------------------------------------------------- >>> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>> >> For additional commands, e-mail: dev-help@struts.apache.org >>> >> >>> >> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>> For additional commands, e-mail: dev-help@struts.apache.org >>> >>> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > For additional commands, e-mail: dev-help@struts.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org