• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

HTTP Status 404 - There is no Action mapped for namespace [/] and action name [LoginForm] associated

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to create a dynamic web project with struts2. Below are the pages I've used:
web.xml:


struts.xml


index.jsp


Action class:


Form class:


The project struture is given below.

When I run index,jsp, the page gets displayed properly, but after hitting the submit button, I get an error : 'HTTP Status 404 - There is no Action mapped for namespace [/] and action name [LoginForm] associated with context path' and the url displayed is : http://localhost/SampleProject/LoginForm
Pic.png
[Thumbnail for Pic.png]
Project Struture
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think its because your action "product" is not found..

a
 
Bosch Vaklor
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops...that was a mistake! I've updated the struts.xml!
 
Ranch Hand
Posts: 93
Python Redhat Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just curious to know, did you refer any articles or created the project on your own?

And fyi, Struts 2 doesnt need ActionForm, ActionForward, ActionMapping, etc.. And the execute() method in Action can be a plain method with no arguments and returning a string. I guess may be you are mixing Struts 1 and Struts 2 here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!