aspose file tools*
The moose likes Struts and the fly likes Unhandled Exception while run the struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Unhandled Exception while run the struts" Watch "Unhandled Exception while run the struts" New topic
Author

Unhandled Exception while run the struts

Maheswaran Devaraj
Ranch Hand

Joined: Sep 14, 2007
Posts: 47
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
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

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 !


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Maheswaran Devaraj
Ranch Hand

Joined: Sep 14, 2007
Posts: 47
Thanks for your reply. I wrote the following code in my struts.xml.



Regards,
Maheswaran
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Have you checked where is your 'struts.xml ' file is saved , Store it into source package !
Maheswaran Devaraj
Ranch Hand

Joined: Sep 14, 2007
Posts: 47
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unhandled Exception while run the struts
 
Similar Threads
action mapped error
struts Action mapped error
There is no Action mapped for action name HelloWorld. - [unknown location]
Resource not found
There is no Action mapped for namespace / and action name . - [unknown location]