StrutsCatalog: Link only to Actions

In a Model 2 environment, the pages are supposed to be pretty but stupid. Flow to a page should go through an Action first, and the Action should assemble all the data that a page might need and put it into the request or session context. The page then just grabs what it needs, and figures out how to display it. The Action may not know the address of the page (that's in the config file), but it does need a punch list of what data the page may require. Every page should have an Action handler. One Action may handle several different pages, or a page could be handled by several different Actions (e.g. an error page), but each page should have at least one handler.

If a JSP ends up on your browser's address bar after the initial index page, then you're missing an Action (wink)

TedHusted

Related errors

If the Application is split in to different modules and if the flow goes to the JSP, with an <html:form> tag, an exception such as Cannot retrieve mapping for Action /action can be thrown, if the <html:form> tag's action path is referencing an action in a submodule.

See more: ErrorCannotRetrieveMappingForAction

  • No labels