From user-return-219006-archive-asf-public=cust-asf.ponee.io@struts.apache.org Mon May 14 22:16:09 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id CDD70180627 for ; Mon, 14 May 2018 22:16:08 +0200 (CEST) Received: (qmail 15737 invoked by uid 500); 14 May 2018 20:16:07 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 15722 invoked by uid 99); 14 May 2018 20:16:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 May 2018 20:16:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 406011807CC for ; Mon, 14 May 2018 20:16:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.999 X-Spam-Level: * X-Spam-Status: No, score=1.999 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id q0wQfmJ-o4qh for ; Mon, 14 May 2018 20:16:02 +0000 (UTC) Received: from mail.nqadmin.com (mail.nqadmin.com [12.230.133.169]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C64F85F23C for ; Mon, 14 May 2018 20:15:59 +0000 (UTC) Received: (from root@localhost) by mail.nqadmin.com (8.14.4/8.14.4) id w4EKFneb012460 for user@struts.apache.org; Mon, 14 May 2018 15:15:49 -0500 Received: from ppasalalinux.nqadmin.com (ppasalalinux.nqadmin.com [192.168.0.234]) (TLSv1/SSLv3 DHE-RSA-AES128-SHA 128/128) by mail.nqadmin.com with SMTP id wjh8wni5tisq8b4c9meyax2cae; for user@struts.apache.org; Mon, 14 May 2018 15:15:49 -0500 (CDT) (envelope-from ppasala@pangburngroup.com) Subject: Re: Struts2 login action class seems to be reused To: user@struts.apache.org References: <5f2097dc-db20-82c8-3fed-828bc7e9d601@pangburngroup.com> <5f8558aa-a130-a00b-ab10-f5db3542d21c@pangburngroup.com> <1e93d7f0-3f83-9956-8f85-ea710644d197@pangburngroup.com> <3c41c72e-03ca-67b0-90ee-852b955831c1@pangburngroup.com> <7a2f5320-62dd-7e97-4828-c15845971355@pangburngroup.com> From: Prasanth Pasala Organization: The Pangburn Company Message-ID: <98cba0c2-9dde-4f24-097b-a93166189b12@pangburngroup.com> Date: Mon, 14 May 2018 15:15:49 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------46827C56DE155DE442FA9A5D" Content-Language: en-US --------------46827C56DE155DE442FA9A5D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit A different issue is coming up now after the get methods are removed.  Getting the below exception some times when you request the login page, at which point the browser doesn't have the session id yet, the session id mentioned would be a session id from a previous request (from another thread, in JMeter testing). Wonder if, some how this data (session id) is also moved by struts2 when copying data from the other LoginAction that is lingering from old requests. Thanks, Prasanth Exception: java.lang.IllegalStateException: UT000010: Session is invalid JVoo5BkMlzTpOavsEe7_NjS0MzTXDlhYtlSviiGR On 04/24/2018 09:00 AM, Prasanth Pasala wrote: > I have removed the get methods from the LoginAction of /Context2 and that seems to solve the problem. So seems like the LoginAction objects created because of FORWARD some how are in the stack while a > LoginAction is created due to a REQUEST. Wondering if this can be replicated without having two contexts. If there is a FORWARD within the context and the same action can also be initiated by direct > REQUEST wonder if the same issue will crop up. > > Thanks, > Prasanth > > On 04/24/2018 01:52 AM, Yasser Zamani wrote: >> On 4/23/2018 11:50 PM, Prasanth Pasala wrote: >>> Get rid of the get methods in LoginAction, is this in /Context2 (application where the issue is occurring) or /Context1 (which forwards the requests to /Context2)? >>> >> That contexts who forwards request (Context1 I think) but you may do for >> all to be sure. However, I still prefer rewriting FORWARD with REDIRECT >> or POSTBACK to prevent future possible issues. >> >>> Yes exactly. The new log shows, your previous contexts actions >>> (LoginAction@7f716c46 and LoginAction@35224c2f) are also present in >>> current context because you forward same request which includes previous >>> context data, then, Struts ChainInterceptor copies data from previous to >>> current action :S . As currently Struts cannot handle forwarded requests >>> well, could you please try REDIRECT instead? sendRedirect asks user >>> browser to continue with a new request. >>> >>> Still not sure about the above comment.  So the ChainInterceptor is getting data from an action that occurred before and is not part of current request? >> Struts has a stack. ChainResult push current action to stack for next >> action. In next action, ChainInterceptor pops it and copies values. Now >> you have two actions in stack (I don't know how but seems it's because >> of forward same request which has previous context1 stack) and >> ChainInterceptor thinks ChainResult has pushed that and then pops and >> copies them into current action. >> >> Regards. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >> For additional commands, e-mail: user-help@struts.apache.org >> > --------------46827C56DE155DE442FA9A5D--