• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1252
  • Last Modified:

Problem mapping an Action to a namespace

I am trying to get an action in a Struts 2 app to work but I am coming up with this error in my console.  Is there any known fix for this?

There is no Action mapped for namespace /jsp/myApp/screenscrape and action name runEarningsAlerts. - [unknown location]
  • 2
  • 2
1 Solution
Check your struts-config.xml file to see that you have something similar to this:

            <form-bean name="searchForm"
            <action path="/Search"
                        type="org.SearchAction" >
                  <forward name="Status" path="/status.jsp"/>
                  <forward name="NotFound" path="/login.jsp"/>

Where type="org.SearchAction" defines your action class
jwright9Author Commented:
ProgSysAdmin, Thanks for your response but I am using the struts 2  struts.xml format for my configuration.
I'm sorry.  Here is a snippet of Struts 2 struts.xml code that I found which I modified to fit what you are doing.  The main thing in correcting your error "[unknown location]" is in the class="" section of your file needs to be a valid java class.  I hope this helps.

<?xml version="1.0" encoding="UTF-8" ?>
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"


<package name="earningsAlerts" namespace="/jsp/myApp/screenscrape" extends="struts-default">

<action name="runEarningsAlerts" class="jsp.myApp.screenscrape.EarningsAlerts">


Open in new window

jwright9Author Commented:
I tried your code but I got the same result.  I know yours should work.  So I'll accept yours.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now