This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all! First let me say I'm embarrassed that I even need to ask this question as I thought I should have found a solution by now.
We have many Struts actions (188.8.131.52) all in the same package and our struts.xml file uses one <action> w/ a wildcard to handle all of the mappings (see below). We want to re-organize our Struts actions into subpackages and thought we'd have one <action> per subpackage. For the life of me, we cannot get this to work. Below is our current configuration followed by some changes we attempted based on the documentation and posts I ran into. I appreciate all help.
The struts.xml file:
Now we have some Struts actions in /com/mycompany, /com/mycompany/aaa, /com/mycompany/bbb, etc.
#1: The struts.xml file:
Changed actionName values to 'aaa/GetAbc' so Ajax.Request is now '/s/aaa/GetAbc.action'.
RESULT: On post of http://server:port/MyApp/viewer/s/aaa/GetAbc.action, Unable to instantiate Action, com.mycompany.GetAbcAction, defined for 'GetAbc' root cause ClassNotFoundException for com.mycompany.GetAbcAction. Seems like it's still matching on "*" pattern. Don't understand why it's not matching later pattern. Tried defining "aaa/*" pattern before and after "*" w/ same result. Eventually found documentation that said when 1+ patterns match, last wins.