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 E3200D107 for ; Thu, 23 May 2013 21:30:12 +0000 (UTC) Received: (qmail 81539 invoked by uid 500); 23 May 2013 21:30:09 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 81514 invoked by uid 500); 23 May 2013 21:30:09 -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 81504 invoked by uid 99); 23 May 2013 21:30:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 May 2013 21:30:09 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_FONT_FACE_BAD,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.139.212.185] (HELO nm26.bullet.mail.bf1.yahoo.com) (98.139.212.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 May 2013 21:30:02 +0000 Received: from [98.139.212.149] by nm26.bullet.mail.bf1.yahoo.com with NNFMP; 23 May 2013 21:29:41 -0000 Received: from [98.139.212.206] by tm6.bullet.mail.bf1.yahoo.com with NNFMP; 23 May 2013 21:29:41 -0000 Received: from [127.0.0.1] by omp1015.mail.bf1.yahoo.com with NNFMP; 23 May 2013 21:29:41 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 472737.10380.bm@omp1015.mail.bf1.yahoo.com Received: (qmail 47207 invoked by uid 60001); 23 May 2013 21:29:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1369344581; bh=/LzWRPF44hZ7pIEv/C+GQp5fYSbfr+NXv54vuthqfb8=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=pXYQMg3ZEsgcZemp18Yczn22A0p1pQ8cJi+fRe62g7SadRR1gaw6+2+G6XWBuP1YTeeIzaacgER98BKZb6zUf6MXDsD5iw7P1+1Sx5eLMDkWNnveNEvIq8OPXlTkMmYv5Hkin5YlfznT71PLlrJR8HAoFQfFSKl7SvX51TpvOw0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=iIJZm5uvDD4Ce/V8vS2arS5AosJTOMhTznvmMdBT/Eyle/SXnxBEOJ+nPruxr4QFYRX7UkJsqfijNp18oStacSCK1OlvAVoajc1W5X4whpCeLuBhPes8EBPySHea1nfnm7Rt0viaY3lie67bZY/u2ZMREJ6jeiB7DlJHYs/gNaA=; X-YMail-OSG: Wil_3K8VM1lqgOpQLKE2aCh2GiDZMfoTNTO00LG93c9_v0T 6X_ug8P933M.zPZgyxcdOLSCx8KTXOeWhn6Bv2Z5dPQD.WEnIEnku7MpgS9p 0lkIBXqEZ77jGv6nEDA4HUc8mdqWF4Wxd4aDr0F8JuQ0_vv4cmoMJC4S_rzg jYCYee.yD_aAHtwcSli6muwgjf7SrlRlZw90Utnk9.ilH3o9PkDrHIAaM5Pn xfOdCxt5chYDGoi9y7fXFXaPS4218UWwu2I6sY6qTFjBufMACNpcs5W6E4mS 3GMlw7olaIpj8vVO_m0PHRbqk5FbkJzChdgSfu1ACTvnLIIUDJ2t7TJ2LmEz OOqWAezs2OfrSRLImKNfQSzKqvhnc4LCMSGyR7cq30zDSrasGBftUgH8iPAI mfUq6409Y82JDQfXWxRGhy9f0JbgLvXY0BbSdP_a3.0ah11tK5YSB4baImce OzOAk8Zk15HB2RREpayBA6vRMQSjmtf6ObOOidoI1IK.e.hc65ad1IxjEdFY fyWI6VjOb2FQO Received: from [50.76.64.177] by web140706.mail.bf1.yahoo.com via HTTP; Thu, 23 May 2013 14:29:40 PDT X-Rocket-MIMEInfo: 002.001,UGxlYXNlIGFkdmlzZSB0aGUgZm9sbG93aW5nCgpmb3Igc3RydXRzMiwgZm9yIGFuIGxvZ2luIGFjdGlvbiwgYW4gcHJlZGVmaW5lZCBpbnRlcmNlcHRvciBpcyB0cmlnZ2VyZWQgZm9yIGNoZWNraW5nIGNvb2tpZSAsIHRoZSBjb2RlIGlzIHRoZSBmb2xsb3dpbmcKCmZvciDCoFNlY3VyaXR5VmVyaWZ5U2Vzc2lvbkludGVyY2VwdGVyLCBpIGltcGxlbWVudCB0aGUgU2VydmxldFJlcXVlc3RBd2FyZSwgYnV0IGdldCBudWxsIGNhdGFjaGVkLgoKbXkgcXVlc3Rpb24gaXM6Cgpmb3IgaW50ZXJjZXB0ZXIsIFJlcXUBMAEBAQE- X-Mailer: YahooMailWebService/0.8.144.546 Message-ID: <1369344580.40106.YahooMailNeo@web140706.mail.bf1.yahoo.com> Date: Thu, 23 May 2013 14:29:40 -0700 (PDT) From: john lee Reply-To: john lee Subject: struts 2 Intercepter ServletRequestAware To: struts support MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-637016289-1971331987-1369344580=:40106" X-Virus-Checked: Checked by ClamAV on apache.org ---637016289-1971331987-1369344580=:40106 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Please advise the following=0A=0Afor struts2, for an login action, an prede= fined interceptor is triggered for checking cookie , the code is the follow= ing=0A=0Afor =A0SecurityVerifySessionIntercepter, i implement the ServletRe= questAware, but get null catached.=0A=0Amy question is:=0A=0Afor intercepte= r, Request object can not be implemented? if can, why i get null?=A0=0A=0At= hanks in advance=0A=0Ajohn=A0=0A=0A=0A=0Apublic class SecurityVerifySession= Intercepter extends AbstractInterceptor implements ServletResponseAware, Se= rvletRequestAware {=0A=0A=A0 =A0=A0=0A=A0 =A0 protected HttpServletResponse= servletResponse;=0A=A0 =A0 public void setServletResponse(HttpServletRespo= nse servletResponse)=0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 { this.servletResponse = =3D servletResponse; }=0A=0A=A0 =A0 protected HttpServletRequest servletReq= uest;=0A=A0 =A0 public void setServletRequest(HttpServletRequest servletReq= uest) { this.servletRequest =3D servletRequest; }=0A=0Apublic String interc= ept(ActionInvocation invocation) throws Exception {=0A=0A=A0 =A0 =A0 =A0Act= ionContext ctx=3Dinvocation.getInvocationContext();=0A=A0 =A0 =A0 Map sessi= on=3D ctx.getContext().getSession();=0A=A0 =A0 =A0=A0=0A=A0 =A0 =A0 =A0 =A0= if (servletRequest=3D=3Dnull)=0A=A0 =A0 =A0 =A0 =A0 =A0 =A0System.out.print= ln(" Request object is null catched");=0A=A0 =A0 =A0 =A0 =A0 Cookie cookieL= ist[]=3DservletRequest.getCookies();=0A ---637016289-1971331987-1369344580=:40106--