Re: no action mapped for namespace
@Luis: I don't think I understand what you are trying to do from that example...how will that help? I am trying to find out that if ActionContext.getInstance().getName() returns an action name say "test" and that is infact the action we want to land on...can it be 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..."? @Martin: I don't understand where component comes from in your example. which super.populateParams() is your method pointing to? I am lost On Tue, Apr 20, 2010 at 7:49 PM, Martin Gainty wrote: > > 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 > 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 >
RE: no action mapped for namespace
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 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
Re: no action mapped for namespace
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 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 > -- Ing. Luis Martín Canaval Sánchez Keep it small and simple.
Re: no Action mapped for namespace / and action name doLogin.
Guyz Any suggestions Please -- View this message in context: http://old.nabble.com/RE%3A-no-Action-mapped-for-namespace---and-action-name-doLogin.-tp26510748p26512263.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: no Action mapped for namespace / and action name doLogin.
Declare namespace attribute for action mapping as "/" Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: no Action mapped for namespace / and action name doLogin.
hi raghuveer, I tried with ur suggestions but still I am getting the same error. Please help me!!! -- View this message in context: http://old.nabble.com/RE%3A-no-Action-mapped-for-namespace---and-action-name-doLogin.-tp26510748p26511382.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: no Action mapped for namespace / and action name doLogin.
Hello Vikrant, Alternatively try submitting form through javascript function. <%@ taglib prefix="s" uri="/struts-tags" %> Struts 2 Login Application " rel="stylesheet" type="text/css"/> function fnSubmit(){ document.forms[0].action="doLogin.action"; document.forms[0].submit(); } Login Regards, Raghuveer Vellanki -Original Message- From: Raghuveer.V [mailto:raghuve...@infotechsw.com] Sent: Wednesday, November 25, 2009 4:19 PM To: 'user@struts.apache.org' Cc: 'shimpi.vikr...@gmail.com' Subject: RE: no Action mapped for namespace / and action name doLogin. Hello Vikrant, Very minor issue, I have reviewed your code and don't find any error. Your xml configurations says you need to call default execute() in com.tcs.infra.cmt.Login.java. This should work on all servers. I have tested a similar code in Tomcat and web sphere. If you don't mention any namespace, it considers default package whose namespace is as below in struts.xml. You need to review your code either in 1. Action mapping in struts.xml 2. Action class implementing any specific interceptors. In your struts.xml file change the following properties as below and test. struts.devMode to true helps you to debug faster with enough logging information. struts.enable.DynamicMethodInvocation=true struts.devMode=true Regards, Raghuveer Vellanki -Original Message- From: vikrant S [mailto:shimpi.vikr...@gmail.com] Sent: Wednesday, November 25, 2009 12:57 PM To: user@struts.apache.org Subject: Re: no Action mapped for namespace / and action name doLogin. No configuration found for the specified action under struts2.0.11 Hi all, I am using jboss v5.0 and my login.jsp is %@ taglib prefix="s" uri="/struts-tags" %> Struts 2 Login Application " rel="stylesheet" type="text/css"/> Login and my struts.xml is http://struts.apache.org/dtds/struts-2.0.dtd";> /login.jsp /login.jsp /loginsuccess.jsp and my web.xml is like this http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";> Sample Struts 2 struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecut eFilter struts2 /* login.jsp getting the following error There is no Action mapped for namespace / and action name doLogin. at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1 77) at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsAct ionProxyFactory.java:39) at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultA ctionProxyFactory.java:47) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:458) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOper ations.java:77) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilt er(StrutsPrepareAndExecuteFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja va:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci ationValve.java:190) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java: 92) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(
RE: no Action mapped for namespace / and action name doLogin.
Hello Vikrant, Very minor issue, I have reviewed your code and don't find any error. Your xml configurations says you need to call default execute() in com.tcs.infra.cmt.Login.java. This should work on all servers. I have tested a similar code in Tomcat and web sphere. If you don't mention any namespace, it considers default package whose namespace is as below in struts.xml. You need to review your code either in 1. Action mapping in struts.xml 2. Action class implementing any specific interceptors. In your struts.xml file change the following properties as below and test. struts.devMode to true helps you to debug faster with enough logging information. struts.enable.DynamicMethodInvocation=true struts.devMode=true Regards, Raghuveer Vellanki -Original Message- From: vikrant S [mailto:shimpi.vikr...@gmail.com] Sent: Wednesday, November 25, 2009 12:57 PM To: user@struts.apache.org Subject: Re: no Action mapped for namespace / and action name doLogin. No configuration found for the specified action under struts2.0.11 Hi all, I am using jboss v5.0 and my login.jsp is %@ taglib prefix="s" uri="/struts-tags" %> Struts 2 Login Application " rel="stylesheet" type="text/css"/> Login and my struts.xml is http://struts.apache.org/dtds/struts-2.0.dtd";> /login.jsp /login.jsp /loginsuccess.jsp and my web.xml is like this http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";> Sample Struts 2 struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecut eFilter struts2 /* login.jsp getting the following error There is no Action mapped for namespace / and action name doLogin. at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1 77) at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsAct ionProxyFactory.java:39) at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultA ctionProxyFactory.java:47) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:458) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOper ations.java:77) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilt er(StrutsPrepareAndExecuteFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja va:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci ationValve.java:190) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java: 92) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(Secu rityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(Secur ityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102 ) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnecti onValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http 11Protocol.java:601) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run
Re: no Action mapped for namespace / and action name doLogin.
No configuration found for the specified action under struts2.0.11 Hi all, I am using jboss v5.0 and my login.jsp is %@ taglib prefix="s" uri="/struts-tags" %> Struts 2 Login Application " rel="stylesheet" type="text/css"/> Login and my struts.xml is http://struts.apache.org/dtds/struts-2.0.dtd";> /login.jsp /login.jsp /loginsuccess.jsp and my web.xml is like this http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";> Sample Struts 2 struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /* login.jsp getting the following error There is no Action mapped for namespace / and action name doLogin. at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177) at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39) at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:458) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) I am not able to understand while I am getting this error . Please help me out of this?? -- View this message in context: http://old.nabble.com/no-Action-mapped-for-namespace---and-action-name-doLogin.-tp26508228p26508528.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org