Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.9
-
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.