populated by the ActionTag populateParams()
    protected void populateParams() {
        super.populateParams();
        ActionComponent action = (ActionComponent) component;
        action.setName(name);
        action.setNamespace(namespace);

so in the case of this declaration
<package name="actionTag" extends="struts-default" 
namespace="/tags/non-ui/actionTag">

ActionContext.getContext().get(ACTION_MAPPING).getNamespace()
will yield
/tags/non-ui/actionTag

hth
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Tue, 20 Apr 2010 16:19:39 -0400
> Subject: no action mapped for namespace
> From: bhaara...@gmail.com
> To: user@struts.apache.org
> 
> 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 not
> 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
                                          
_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

Reply via email to