Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Please see http://cwiki.apache.org/WW/convention-plugin.html for more details - we are planning to switch to the Conventions plugin as it is a superior action mapping tool than the previous version (2.1.2) of Struts that we were using. However, there is currently a bug in XWork 2.1.2 (or OGNL, not sure yet) that has not been fixed yet, see https://issues.apache.org/struts/browse/WW-2971 for more details.'ve switched to Conventions plugin.

There are currently two ways to map actions in the Struts 2 version of tDAR:

  1. Explicit mapping in WEB-INF/classes/struts.xmlyour action class.
  2. implicit mapping in the filesystem, where a .ftl or .jsp file in src/main/webapp is parsed and delivered for content.
    Info
    titleImplicit mapping example

    If you create a file, test.ftl in the src/main/webapp/blougat directory, then you should be able to see the contents of that file at http://localhost:8080/tdar/blougat/test

...

titleDeprecated

Notes: Using custom org.tdar.struts.TdarActionMapper - tried to get CompositeActionMapper working to map the empty action context but was unsuccessful (and documentation on the Struts site is inaccurate). TdarActionMapper is basically the same thing as the Restful2ActionMapper, just set up so that we can understand the process of action mapping more closely. Subsequent changes in Struts action mapping, e.g., the Conventions plug-in, should be monitored and patched with TdarActionMapper (or replace it entirely).

...

Implementation

Consider using Spring Webflow for resource editing and registration. Goal is to have a TurboTax-like workflow.

...

Spring uses JDK dynamic proxies by default, which means that any autowired proxied class (i.e., the *Service classes, etc.) get gets injected with the interface type, not the concrete class. For example, if UniqueEmailValidator wants a PersonService to talk to, it will only get a Service from Spring unless explicitly wired. In order to overcome this, need to set make sure

<tx:annotation-driven proxy-target-class='true' />

is specified in the spring configuration.

External links to Struts 2 documentation

...