struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Pontarelli (JIRA)" <>
Subject [jira] Commented: (WW-1291) Centralize location for all template files include JavaScript
Date Sat, 02 Dec 2006 16:33:57 GMT
    [ ] 
Brian Pontarelli commented on WW-1291:

It has been far too long for me to recall all the details on this issue. The only thing that
I can recall is that the search path for FTL files is different than those for JS files. If
WebWork is looking for a template it looks in the /template/<theme> for overrides and
then in classpath. When it looks for JS files it searches the classpath only. So, overrides
need to be placed in the /WEB-INF/classes directory since this ends up in the web application
classpath prior to the webwork JAR files.

I see your point about changing the JS URL in the FTL file to NOT use the /struts namespace,
but if I want to use a theme (say XHTML) and don't need to tweak it at all, it would be nice
to have the ability to override JS files in the same manner as I can override FTL files, by
placing them in the /template/<theme> and it searches there first and then falls back
to the classpath. This would standardize the override method for both types of files.

> Centralize location for all template files include JavaScript
> -------------------------------------------------------------
>                 Key: WW-1291
>                 URL:
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Views
>    Affects Versions: WW 2.2.2
>            Reporter: Brian Pontarelli
>         Assigned To: Don Brown
>             Fix For: Future
> Currently, WebWork loads the FTL files from either the JAR or the template directory
in the web application. However, it loads the JavaScript files from the classpath using a
prefix based search. This forces custom JavaScript files to be placed into the WEB-INF/classes/template
directory rather than with the custom FTL files in the web application directory. These two
ways to customize WebWork should be combined so that it is all standard.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message