This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

There is no Action mapped for namespace / and action name ExampleAction. - [unknown location]

 
Varun Nambuthiri
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I know this question has been asked a lot of times . But I have tried all of the options and none of them actually work . So please help me .

These are the files ..

web.xml



struts.xml



ExampleAction.java



I cant add the screenshot of the project explorer . Please tell me how I can add that too if needed

Thanks and Regards
Varun
 
Varun Nambuthiri
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have got the solution . It was buggin me to no end why I was not able to call the action . Then I realized that the action name in the struts.xml was not the same as my action class name .

Thank you
Varun
 
Varun Nambuthiri
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It so happens that , it was not the solution . I somehow managed to get it running again and then something made the Error pop up again . And So the issue is still at large

Help me !

Thanks and Regards
Varun
 
Joe Ess
Bartender
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I marked this unresloved. Are you getting the exact same error? I'd be suspicious of how you build and deploy your code. It sounds like you haven't gotten the new struts.xml on the server.
If it is not the exact same error, post your current code and the error message.
 
Varun Nambuthiri
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There is no change in the error .

Thanks and Regards
Varun
 
Joe Ess
Bartender
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess wrote: I'd be suspicious of how you build and deploy your code. It sounds like you haven't gotten the new struts.xml on the server.
 
Varun Nambuthiri
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
New struts.xml ? I have a struts.xml which is placed under the src folder . Why would I need a new one . I am a little confused here as to what you intend to point here

Joe Ess wrote:
I'd be suspicious of how you build and deploy your code. It sounds like you haven't gotten the new struts.xml on the server.
 
Varun Nambuthiri
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am getting a problem in the Console .. which does not look good .


SEVERE: Exception starting filter struts2
Action class [com.Struts2Example.action.Struts2Example]
not found - action - file:/E:/HibernateStruts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Example/WEB-INF/classes/struts.xml:12:82
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:374)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:329)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:429)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

I check the location manually and the class file and also the struts.xml is sitting there .

Thank you
Varun
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic