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:
JSP2 i.e. dataassetbreakFix.jsp gets loaded.
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?
Joined: Sep 05, 2003
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.