Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@jakarta.apache.org Received: (qmail 55623 invoked by uid 500); 26 Jul 2001 00:21:56 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: struts-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 55616 invoked from network); 26 Jul 2001 00:21:56 -0000 Received: from mailout3-1.nyroc.rr.com (HELO mailout3.nyroc.rr.com) (24.92.226.168) by h31.sny.collab.net with SMTP; 26 Jul 2001 00:21:56 -0000 Received: from apache.org (roc-24-24-50-8.rochester.rr.com [24.24.50.8]) by mailout3.nyroc.rr.com (8.11.2/RoadRunner 1.03) with ESMTP id f6Q0JR523230 for ; Wed, 25 Jul 2001 20:19:28 -0400 (EDT) Message-ID: <3B5F6257.E6498CF@apache.org> Date: Wed, 25 Jul 2001 20:20:39 -0400 From: Ted Husted Organization: Apache Software Foundation / Jakarta X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: struts-user@jakarta.apache.org Subject: Re: calling actionmapping from a URL References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N The ActionMapping has a property for validation. To call the Action without validation, set validate=false in your ActionMapping. An Action is not a servlet, and you cannot call it directly from an URL. In every case, the request is passed to the ActionServlet by the container. The ActionServlet determines which Action to use by referring to the ActionMappings. So in the example case, you must have mapping named "myaction", or else it could not be called. You may wish to set validate=false for that mapping, and leave it at true for the others. If there is some other type of validation occuring in your Action, which you put in yourself, you could check the mapping object passed to perform() to see if validation should be used or not. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Jan Fredrik �veraasen wrote: > > Hi > I have a action class that is used in several actionmappings and in some > situations it is called directly > from a url, like "href=myaction.do", but in these cases the validation > implemented prevents me from continuing the process. > My question is: how can i turn off validation when calling a action class > from a URL. > > thanks in advance > > Jan Fredrik > > ___ Jan Fredrik �veraasen | Senior Systems Developer > ___ Cell Network ASA | Pb. 5313, S�rkedalsv. 10A, N-0304 Oslo, > Norway > ___ Tel: +47 23196600/35 | Fax: +47 23196601 | Mob: +47 93 49 99 88 > ___ http://www.cellnetwork.com/ | > mailto:jan.fredrik.overaasen@cellnetwork.no > >