Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[org.apache.struts2.dispatcher.Dispatcher] Could not find action or result Error

 
peter wong ka chon
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all, i tried to code the following simple struts but encounter this error during run time.



index.jsp


LoginAction.java


web.xml


Besides the runtime error, there is deployment error which is


AFAIK, the scanning methodology of struts will scan the default packages named struts2 for any annotated class but i have instructed struts2 to scan in com.peter.action using init-param but still unable to find the class. It is pretty weird.

Please help.

Thanks.
 
Runrioter Wung
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,I think you should add a file named "struts.xml" in the path of "WEB-INF/classes"
 
peter wong ka chon
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Runrioter Wung wrote:Hi,I think you should add a file named "struts.xml" in the path of "WEB-INF/classes"


I using annotation approach rather than xml mapping approach.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic