• 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

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: 9707
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic