Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 68158 invoked from network); 8 Apr 2007 20:23:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Apr 2007 20:23:51 -0000 Received: (qmail 39354 invoked by uid 500); 8 Apr 2007 20:23:47 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 39343 invoked by uid 500); 8 Apr 2007 20:23:47 -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 39332 invoked by uid 99); 8 Apr 2007 20:23:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Apr 2007 13:23:47 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of invrnrv@gmail.com designates 66.249.82.231 as permitted sender) Received: from [66.249.82.231] (HELO wx-out-0506.google.com) (66.249.82.231) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Apr 2007 13:23:39 -0700 Received: by wx-out-0506.google.com with SMTP id t11so1273914wxc for ; Sun, 08 Apr 2007 13:23:18 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=bQETeFzu6anB6rMkVY1Jv4OqiSTDNz+bu3oygNX4L++Ia/ml8uAd0NE+Xj7RXhrhzQ+ipamHSfE6lUc+IAasSlThzYWzcecPU0CMwiGi9dj0n80JS/3wdBW0KqgO2CNioSfaVrTtaFEhuOVaTMkVzpbvAqOIfqvGpdpwuHdgya4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=QUbmD0saueH3kpKVJiDXvaYwvYoeRpoY5PpIseyNVAIMxoQC/3rk4MKswmRUDfaRhL9zWASvMQrsLYsf0OjuKhsGvouc7QX00hW72M1F7BI7mz1hHQ7HERD/zxGNEEZ3jzz9DiPQ9Y2tstaqeXaaQ+CaRVjgkI0/jtsOBXVeUMg= Received: by 10.78.178.5 with SMTP id a5mr782177huf.1176063797828; Sun, 08 Apr 2007 13:23:17 -0700 (PDT) Received: by 10.78.48.10 with HTTP; Sun, 8 Apr 2007 13:23:17 -0700 (PDT) Message-ID: <4649a9a20704081323w2399ecd3qcc9f93f744f52a2c@mail.gmail.com> Date: Sun, 8 Apr 2007 13:23:17 -0700 From: "Jae K" To: "Struts Users Mailing List" Subject: Re: resume after login feature In-Reply-To: <4649a9a20704081236g62f0d947ofe77edb9d26866a7@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_25340_10439871.1176063797758" References: <9870255.post@talk.nabble.com> <620235.76288.qm@web56702.mail.re3.yahoo.com> <4649a9a20704081226r4f063695wf1eab6097cd1ce6a@mail.gmail.com> <4649a9a20704081236g62f0d947ofe77edb9d26866a7@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_25340_10439871.1176063797758 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline It turns out that ${ServletRequest.requestURI } is the correct OGNL expression. Of course you need to have a "getServletRequest" method in your action superclass, which means all of your actions for your application that requires a login will have to implement that method or subclass from a class that does. Dale, the "parse" param is set to true by default so I didn't have to set it. The second part requires redirecting to the origurl location after a successful login. This the OGNL expression I have so far, but it's not working yet. I'll post again once i fix it. ${#ServletRequest.parameter["origurl"] == null ? " Welcome.do" : #ServletRequest.parameter["origurl"]} On 4/8/07, Jae K wrote: > > Right after posting this I realized that my AuthenticationInterceptor was > the first interceptor to be called, and that's why the ServletRequest object > wasn't set. > > AAAHHHHHhh. I've been burned by the config twice already (the first time > was when using the struts-default.xml config, ValidationInterceptor is > configured not to validate for certain methods), but I'm willing to admit > that it's my dumb oversight. > > Now I need to get the OGNL syntax right. > > On 4/8/07, Jae K wrote: > > > > Sigh... I tried tackling the first half of this problem today. The first > > part is getting the original requested URL as a parameter to the > > RedirectActionResult. > > > > > > > > Login > > / > > ${ServletRequest.requestURI} <-- not sure about the OGNL here. > > > > > > > > All of my actions extend MySupport, which implement ServletRequestAware. > > I fired my debugger to see whether the request object would even be set > > (with the setServletRequest method) in my action before the redirect-action > > is executed. NO! I don't think I can access the ServletRequest object from > > the redirect-action configuration! > > > > My only remaining option is to create my own redirect class that taps > > into the ServletRequest object via the invocation object. Rigth now S2 is > > looking very very unattractive as a web framework, because the OGNL features > > are not well documented (esp in relation to struts results), and because the > > given Result and Interceptor classes are not suitable for my basic needs > > such as resume after redirect. > > > > - Jae > > > > On 4/6/07, Dave Newton < newton.dave@yahoo.com> wrote: > > > > > > --- meeboo wrote: > > > > One last question regarding this. As I beforehand > > > > don't know where to redirect the user after the > > > login > > > > action I will have to implement the > > > > ServletResponseAware interface and then use the > > > > HttpServletResponse for this. This seems like an > > > ugly > > > > way to redirect the user, are there other ways > > > maybe? > > > > > > As someone else mentioned if you are using an > > > interface to set the original URL (like void > > > setOriginalUrl(String) & String getOriginalUrl()) then > > > you can map a redirect in your action's config, more > > > or less like the following: > > > > > > ${originalUrl} > > > > > > That was a day or two ago; I don't have a reference to > > > it handy and I don't recall who the poster was. > > > > > > d. > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > > > > > It's here! Your new message! > > > Get new email alerts with the free Yahoo! Toolbar. > > > http://tools.search.yahoo.com/toolbar/features/mail/ > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > > > For additional commands, e-mail: user-help@struts.apache.org > > > > > > > > > ------=_Part_25340_10439871.1176063797758--