Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2146

Codebehind only looks for templates in the web root, not in the class path

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.9
    • 2.1.0
    • Plugin - Mechanism
    • None
    • Patch

    Description

      Normally, Struts 2 will look for templates (Freemarker, Velocity) first in the web root, then in the class path. This allows templates to be bundled with a JAR, but overridden in the web root. When using Codebehind, however, it only looks for the templates in the web root, disabling a valueable Struts 2 feature. The following patch to CodebehindUnknownHandler.java fixes this issue, though it has only been tested with Freemarker. It has not been tested with Velocity, and it does attempt to look for JSPs in the classpath, which may not be appropriate.

      Attachments

        Activity

          People

            mrdon Donald J. Brown
            jimothy Jim Cushing
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: