I'm running into a strange issue with struts modules and I want to verify
the correct way to implement struts...

Let say I have an Action Form named MyForm, an Action named MyAction and an
input page named MyPage.jsp.

I believe the correct order of operations would be to make the initial
request to MyPage.jsp built with struts taglibs to populate form elements
from the MyForm object.

The user would enter data into the HTML form which would then be posted to
/MyAction.do and processed by the MyAction class.  After processing the
MyAction class forwards either to the MyPage.jsp for rendering more html or
some other forward...

If my order of events, is flawed please let me know since this sequence only
appears to work for the default struts-config.xml and not for any module
configurations.  If I make a request directly to a jsp page that is
associated with an action in a module, the html taglibs are unable to locate
the form and action mappings required.  

As a hack to work around this, all initial requests for modules are made
directly to the action via a *.do request.  The associated action form
contains a string that is connected to the submit button in order to
determine if the action is being processed in response to an action form
submission or an initial request.  Without this extra string I cannot
determine whether the user is submitting data or simply navigated to the
url.   I'm am unsure if this is a bug or user error.

Thanks for the assistance,
-Nick


Reply via email to