You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by aum strut <au...@gmail.com> on 2009/03/01 18:45:45 UTC
No Action mapped for namespace
HI All,
i am facing action mapping problem and unable to figure it out where ia m
doing wrong. i have a login.jsp page where there are only 2 fileds a loinid
and password field
i am using AJAX call for user login below is the code from my login.jsp page
<s:form name="Login" id="Login" >
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left">
<input type="text" id="form_loginname" name="form_loginname"
class="searchQuery"
size="20" value="" ONKEYDOWN="javascript:return displayKeyCode(event)"/>
</td>
<td align="left"><input id="form_pw" name="form_pw" size="20"
class="searchQuery"
type="password" ONKEYDOWN="javascript:return displayKeyCode(event)"/></td>
</tr>
<tr>
<td width="58"><input type="button" name="login" class="butlogin" id="Login"
value=" " onclick="return submitForm()" /></td>
</tr></s:form>
i am using the following javascript code to submit my form
if(o.responseText=="SUCCESS"){
document.Login.action="Welcome.action";
document.Login.submit();
}
it is able to validate the user input from the database. in the struts.xml
file i have defined the Welcome action as follows:
<struts>
<package name="PublicUserAccess" namespace="/secured" extends=
"struts-default">
<action name="LoginForm">
<result>/index.jsp</result>
</action>
</package>
<package name="com.raisonne.billsmart.user.action" extends="ssl-default">
<result-types>
<result-type name="customXML"
class="com.raisonne.billsmart.customresulttypes.CustomXMLResultType"
/>
</result-types>
<interceptors>
<interceptor name="authenticationInterceptor"
class="com.raisonne.billsmart.utl.AuthenticationInterceptor"
/>
<interceptor-stack name="SecureStack">
<interceptor-ref name="authenticationInterceptor" />
<interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
<global-results>
<result name="login" type="redirect">
/LoginForm.action
</result>
</global-results>
<action name="Welcome">
<result name="success">/Templates/User/CustomerRegistrationFrame.jsp</result
>
</action>
</package>
</struts>
but it is giving me the following error:
Could not find action or result There is no Action mapped for namespace /
and action name Welcome here is the error stacjk trace for refrence
07:55:54,937DEBUG com.opensymphony.xwork2.DefaultActionProxy {1}:65
-Creating an DefaultActionProxy for namespace / and action name Welcome
07:55:54,953ERROR org.apache.struts2.dispatcher.Dispatcher {1}:512 -Could
not find action or result
There is no Action mapped for namespace / and action name Welcome. -
[unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(*
DefaultActionProxy.java:186*)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(*
StrutsActionProxyFactory.java:41*)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(*
Dispatcher.java:494*)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(*
FilterDispatcher.java:419*)
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:230*)
at org.apache.catalina.core.StandardContextValve.invoke(*
StandardContextValve.java:175*)
at org.apache.catalina.core.StandardHostValve.invoke(*
StandardHostValve.java:128*)
at org.apache.catalina.valves.ErrorReportValve.invoke(*
ErrorReportValve.java:104*)
at org.apache.catalina.core.StandardEngineValve.invoke(*
StandardEngineValve.java:109*)
at org.apache.catalina.connector.CoyoteAdapter.service(*
CoyoteAdapter.java:261*)
at org.apache.coyote.http11.Http11Processor.process(*
Http11Processor.java:844*)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(*
Http11Protocol.java:581*)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(*JIoEndpoint.java:447*)
at java.lang.Thread.run(Unknown Source)
07:55:54,953DEBUG com.opensymphony.xwork2.config.ConfigurationManager
{1}:156 -Checking ConfigurationProviders for reload.
if any one any cluue where things are going wrong pleaes suggest
thanks in advance
-s