Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 827 invoked from network); 27 Feb 2008 04:25:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Feb 2008 04:25:46 -0000 Received: (qmail 96387 invoked by uid 500); 27 Feb 2008 04:25:32 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 96232 invoked by uid 500); 27 Feb 2008 04:25:32 -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 96219 invoked by uid 99); 27 Feb 2008 04:25:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 20:25:32 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2008 04:24:45 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JUDqr-0000Yd-SB for user@struts.apache.org; Tue, 26 Feb 2008 20:25:05 -0800 Message-ID: <15705811.post@talk.nabble.com> Date: Tue, 26 Feb 2008 20:25:05 -0800 (PST) From: sagarlotiya To: user@struts.apache.org Subject: Re: Regarding Localization Can't Change in Struts2 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sagar@aspl.in References: <15628698.post@talk.nabble.com> <747263.63841.qm@web56703.mail.re3.yahoo.com> <15630922.post@talk.nabble.com> <15648300.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org hi Thanks for your help but finally i have found the solution and it is following I have just put the before my login interceptor and it works fine. Laurie Harper wrote: > > It still seems like the most likely cause is the login interceptor > invoking navigation (esp. via a redirect) before the locale switch can > happen. > > Have you tried (temporarily) commenting out the login interceptor from > your defaultinterceptor stack? What about moving it down the stack (i.e. > after completeStack? > > L. > > sagarlotiya wrote: >> Hi >> >> My login jsp file contains only form which includes the username and >> password text field nothing else. >> Here i am pasting of my stack for Interceptor... >> >> I have struts.xml file in that i have included my authentication.xml >> >> the content of authentication.xml file is following... >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> ../login/login.action >> authenticatFailure.jsp >> Wait.jsp >> Exception.jsp >> >> >> >> >> >> >> >> >> >> >> And following is the contents of my interceptor... >> >> public String intercept(ActionInvocation actionInvocation) throws >> Exception >> { >> >> if(!(loggedInUser)) { >> return Action.LOGIN; >> } >> else { >> return actionInvocation.invoke(); >> } >> } >> >> Hope so above thing may help you some what to diagnosis the problem... >> I have also tried to check without redirecting but then also it didn't >> work >> for me... >> >> >> >> >> Laurie Harper wrote: >>> Still not enough information to say for sure, but: >>> >>> > login otherwise redirect back that user to login page... >>> ... >>> > i am passing request_locale paramter in url >>> >>> you realize that a redirect will lose the request parameter, right? >>> >>> If that isn't the clue you're looking for, post some configuration: >>> >>> - your interceptor stack >>> - action/result mappings in struts.xml for Action.LOGIN >>> - relevant code from your login page JSP >>> >>> L. >>> >>> sagarlotiya wrote: >>>> hi >>>> you are right? >>>> Let me describe the problem in detail. >>>> >>>> i have one application in struts2. >>>> >>>> I have made one interceptor that is called Login Interceptor in that i >>>> am >>>> checking for whether user is valid or not If valid then i will allow >>>> them >>>> to >>>> login otherwise redirect back that user to login page... >>>> >>>> I am achieving this thing using Login Interceptor... >>>> >>>> Now suppose if user loggin successfully and then try to change the >>>> localization it works... >>>> but suppose if user fails to loggin and then will try to change the >>>> localization it doesn't work... >>>> >>>> see my code of interceptor >>>> >>>> public String intercept(ActionInvocation actionInvocation) throws >>>> Exception >>>> { >>>> >>>> if(!(loggedInUser)) { >>>> return Action.LOGIN; >>>> } >>>> else { >>>> return actionInvocation.invoke(); >>>> } >>>> } >>>> >>>> in above if i am in "If" part then i can't change the >>>> localization...though >>>> i am passing request_locale paramter in url >>>> >>>> but if usr is valid and "ELSE" part is there in above code it doesn't >>>> work... >>>> >>>> so above is the problem.. >>>> >>>> help me if possible... i have tried a lot but i can't find what is the >>>> problem? >>>> >>>> >>>> >>>> >>>> >>>> newton.dave wrote: >>>>> --- sagarlotiya wrote: >>>>>> When i will try to change locale without login it don't work. >>>>>> >>>>>> But once i will login in to the application i can change the locale. >>>>>> >>>>>> I am using Interceptor for login validation , does it creates any >>>>> problems.? >>>>> >>>>> Hard to say. >>>>> >>>>> You haven't really provided enough information with which to start >>>>> diagnosing >>>>> the problem. >>>>> >>>>> Dave >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >>>>> For additional commands, e-mail: user-help@struts.apache.org >>>>> >>>>> >>>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >>> For additional commands, e-mail: user-help@struts.apache.org >>> >>> >>> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Regarding-Localization-Can%27t-Change-in-Struts2-tp15628698p15705811.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org