• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Action configuration problem in Struts 2

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm getting this error message when running a JSP in struts 2. The struts.xml file is in the correct place, /src:

There is no Action mapped for namespace /jsp/my-app/screenscrape and action name runFinancialAlerts. - [unknown location]

My action configuration in my struts.xml looks like this:

<action name="runFinancialAlerts" class="com.bizbuz.myApp3.web.actions.FinaAlertsAction">
<result type="tiles">earningsAlerts.page</result>
</action>

The name space shown in the error message is the directory where the jsp that runs the action is located.

Thank you, sky
 
Sheriff
Posts: 9709
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You must be directly accessing the JSP and the URL to the Struts action must be relative. This is why the generated request is for /jsp/my-app/screenscrape/runFinancialAlerts. Without looking at your JSP code its hard to know the fix, but generally a path relative to the root with the context path added in the beginning should do it, something like this

${pageContext.request.contextPath}/runFinancialAlerts.action
 
Let's go to the waterfront with this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic