Error: No configuration found for the specified action
Nash Wembley
Greenhorn
Joined: Sep 05, 2003
Posts: 7
posted
0
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.
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
posted
0
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.