This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

There is no Action mapped for namespace / and action name

 
nisha Sham
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a very small struts application,when i click on particular link i get the following error, I am using struts2

WARNING: Could not find action or result
There is no Action mapped for namespace / and action name veggieAction. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:178)


Struts.xml
<package name="default" extends="struts-default" >
<action name ="veggieAction" class="veggieActionBean">
<result name="veggiehome" type="redirect">veggie.jsp</result>
</action>
</package>
I also tried adding namespace.

application context xml
<bean id="veggieActionBean" class="com.expense.signon.TopLayoutAction">
<property name="textprovider" value="VeggieProvider"></property>
</bean>

topMenu1.jsp


Can sombody tell me where am i goign wrong

Thanks

<a href="<s:url action="veggieAction"/>" > VEGGIE

 
Jitmer Jijo
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might be as simple as addiing a "/" infront of the action name as below.
<a href="<s:url action="/veggieAction"/>" > VEGGIE

or

<s:form action="/fileUploadAction" method="POST" enctype="multipart/form-data">

This could fix the "There is no Action mapped for namespace" error
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic