File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Error: No configuration found for the specified action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error: No configuration found for the specified action " Watch "Error: No configuration found for the specified action " New topic
Author

Error: No configuration found for the specified action

Nash Wembley
Greenhorn

Joined: Sep 05, 2003
Posts: 7
Hi,

I am encountering the following on submit of JSP page.

No configuration found for the specified action: '/ACFWeb/acf/breakFixDataAssetSearchResults' in namespace: '/jsp'

This is what I am doing:
  • I have a JSP page say JSP1 which is in namespace "acf" and this page is one of the results of action class Action1. On submit of JSP1 I try to load JSP2. The "submit" javascript function of JSP1 has the following line of code.



  • JSP2 i.e. dataassetbreakFix.jsp gets loaded.
  • Now on submit of JSP2, I am unable to invoke the action class for rendering another page JSP3 and the aforementioned error is displayed in the server log. Below is the Javascript Submit function of JSP2




  • Please note that:
  • All JSP's are inside the folder named "jsp"
  • There is only one namespace i.e. "acf".
  • There is no action class associated with JSP2 and therefore is invoked directly by JSP1


  • My Struts.xml file:


    What is going wrong here? Why the Struts framework keeps looking for non-existing namespace "jsp" when actually all actions classes are within "acf" namespace.
    David Newton
    Author
    Rancher

    Joined: Sep 29, 2008
    Posts: 12617

    Probably because you're directly accessing a JSP (considered a poor practice, especially when it's trivial to avoid it) so it's messing up the link. Without the JSP code it's impossible to help beyond a guess.

    Directly accessing JSPs in a Struts 2 app breaks the encapsulation offered by the framework--is there any particular reason you're doing it?
    Nash Wembley
    Greenhorn

    Joined: Sep 05, 2003
    Posts: 7
    Thanks for your reply David. Yes what you said did come to my mind. I thought Struts would figure out by itself & this strategy looked pretty harmless to me. I simply wanted to avoid having another Action class in order to render JSP2. Maybe I was thinking that by directly accessing JSP2 the request would be processed faster.

    I still feel the framework shouldn't be so stringent and should give us developers some flexibility for such scenarios.

    Anyways I will try to stick to the norm.
    David Newton
    Author
    Rancher

    Joined: Sep 29, 2008
    Posts: 12617

    For me the safety and regularity of this:far outweighs the "overhead" of calling an empty action (pretty cheap in Java).
     
    Don't get me started about those stupid light bulbs.
     
    subject: Error: No configuration found for the specified action
     
    Similar Threads
    Action Mapping error with Struts 2.1.x
    Setting window size on load
    Help: Getting Error Message "Not able to load configuration for specified action"
    how to transfer Object or request between jsp??help??
    struts2: howto correctly deligate actions on the struts.xml's include files