Using struts 1.1 (on Websphere 5.1.1), I'm trying to create struts *modules*. I ran into the following problem: the <html:form> tag fails to find the module-specific action. It *does* work fine with normal (non-struts) HTML forms. Could anyone please advise what I'm doing wrong ?
Steps I've taken: 1. Created a strutes module called "module1", with config file "struts-module1.xml". It has an action mapping:
3. Now, this form (normal HTML) works fine !
4. But the equivalen struts html:form fails (error message: Cannot retrieve mapping for action /add):
Could anyone please advise ? Thanks very much.
Joined: Nov 13, 2002
Sorry, the last for was of course "add" rather than "addEmployee":
The config file can be named chicken-little.xml if it is defined in the web.xml properly. It doesn't matter.
The reason why it can not find the action is that Struts can only think in one module at a time. If you do not specify a different module, it will assume that you mean to stay in the same module. If you've never specified a module, it sticks with the default module. I believe that if you include the module name in your html:form action attribute, it will solve the issue.