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:[EMAIL PROTECTED]