Struts 2 Configuration Files Path


If you are a first time developer who start working on the Struts 2 application, you would have got the below exception and no clue how to fix this problem. This error is thrown because your struts 2 application not able to read your configuration file struts.xml. In any other frameworks we keep the configuration files under the WEB-INF folder which will be taken automatically.

But, in struts 2, by default the configuration file struts.xml is looked at WEB-INF/classes folder. It resolve this problem, copy the struts.xml file directly under the source folder like below screenshot. It is always should be inside the classpath of the project.

Struts 2 Project Structure

Struts 2 Project Structure

Dec 12, 2013 11:57:48 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger warn
WARNING: Could not find action or result
There is no Action mapped for namespace / and action name hello. - [unknown location]
 at com.opensymphony.xwork2.DefaultActionProxy.prepare(
 at org.apache.struts2.impl.StrutsActionProxy.prepare(
 at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(
 at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(
 at org.apache.struts2.dispatcher.Dispatcher.serviceAction(
 at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(
 at org.apache.catalina.core.StandardWrapperValve.invoke(
 at org.apache.catalina.core.StandardContextValve.invoke(
 at org.apache.catalina.core.StandardHostValve.invoke(
 at org.apache.catalina.valves.ErrorReportValve.invoke(
 at org.apache.catalina.authenticator.SingleSignOn.invoke(
 at org.apache.catalina.core.StandardEngineValve.invoke(
 at org.apache.catalina.connector.CoyoteAdapter.service(
 at org.apache.coyote.http11.Http11Processor.process(
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(

Struts 2 Configuration Files Locations

Struts 2 Configuration Files Path



About Krishna Srinivasan

He is Founder and Chief Editor of JavaBeat. He has more than 8+ years of experience on developing Web applications. He writes about Spring, DOJO, JSF, Hibernate and many other emerging technologies in this blog.

Speak Your Mind


Please support the site
By clicking any of these buttons you help our site to get better