You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/08/15 12:18:53 UTC

DO NOT REPLY [Bug 22452] New: - form action cannot be found if modules are used

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22452>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22452

form action cannot be found if modules are used

           Summary: form action cannot be found if modules are used
           Product: Struts
           Version: 1.1 Final
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Custom Tags
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: joostdenboer@hotmail.com


I created a webapplication with a struts module. Inside the module, I created 
a form with bean and action. (I use EasyStruts plugin to edit the config and 
create classes).
When I tested the form, the form .jsp page could not be displayed because the 
action defined in the <html:form/> could not be found. I double checked it 
hundreds of times, and the config is correct.
I then debugged the code and detected that when doing a lookup() in the doStart
() method of the tag-class always gets the default (root) module. So it's 
logical it cannot find the action, because it's defined in another module.

I looked at how to fix this and I applied the following change :
In org.apache.struts.util.RequestUtils.getModuleConfig(HttpServletRequest 
request, ServletContext context) I added this line as the first statement of 
the method:

// first select correct module. Needed for html:form to get correct config
selectModule(request, context);

After this, I compiled and tested again. Now the action can be found and 
the .jsp page is displayed.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org