• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

There is no Action mapped for namespace / and action name

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic