Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 30155 invoked from network); 20 Apr 2010 23:41:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Apr 2010 23:41:14 -0000 Received: (qmail 23866 invoked by uid 500); 20 Apr 2010 23:41:12 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 23811 invoked by uid 500); 20 Apr 2010 23:41:11 -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 23803 invoked by uid 99); 20 Apr 2010 23:41:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Apr 2010 23:41:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of martin.canaval@gmail.com designates 74.125.82.48 as permitted sender) Received: from [74.125.82.48] (HELO mail-ww0-f48.google.com) (74.125.82.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Apr 2010 23:41:05 +0000 Received: by wwb29 with SMTP id 29so3928500wwb.35 for ; Tue, 20 Apr 2010 16:40:44 -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=pOHgKiyoHFQor6R/GpcBYlVOQaKjsABOBVxj+N4LzY0=; b=aGv6pwNxOU4s+5Md0H7WywhQAoAMHuJ2wKPD18MjEQf9k8Di0n7J2bJVzMsj3u1k70 H2bvaaViG5QgitWUA8OYDAvf5EZQD23uW053PskHhhUC0n5kZ8jvLsTKae5uvkkfO6RV qi84FbnxGmWzMNXDl05sJaCHTnFRCJi5pYwfc= 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=kKuAdYrWwWZFwSTaI4kiPm4zzpPGC0kXdjPffM9TVRATykE0WseJAsZ4amQ906piXP x3Tv/RGzeLg7jIpnhJvjrRKDRSKe2LlrnN9IW9sn03BK7OQ+v8eJ2QqwmTn3JUXUfEhA pMMdq8ud60x+0aV5kIPAFnGxRuQn+bDULUCj4= MIME-Version: 1.0 Received: by 10.216.172.135 with HTTP; Tue, 20 Apr 2010 16:40:43 -0700 (PDT) In-Reply-To: References: Date: Tue, 20 Apr 2010 18:40:43 -0500 Received: by 10.216.89.130 with SMTP id c2mr2821511wef.44.1271806843894; Tue, 20 Apr 2010 16:40:43 -0700 (PDT) Message-ID: Subject: Re: no action mapped for namespace From: =?ISO-8859-1?Q?Luis_Mart=EDn_Canaval_S=E1nchez?= To: Struts Users Mailing List Content-Type: multipart/alternative; boundary=0016e6d99d7e273a890484b39bf5 --0016e6d99d7e273a890484b39bf5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I am not an expert but what I would do for this is create an action with a wildcard that should work like a "default" option in a "switch/select case"= . something like go.jsp go2.jsp NoActionMappedGO.jsp On Tue, Apr 20, 2010 at 15:19, Bhaarat Sharma wrote: > in struts2 is there a way to detect when "No action mapped for namespace > ..." error will come up?? > > What I mean is that can we write an if condition that checks whether or n= ot > the the action name exists in struts.xml? > > we can get the action name by: ActionContext.getInstance().getName() > > So if the above line of code returns an action name...can it > be guaranteed that we will not get "No action mapped for namespace..."? > > Thanks > --=20 Ing. Luis Mart=EDn Canaval S=E1nchez Keep it small and simple. --0016e6d99d7e273a890484b39bf5--