Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 17647 invoked from network); 15 Apr 2010 07:05:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Apr 2010 07:05:47 -0000 Received: (qmail 37577 invoked by uid 500); 15 Apr 2010 07:05:45 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 37549 invoked by uid 500); 15 Apr 2010 07:05:45 -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 37541 invoked by uid 99); 15 Apr 2010 07:05:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Apr 2010 07:05:44 +0000 X-ASF-Spam-Status: No, hits=4.7 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of thechrispratt@gmail.com designates 209.85.160.48 as permitted sender) Received: from [209.85.160.48] (HELO mail-pw0-f48.google.com) (209.85.160.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Apr 2010 07:05:37 +0000 Received: by pwi7 with SMTP id 7so821351pwi.35 for ; Thu, 15 Apr 2010 00:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=bvZ0KMCR0lXrkTvt+rh3il6MDk7JQoz48FAfWqqqEdE=; b=a2toxt7ArA0GN2siyAEnCl9S1FDlPSV72zev+1Z2M+oftOgUq9lNYEwK7P8BNwxxsm dylLD+KZOrfDBe0xBQwQDlFXs9mk2/qNSaPJuWUinXgW1f0kjujtsGOSTVwknSHvwwmK RVUmRqbYkQKs7/rShaVCs52qhzkmQej1/QpWk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=SLPiIoevS3rbTB/jn4xu6QQQpC6AVbT3KE9+iXNRfnS2i562ARXbdXNxJc4Dv+tLbP RjfaKpg+403wWfIoAJWBvEOwcMB8ohZsb0n5F6K0ELhVtjDmUutuDxsix/0XmO7G+fOv LRq+6T/BT8EVL9tjyPYAMPxYMd0YGsVA4oAyc= MIME-Version: 1.0 Received: by 10.140.177.13 with HTTP; Thu, 15 Apr 2010 00:05:16 -0700 (PDT) In-Reply-To: References: Date: Thu, 15 Apr 2010 00:05:16 -0700 Received: by 10.140.57.7 with SMTP id f7mr732250rva.201.1271315116238; Thu, 15 Apr 2010 00:05:16 -0700 (PDT) Message-ID: Subject: Re: [S2] Welcome Page as Action? From: Chris Pratt To: Struts Users Mailing List Content-Type: multipart/alternative; boundary=001636b2b154e6a9d40484411d69 X-Virus-Checked: Checked by ClamAV on apache.org --001636b2b154e6a9d40484411d69 Content-Type: text/plain; charset=ISO-8859-1 How'd it go when you put an empty default.action file in the directory? (*Chris*) On Wed, Apr 14, 2010 at 10:54 PM, Burton Rhodes wrote: > I'm not sure the default action solves the problem. > > I am put this in my struts.xml file: > > > > It appears that it only loads Login_show if a user types in an > *.action file. For example: > > URL: http://www.mydomain.com/package/DOESNOTEXIST.action > Result: http://www.mydomain.com/package/Login_show.action > > URL: http://www.mydomain.com/package/ > Result: Simply loads the index.jsp file (I believe it doesn't route > through Struts because it doesn't match a "url-pattern" for the struts > filter). And if I put a in > index.jsp - I still get URL not found as before. > > How are you getting the user from www.mydomain.com -> > www.mydomain.com/package/default.action using this method? I think I > am missing a step. > > > On Thu, Apr 15, 2010 at 12:31 AM, Brian Thompson > wrote: > > Struts runs in a filter that applies to requests that come through, so > > the welcome file in web.xml doesn't matter. > > > > -Brian > > > > On Wed, Apr 14, 2010 at 9:21 PM, Krunal Dhamelia > wrote: > >> I want to do the same thing but I didn't get you clear Brian. > >> If we follow your solution then Could you please explain little in brief > >> that how web.xml know about struts default action? > >> What should we put in web.xml for welcome file? > >> > >> Krunal Dhamelia > >> > >> > >> On Wed, Apr 14, 2010 at 6:00 PM, Brian Thompson >wrote: > >> > >>> On Wed, Apr 14, 2010 at 4:22 PM, Burton Rhodes > > >>> wrote: > >>> > I'm sure this answer is trivial, but I can't figure how to do a > >>> > server-side forward to a Struts action from my welcome page > >>> > (index.jsp). Currently I have index.jsp "redirecting" the user, but > I > >>> > would like to eliminate the roundtrip that a "redirect" imposes (I've > >>> > had complaints from mobile users). All my "forward" attempts give a > >>> > RequestURL file not found error. Has anyone done this? Google seems > >>> > to be unhelpful. > >>> > > >>> > >>> > >>> Add a default action in your struts xml. It's what we're doing in our > >>> Struts app where I work. > >>> > >>> > >>> > >>> > >>> welcome.jsp > >>> > >>> > >>> > >>> -Brian > >>> > >>> > >>> > >>> > Currently this works but makes a roundtrip (index.jsp) : > >>> > <% response.sendRedirect("Login_show.action"); %> > >>> > > >>> > Serverside attempts without success (index.jsp): > >>> > > >>> > > >>> > > >>> > > >>> > Using: > >>> > Struts 2.1.8 > >>> > Tomcat 6.x > >>> > Apache 2.2 > >>> > > >>> > Many Thanks, > >>> > Burton > >>> > >>> --------------------------------------------------------------------- > >>> 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 > > --001636b2b154e6a9d40484411d69--