[ http://issues.apache.org/jira/browse/VELOCITY-407?page=all ]
Daniel Rall updated VELOCITY-407:
---------------------------------
Summary: Templates vs. static content should be resolvable via file
naming pattern (was: Templates should follow the double extension naming
convention)
Description:
The VelocityViewServlet.getTemplate() method should append ".vtl"
to the URI by default (and only handle .vtl files in its servlet-mapping
clause).
So, a request http://www.foo.com/bar.html would map :
1. to a template bar.html.vtl if found
2. to a regular html file bar.html otherwise
Beyond the first basic samples, any webapp will need such a behaviour.
So all application designers will have to subclass VelocityViewServlet to do it.
Why not then incorporate it by default ? It looks rather important to me. Having
to subclass the VelocityViewServlet for each and every project is really silly.
Since there is a backward compatibility issue, one could trigger the behaviour
with
a configuration flag and wait for the tools 2.0 to have the default changed.
was:
The VelocityViewServlet.getTemplate() method should postpone ".vtl"
to the URI by default (and only handle .vtl files in its servlet-mapping
clause).
So, a request http://www.foo.com/bar.html would map :
1. to a template bar.html.vtl if found
2. to a regular html file bar.html otherwise
Beyond the first basic samples, any webapp will need such a behaviour.
So all application designers will have to subclass VelocityViewServlet to do it.
Why not then incorporate it by default ? It looks rather important to me. Having
to subclass the VelocityViewServlet for each and every project is really silly.
Since there is a backward compatibility issue, one could trigger the behaviour
with
a configuration flag and wait for the tools 2.0 to have the default changed.
--
Claude
Priority: Minor (was: Major)
This is extremely specific to a single use case. It sounds like it might be
reasonable as a supporting tool, but has no place as the default behavior, nor
really even as a configuration option. Please re-word the request, or close as
WONTFIX.
> Templates vs. static content should be resolvable via file naming pattern
> -------------------------------------------------------------------------
>
> Key: VELOCITY-407
> URL: http://issues.apache.org/jira/browse/VELOCITY-407
> Project: Velocity
> Type: Wish
> Components: Tools
> Versions: Tools-1.2
> Environment: all
> Reporter: Claude Brisson
> Priority: Minor
>
> The VelocityViewServlet.getTemplate() method should append ".vtl"
> to the URI by default (and only handle .vtl files in its servlet-mapping
> clause).
> So, a request http://www.foo.com/bar.html would map :
> 1. to a template bar.html.vtl if found
> 2. to a regular html file bar.html otherwise
> Beyond the first basic samples, any webapp will need such a behaviour.
> So all application designers will have to subclass VelocityViewServlet to do
> it.
> Why not then incorporate it by default ? It looks rather important to me.
> Having
> to subclass the VelocityViewServlet for each and every project is really
> silly.
> Since there is a backward compatibility issue, one could trigger the
> behaviour with
> a configuration flag and wait for the tools 2.0 to have the default changed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]