• 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

Unhandled Exception while run the struts

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I'm new to struts. I'm using struts 2.0.6 version. I simply created a HelloWorld program, while running it It cause the following error. Can any one help me resolve this




Struts Problem Report

Struts has detected an unhandled exception:
# Messages: There is no Action mapped for action name HelloWorld.
Stacktraces
There is no Action mapped for action name HelloWorld. - [unknown location]

com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
java.lang.Thread.run(Unknown Source)




Regards,
D.Maheswaran
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Maheshwaran Devaraj:

Struts has detected an unhandled exception:
# Messages: There is no Action mapped for action name HelloWorld.
Stacktraces
There is no Action mapped for action name HelloWorld. - [unknown location]



The exception says it all, Have you crated the Action class which assigned to name "HelloWorld" ..

something like this in your 'struts.xml ; ,



and make sure that you placed the xml in classpath !
 
Maheswaran Devaraj
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply. I wrote the following code in my struts.xml.



Regards,
Maheswaran
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you checked where is your 'struts.xml ' file is saved , Store it into source package !
 
Maheswaran Devaraj
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Sagar Rohankar. I placed my struts.xml file inside of the webcontent directory. Now I moved it to the src directory ,now the program is running successfully. Than you.

Regards,
Maheswaran
 
reply
    Bookmark Topic Watch Topic
  • New Topic