Nick, Your "hack" is actually the correct way to go about it. You should never directly access a JSP in Struts. See the example app that is included with Struts for clarification. Here is the correct order of events:
- MyAction grabs JSP (using a forward) and displays it to the user. - User fills in form and Submits. - Action looks at the url, determines which Form to use, and populates the data into that form and calls execute on the appropriate Action (MyAction). - MyAction.execute() now has access to the data that is in the ActionForm that is passed in. Carl Quoting Nick Coleman <[EMAIL PROTECTED]>: > 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 > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]