Issue Details (XML | Word | Printable)

Key: WW-676
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Mathias Bogaert
Reporter: jezbum
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

Freemarker Support:TemplatePath in web.xml has no effect

Created: 18/Nov/04 03:41 AM   Updated: 23/Nov/04 07:49 AM
Component/s: Views
Affects Version/s: 2.1.5
Fix Version/s: 2.1.7

Environment:
tomcat 5.0.18
webwork 2.1.5


 Description  « Hide
The documentation says to set the init-param of the freemarker servlet to:
<init-param>
<param-name>TemplatePath</param-name>
<param-value>/</param-value>
</init-param>

try to change this to
<init-param>
<param-name>TemplatePath</param-name>
<param-value>/WEB-INF/views</param-value>
</init-param>

and the webapp ceases to work with a tomcat resource not found exception

For a quick fix, please modify FreemarkerManager.getTemplateLoader() and add this to the TemplateLoader array being passed to the MultiTemplateLoader constructor:

new FileTemplateLoader(new File(servletContext.getInitParameter("TemplatePath"))),

hope it helps some.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.