Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C8DE994E for ; Wed, 16 Nov 2011 18:09:55 +0000 (UTC) Received: (qmail 82714 invoked by uid 500); 16 Nov 2011 18:09:53 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 82674 invoked by uid 500); 16 Nov 2011 18:09:53 -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 82666 invoked by uid 99); 16 Nov 2011 18:09:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2011 18:09:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jyothril@gmail.com designates 209.85.220.176 as permitted sender) Received: from [209.85.220.176] (HELO mail-vx0-f176.google.com) (209.85.220.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2011 18:09:45 +0000 Received: by vcbfk13 with SMTP id fk13so1075623vcb.35 for ; Wed, 16 Nov 2011 10:09:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=s/RNWdfnVHSCCxVBBsJMsqDUVRdt3ul+GN1WvMytUCE=; b=k1uezkyWtUQVu+FM7koKIB/7KRdl5xmstV/rBTxSSi4mlFQpHPK6+9o3Or1pMpTXON HCxJtOltm1loPIdKvpSPN8axWaEgYb7S4Tcj5ioCDlVO7YkGG4gRuVQASSYzbyQ5sZlB yvLqiErjsm69HcKa8PYtMupRRKVw8hOcydfAI= MIME-Version: 1.0 Received: by 10.52.17.43 with SMTP id l11mr53538396vdd.28.1321466964638; Wed, 16 Nov 2011 10:09:24 -0800 (PST) Received: by 10.220.84.145 with HTTP; Wed, 16 Nov 2011 10:09:24 -0800 (PST) Date: Wed, 16 Nov 2011 10:09:24 -0800 Message-ID: Subject: object set in session in interceptor not available to JSP for first launch. From: Jyothrilinga Rao To: Struts Users Mailing List Content-Type: multipart/alternative; boundary=bcaec5040be6027bce04b1de01e1 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec5040be6027bce04b1de01e1 Content-Type: text/plain; charset=ISO-8859-1 Hi, I have the following configuration snippet in my struts.xml: true ERROR i.e I have a interceptor which I am calling after the defaultStack executes. My MenuInterceptor has the following code fragment in my intercept method of MenuInterceptor ActionContext ac = actionInvocation.getInvocationContext(); String result = actionInvocation.invoke(); if( null==ac.getSession().get("menu")){ menu = parser.getMenu(); ac.getSession().put("menu", menu); } LOG.debug("menu from session at end of intercept is: "+ac.getSession().get("menu")); return result; i.e after the action logic executes, I am checking if the sesssion has the object. if the object is not present I am populating it and storing in the session. my LOG outputs valid object in the first launch also. When I execute for the first time, the menu object is not available in the JSP, however if I refresh the page, the menu object is available in the JSP. I could not have my custom interceptor to execute after the default interceptors stack as the result already gets comitted and I cannot put object in my session. I suspect there is something done by some interceptor in the default stack which I am missing. Could you please let me know how I can set something in session in Interceptor and have it available in my JSP. Thanks, JK --bcaec5040be6027bce04b1de01e1--