incubator-freemarker git commit: FREEMARKER-55: Adding changelog (up to now) about spring support

2017-07-14 Thread woonsan
Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 5b856d3a5 -> ce9ab30f2


FREEMARKER-55: Adding changelog (up to now) about spring support


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/ce9ab30f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/ce9ab30f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/ce9ab30f

Branch: refs/heads/3
Commit: ce9ab30f29531e02cc2eb81f64be7a8eabe43236
Parents: 5b856d3
Author: Woonsan Ko 
Authored: Fri Jul 14 13:56:04 2017 -0400
Committer: Woonsan Ko 
Committed: Fri Jul 14 13:56:04 2017 -0400

--
 FM3-CHANGE-LOG.txt | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ce9ab30f/FM3-CHANGE-LOG.txt
--
diff --git a/FM3-CHANGE-LOG.txt b/FM3-CHANGE-LOG.txt
index 1791868..e502498 100644
--- a/FM3-CHANGE-LOG.txt
+++ b/FM3-CHANGE-LOG.txt
@@ -300,4 +300,10 @@ the FreeMarer 3 changelog here:
 - Inside a #switch, #case can't be after #default anymore (this is actually a 
bug in FM2)
   (The template converter can't fix this automatically, but reports it as an 
error.)
 - #else and #elseif tags must be ended without "/", for example, <#else/> is 
illegal now, <#else> is legal.
-  (The template converter tool does this conversion.)
\ No newline at end of file
+  (The template converter tool does this conversion.)
+- Spring Framework Support (freemarker-spring): FREEMARKER-54, FREEMARKER-55
+  - ConfigurationFactoryBean, a new Spring Framework's FactoryBean to create 
Configuration, using Builder.
+  - SpringResourceTemplateLoader, a new TemplateLoader to load templates from 
Spring Framework's Resources.
+  - New FreeMarkerView and FreeMarkerViewResolver for MVC support. 
FreeMarkerView supports TaglibFactory and other
+models by default like FreemarkerServlet does.
+



incubator-freemarker git commit: FREEMARKER-55: Renaming Freemarker to FreeMarker

2017-07-14 Thread woonsan
Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 aaa100c0c -> 5b856d3a5


FREEMARKER-55: Renaming Freemarker to FreeMarker

This closes #28


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/5b856d3a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/5b856d3a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/5b856d3a

Branch: refs/heads/3
Commit: 5b856d3a5f4e437e2f83055ea1c06c8fb49f4a00
Parents: aaa100c
Author: Woonsan Ko 
Authored: Fri Jul 14 11:27:17 2017 -0400
Committer: Woonsan Ko 
Committed: Fri Jul 14 11:49:22 2017 -0400

--
 .../spring/web/view/AbstractFreeMarkerView.java | 170 ++
 .../spring/web/view/AbstractFreemarkerView.java | 170 --
 .../spring/web/view/FreeMarkerView.java | 168 ++
 .../spring/web/view/FreeMarkerViewResolver.java | 149 
 .../spring/web/view/FreemarkerView.java | 168 --
 .../spring/web/view/FreemarkerViewResolver.java | 149 
 .../SpringResourceTemplateLoaderTest.java   |  84 +
 .../SpringResourceTemplateLoaderTest.java   |  84 -
 .../web/view/FreeMarkerViewResolverTest.java|  98 +++
 .../spring/web/view/FreeMarkerViewTest.java | 176 +++
 .../web/view/FreemarkerViewResolverTest.java|  98 ---
 .../spring/web/view/FreemarkerViewTest.java | 176 ---
 12 files changed, 845 insertions(+), 845 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/5b856d3a/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/AbstractFreeMarkerView.java
--
diff --git 
a/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/AbstractFreeMarkerView.java
 
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/AbstractFreeMarkerView.java
new file mode 100644
index 000..6d3c2ae
--- /dev/null
+++ 
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/AbstractFreeMarkerView.java
@@ -0,0 +1,170 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.freemarker.spring.web.view;
+
+import java.io.IOException;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.freemarker.core.Configuration;
+import org.apache.freemarker.core.ParseException;
+import org.apache.freemarker.core.Template;
+import org.apache.freemarker.core.TemplateNotFoundException;
+import org.apache.freemarker.core.model.ObjectWrapperAndUnwrapper;
+import org.apache.freemarker.core.model.TemplateHashModel;
+import 
org.apache.freemarker.core.templateresolver.MalformedTemplateNameException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.ApplicationContextException;
+import org.springframework.web.servlet.view.AbstractTemplateView;
+
+/**
+ * Adapter base class for FreeMarker template-based views, with the ability to 
access {@link Configuration}
+ * and {@link ObjectWrapperAndUnwrapper}.
+ */
+public abstract class AbstractFreeMarkerView extends AbstractTemplateView {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(AbstractFreeMarkerView.class);
+
+/**
+ * FreeMarker {@link Configuration} instance.
+ */
+private Configuration configuration;
+
+/**
+ * {@link ObjectWrapperAndUnwrapper} instance to use in model building.
+ */
+private ObjectWrapperAndUnwrapper objectWrapper;
+
+/**
+ * Template {@link Locale}.
+ */
+private Locale locale;
+
+/**
+ * Get FreeMarker {@link Configuration} instance.
+ * @return {@link Configuration} instance
+ */
+public Configuration getConfiguration() {
+return configuration;
+}
+
+/**
+ * Set FreeMarker {@link Configuration} ins

[jira] [Commented] (FREEMARKER-55) FM3 freemarker-spring module, Web MVC support

2017-07-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FREEMARKER-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16087489#comment-16087489
 ] 

ASF GitHub Bot commented on FREEMARKER-55:
--

GitHub user woonsan opened a pull request:

https://github.com/apache/incubator-freemarker/pull/28

FREEMARKER-55: Renaming Freemarker to FreeMarker



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/woonsan/incubator-freemarker 
feature/FREEMARKER-55

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-freemarker/pull/28.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #28


commit 8e0f33c419d982279d7fb22a9dfdc66f47abaf2c
Author: Woonsan Ko 
Date:   2017-07-14T15:27:17Z

FREEMARKER-55: Renaming Freemarker to FreeMarker




> FM3 freemarker-spring module, Web MVC support
> -
>
> Key: FREEMARKER-55
> URL: https://issues.apache.org/jira/browse/FREEMARKER-55
> Project: Apache Freemarker
>  Issue Type: Task
>Affects Versions: 3.0.0
>Reporter: Daniel Dekany
>
> Add Spring "Web MVC framework" functionality to freemarker-spring.
> This can be complex task (and the issue possibly has to be subdivided), as it 
> involves things like:
> * Some aspects of the FreeMarker 2 integration (developed by the Spring 
> developers) are quite confusing ({{FreemarerConfigurer}}, etc.), and we are 
> looking into if it needs to be like that.
> * See if we can support {{@EnableWebMvc}} (note that FreeMarker 2 support is 
> hard coded into {{ViewResolverRegistry}}, which we can't modify)
> * Creating custom directives/methods to expose Spring features like the 
> Spring JSP Tag Library does (but in a way that firs FreeMarker better)
> * Expose JSP custom tag support from the {{freemarker-servlet}} module.
> Depends on: FREEMARKER-54



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-freemarker pull request #28: FREEMARKER-55: Renaming Freemarker to...

2017-07-14 Thread woonsan
GitHub user woonsan opened a pull request:

https://github.com/apache/incubator-freemarker/pull/28

FREEMARKER-55: Renaming Freemarker to FreeMarker



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/woonsan/incubator-freemarker 
feature/FREEMARKER-55

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-freemarker/pull/28.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #28


commit 8e0f33c419d982279d7fb22a9dfdc66f47abaf2c
Author: Woonsan Ko 
Date:   2017-07-14T15:27:17Z

FREEMARKER-55: Renaming Freemarker to FreeMarker




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (FREEMARKER-55) FM3 freemarker-spring module, Web MVC support

2017-07-14 Thread Woonsan Ko (JIRA)

[ 
https://issues.apache.org/jira/browse/FREEMARKER-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16087480#comment-16087480
 ] 

Woonsan Ko commented on FREEMARKER-55:
--

{{AbstractTemplateView}} has an option to put every attribute to model, but the 
option is turned off by default.
And, 
{{org.springframework.web.servlet.view.freemarker.FreeMarkerView#buildTemplateModel(Map, HttpServletRequest, HttpServletResponse)}} does put the 
{{FreemarkerServlet}} variables again *for some reason*.
My guess is probably {{FreemarkerServlet}} variables are more efficient than 
iterating and copying the attributes in {{AbstractTemplateView}}. Anyway, 
that's my guess. So did I.
I'll create a new pull request with renaming *Freemarker* to *FreeMarker*.

> FM3 freemarker-spring module, Web MVC support
> -
>
> Key: FREEMARKER-55
> URL: https://issues.apache.org/jira/browse/FREEMARKER-55
> Project: Apache Freemarker
>  Issue Type: Task
>Affects Versions: 3.0.0
>Reporter: Daniel Dekany
>
> Add Spring "Web MVC framework" functionality to freemarker-spring.
> This can be complex task (and the issue possibly has to be subdivided), as it 
> involves things like:
> * Some aspects of the FreeMarker 2 integration (developed by the Spring 
> developers) are quite confusing ({{FreemarerConfigurer}}, etc.), and we are 
> looking into if it needs to be like that.
> * See if we can support {{@EnableWebMvc}} (note that FreeMarker 2 support is 
> hard coded into {{ViewResolverRegistry}}, which we can't modify)
> * Creating custom directives/methods to expose Spring features like the 
> Spring JSP Tag Library does (but in a way that firs FreeMarker better)
> * Expose JSP custom tag support from the {{freemarker-servlet}} module.
> Depends on: FREEMARKER-54



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FREEMARKER-55) FM3 freemarker-spring module, Web MVC support

2017-07-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FREEMARKER-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16087172#comment-16087172
 ] 

ASF GitHub Bot commented on FREEMARKER-55:
--

Github user asfgit closed the pull request at:

https://github.com/apache/incubator-freemarker/pull/27


> FM3 freemarker-spring module, Web MVC support
> -
>
> Key: FREEMARKER-55
> URL: https://issues.apache.org/jira/browse/FREEMARKER-55
> Project: Apache Freemarker
>  Issue Type: Task
>Affects Versions: 3.0.0
>Reporter: Daniel Dekany
>
> Add Spring "Web MVC framework" functionality to freemarker-spring.
> This can be complex task (and the issue possibly has to be subdivided), as it 
> involves things like:
> * Some aspects of the FreeMarker 2 integration (developed by the Spring 
> developers) are quite confusing ({{FreemarerConfigurer}}, etc.), and we are 
> looking into if it needs to be like that.
> * See if we can support {{@EnableWebMvc}} (note that FreeMarker 2 support is 
> hard coded into {{ViewResolverRegistry}}, which we can't modify)
> * Creating custom directives/methods to expose Spring features like the 
> Spring JSP Tag Library does (but in a way that firs FreeMarker better)
> * Expose JSP custom tag support from the {{freemarker-servlet}} module.
> Depends on: FREEMARKER-54



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-freemarker pull request #27: FREEMARKER-55: Add default tld source...

2017-07-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-freemarker/pull/27


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[4/4] incubator-freemarker git commit: FREEMARKER-55: Merged: Add default tld sources

2017-07-14 Thread ddekany
FREEMARKER-55: Merged: Add default tld sources

Merge commit 'refs/pull/27/head' of 
https://github.com/apache/incubator-freemarker into 3


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/aaa100c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/aaa100c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/aaa100c0

Branch: refs/heads/3
Commit: aaa100c0cb032d5525129cd458bcf3fef73028a1
Parents: a715679 73a53e7
Author: ddekany 
Authored: Fri Jul 14 12:45:57 2017 +0200
Committer: ddekany 
Committed: Fri Jul 14 12:47:36 2017 +0200

--
 .../org/apache/freemarker/servlet/jsp/TaglibFactory.java  | 10 +-
 .../spring/web/view/FreemarkerViewResolver.java   |  1 -
 2 files changed, 5 insertions(+), 6 deletions(-)
--




[3/4] incubator-freemarker git commit: FREEMARKER-55: set defaults in builder level

2017-07-14 Thread ddekany
FREEMARKER-55: set defaults in builder level


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/73a53e70
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/73a53e70
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/73a53e70

Branch: refs/heads/3
Commit: 73a53e70a5c838af451605380fc446e55b75762c
Parents: 36e04df
Author: Woonsan Ko 
Authored: Thu Jul 13 17:37:17 2017 -0400
Committer: Woonsan Ko 
Committed: Thu Jul 13 17:37:17 2017 -0400

--
 .../org/apache/freemarker/servlet/jsp/TaglibFactory.java  | 10 +-
 .../spring/web/view/FreemarkerViewResolver.java   |  5 +
 2 files changed, 6 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/73a53e70/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/TaglibFactory.java
--
diff --git 
a/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/TaglibFactory.java
 
b/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/TaglibFactory.java
index ef5d9df..cacb22b 100644
--- 
a/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/TaglibFactory.java
+++ 
b/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/TaglibFactory.java
@@ -123,8 +123,8 @@ public class TaglibFactory implements TemplateHashModel {
 private final ServletContext servletContext;
 
 private ObjectWrapper objectWrapper;
-private List metaInfTldSources = 
DEFAULT_META_INF_TLD_SOURCES;
-private List classpathTlds = DEFAULT_CLASSPATH_TLDS;
+private List metaInfTldSources;
+private List classpathTlds;
 
 boolean test_emulateNoUrlToFileConversions = false;
 boolean test_emulateNoJarURLConnections = false;
@@ -2077,12 +2077,12 @@ public class TaglibFactory implements TemplateHashModel 
{
 /**
  * TLD locations to look for when finding available JSP tag libraries.
  */
-private List metaInfTldSources;
+private List metaInfTldSources = 
DEFAULT_META_INF_TLD_SOURCES;
 
 /**
  * TLD classpath locations to look for when finding available JSP tag 
libraries.
  */
-private List classpathTlds;
+private List classpathTlds = DEFAULT_CLASSPATH_TLDS;
 
 private boolean alreadyBuilt;
 
@@ -2118,7 +2118,7 @@ public class TaglibFactory implements TemplateHashModel {
 /**
  * Getter pair of {@link #setClasspathTlds(List)}
  */
-public List getMetaInfTldSources() {
+public List getMetaInfTldSources() {
 return (metaInfTldSources != null) ? metaInfTldSources : 
Collections. emptyList();
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/73a53e70/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
--
diff --git 
a/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
 
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
index 67b4643..7969b56 100644
--- 
a/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
+++ 
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
@@ -127,10 +127,7 @@ public class FreemarkerViewResolver extends 
AbstractTemplateViewResolver impleme
 
 servletContextModel = new ServletContextHashModel(pageContextServlet, 
objectWrapper);
 
-taglibFactory = new TaglibFactory.Builder(getServletContext(), 
objectWrapper)
-.metaInfTldSources(TaglibFactory.DEFAULT_META_INF_TLD_SOURCES)
-.classpathTlds(TaglibFactory.DEFAULT_CLASSPATH_TLDS)
-.build();
+taglibFactory = new TaglibFactory.Builder(getServletContext(), 
objectWrapper).build();
 }
 
 @Override



[1/4] incubator-freemarker git commit: FREEMARKER-55: Add default tld sources (tld files in web-inf/lib/*.jar) like FreemarkerServlet does.

2017-07-14 Thread ddekany
Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 a71567907 -> aaa100c0c


FREEMARKER-55: Add default tld sources (tld files in web-inf/lib/*.jar) like 
FreemarkerServlet does.


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/576b0ff3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/576b0ff3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/576b0ff3

Branch: refs/heads/3
Commit: 576b0ff3b266da40b26e46a8d66efe6353884a36
Parents: 7991d3e
Author: Woonsan Ko 
Authored: Thu Jul 13 15:42:19 2017 -0400
Committer: Woonsan Ko 
Committed: Thu Jul 13 15:42:19 2017 -0400

--
 .../freemarker/spring/web/view/FreemarkerViewResolver.java | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/576b0ff3/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
--
diff --git 
a/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
 
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
index c58e7db..67b4643 100644
--- 
a/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
+++ 
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
@@ -127,8 +127,10 @@ public class FreemarkerViewResolver extends 
AbstractTemplateViewResolver impleme
 
 servletContextModel = new ServletContextHashModel(pageContextServlet, 
objectWrapper);
 
-// TODO: additional meta-inf / classpath tld resources?
-taglibFactory = new TaglibFactory.Builder(getServletContext(), 
objectWrapper).build();
+taglibFactory = new TaglibFactory.Builder(getServletContext(), 
objectWrapper)
+.metaInfTldSources(TaglibFactory.DEFAULT_META_INF_TLD_SOURCES)
+.classpathTlds(TaglibFactory.DEFAULT_CLASSPATH_TLDS)
+.build();
 }
 
 @Override



[2/4] incubator-freemarker git commit: Merge branch '3' into feature/FREEMARKER-55

2017-07-14 Thread ddekany
Merge branch '3' into feature/FREEMARKER-55


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/36e04dfc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/36e04dfc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/36e04dfc

Branch: refs/heads/3
Commit: 36e04dfceff14d6604067e3e05e59f0cf8b042f7
Parents: 576b0ff a715679
Author: Woonsan Ko 
Authored: Thu Jul 13 15:43:26 2017 -0400
Committer: Woonsan Ko 
Committed: Thu Jul 13 15:43:26 2017 -0400

--
 .../core/FM2ASTToFM3SourceConverter.java| 142 ++---
 .../apache/freemarker/converter/Converter.java  |  17 +-
 .../freemarker/converter/FM2ToFM3Converter.java |  47 ++-
 .../converter/FM2ToFM3ConverterTest.java|  44 ++-
 .../org/apache/freemarker/core/ast-builtins.ast |   8 +-
 .../org/apache/freemarker/core/ast-builtins.ftl |   4 +-
 .../apache/freemarker/core/ast-locations.ftl|   4 +-
 .../org/apache/freemarker/core/ast-range.ast|   8 +-
 .../org/apache/freemarker/core/ast-range.ftl|   2 +-
 .../apache/freemarker/core/cano-builtins.ftl|   4 +-
 .../freemarker/core/cano-builtins.ftl.out   |   4 +-
 .../core/cano-identifier-escaping.ftl   |   8 +-
 .../core/cano-identifier-escaping.ftl.out   |   4 +-
 .../templatesuite/templates/api-builtins.ftl|  16 +-
 .../templates/boolean-formatting.ftl|  24 +-
 .../templates/date-type-builtins.ftl|  46 +--
 .../templates/dateformat-iso-bi.ftl | 228 +++---
 .../templates/dateformat-iso-like.ftl   |  46 +--
 .../templatesuite/templates/dateformat-java.ftl |  16 +-
 .../templatesuite/templates/dateparsing.ftl |  30 +-
 .../core/templatesuite/templates/escapes.ftl|  22 +-
 .../templates/existence-operators.ftl   |  40 +--
 .../templatesuite/templates/hashliteral.ftl |   4 +-
 .../templates/identifier-escaping.ftl   |   8 +-
 .../core/templatesuite/templates/if.ftl |  42 +--
 .../core/templatesuite/templates/include2.ftl   |  12 +-
 .../templatesuite/templates/lastcharacter.ftl   |   2 +-
 .../core/templatesuite/templates/macros.ftl |   4 +-
 .../core/templatesuite/templates/noparse.ftl|  16 +-
 .../templatesuite/templates/number-format.ftl   |   4 +-
 .../templatesuite/templates/number-literal.ftl  |   2 +-
 .../templates/number-math-builtins.ftl  |  60 ++--
 .../templatesuite/templates/number-to-date.ftl  |  22 +-
 .../templatesuite/templates/numerical-cast.ftl  |   2 +-
 .../templates/output-encoding1.ftl  |   8 +-
 .../templates/output-encoding2.ftl  |   6 +-
 .../templates/output-encoding3.ftl  |   6 +-
 .../core/templatesuite/templates/root.ftl   |   6 +-
 .../templates/sequence-builtins.ftl | 240 +++
 .../core/templatesuite/templates/setting.ftl|  26 +-
 .../templatesuite/templates/specialvars.ftl |  10 +-
 .../templates/string-builtin-coercion.ftl   |  14 +-
 .../string-builtins-regexps-matches.ftl |   2 +-
 .../templates/string-builtins-regexps.ftl   |   6 +-
 .../templates/string-builtins1.ftl  |  60 ++--
 .../templates/string-builtins2.ftl  | 184 ++--
 .../templates/string-builtins3.ftl  | 296 +--
 .../templatesuite/templates/stringbimethods.ftl |   8 +-
 .../templatesuite/templates/type-builtins.ftl   |  32 +-
 .../core/templatesuite/templates/url.ftl|   6 +-
 .../core/templatesuite/templates/var-layers.ftl |   8 +-
 .../core/templatesuite/templates/varargs.ftl|   4 +-
 .../core/templatesuite/templates/variables.ftl  |   2 +-
 .../templatesuite/templates/varlayers_lib.ftl   |   6 +-
 .../templates/wsstripinheader_inc.ftl   |   2 +-
 .../templates/wstrip-in-header.ftl  |   2 +-
 .../apache/freemarker/core/util/FTLUtil.java|  27 +-
 .../templatesuite/templates/default-xmlns.ftl   |   2 +-
 .../templatesuite/templates/xml-fragment.ftl|   8 +-
 .../templates/xml-ns_prefix-scope-lib.ftl   |   2 +-
 .../templates/xml-ns_prefix-scope-main.ftl  |   2 +-
 .../dom/templatesuite/templates/xmlns1.ftl  |   2 +-
 .../dom/templatesuite/templates/xmlns3.ftl  |  12 +-
 .../dom/templatesuite/templates/xmlns4.ftl  |  12 +-
 .../dom/templatesuite/templates/xmlns5.ftl  |   2 +-
 .../examples/AutoEscapingExample-convert.ftlh   |   8 +-
 .../examples/AutoEscapingExample-convert2.ftl   |   6 +-
 .../examples/AutoEscapingExample-infoBox.ftlh   |   2 +-
 .../examples/AutoEscapingExample-markup.ftlh|   6 +-
 .../AutoEscapingExample-stringConcat.ftlh   |   2 +-
 .../AutoEscapingExample-stringLiteral2.ftlh |   2 +-
 .../jsp/webapps/errors/failing-parsetime.ftlnv  |   2 +-
 72 files changed, 1067 insertions(+), 906 deletions(-)
---

[jira] [Comment Edited] (FREEMARKER-55) FM3 freemarker-spring module, Web MVC support

2017-07-14 Thread Daniel Dekany (JIRA)

[ 
https://issues.apache.org/jira/browse/FREEMARKER-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16087039#comment-16087039
 ] 

Daniel Dekany edited comment on FREEMARKER-55 at 7/14/17 8:41 AM:
--

At the first glance {{RequestContext}} doesn't expose the 
request/session/application attributes and request parameters. However, there 
are options in {{AbstractTemplateView}} to add such attributes to the model 
(not grouped by scope though). I haven't dig into this, but maybe then these 
{{FreemarkerServlet}} variables shouldn't be there in Spring. Just a thought 
tho', I have no experience with this.

BTW, the official name of the project is {{FreeMarker}} with capital {{M}}. The 
{{FreemarkerServlet}} class from FM2 is not consistent with that, and it should 
be renamed in FM3. The new {{FreemarkerView}} and {{AbstractFreemarkerView}} 
classes should also be renamed.


was (Author: ddekany):
At the first glance {{RequestContext }} doesn't expose the 
request/session/application attributes and request parameters. However, there 
are options in {{AbstractTemplateView}} to add such attributes to the model 
(not grouped by scope though). I haven't dig into this, but maybe then these 
{{FreemarkerServlet}} variables shouldn't be there in Spring. Just a thought 
tho', I have no experience with this.

BTW, the official name of the project is {{FreeMarker}} with capital {{M}}. The 
{{FreemarkerServlet}} class from FM2 is not consistent with that, and it should 
be renamed in FM3. The new {{FreemarkerView}} and {{AbstractFreemarkerView}} 
classes should also be renamed.

> FM3 freemarker-spring module, Web MVC support
> -
>
> Key: FREEMARKER-55
> URL: https://issues.apache.org/jira/browse/FREEMARKER-55
> Project: Apache Freemarker
>  Issue Type: Task
>Affects Versions: 3.0.0
>Reporter: Daniel Dekany
>
> Add Spring "Web MVC framework" functionality to freemarker-spring.
> This can be complex task (and the issue possibly has to be subdivided), as it 
> involves things like:
> * Some aspects of the FreeMarker 2 integration (developed by the Spring 
> developers) are quite confusing ({{FreemarerConfigurer}}, etc.), and we are 
> looking into if it needs to be like that.
> * See if we can support {{@EnableWebMvc}} (note that FreeMarker 2 support is 
> hard coded into {{ViewResolverRegistry}}, which we can't modify)
> * Creating custom directives/methods to expose Spring features like the 
> Spring JSP Tag Library does (but in a way that firs FreeMarker better)
> * Expose JSP custom tag support from the {{freemarker-servlet}} module.
> Depends on: FREEMARKER-54



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FREEMARKER-55) FM3 freemarker-spring module, Web MVC support

2017-07-14 Thread Daniel Dekany (JIRA)

[ 
https://issues.apache.org/jira/browse/FREEMARKER-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16087039#comment-16087039
 ] 

Daniel Dekany commented on FREEMARKER-55:
-

At the first glance {{RequestContext }} doesn't expose the 
request/session/application attributes and request parameters. However, there 
are options in {{AbstractTemplateView}} to add such attributes to the model 
(not grouped by scope though). I haven't dig into this, but maybe then these 
{{FreemarkerServlet}} variables shouldn't be there in Spring. Just a thought 
tho', I have no experience with this.

BTW, the official name of the project is {{FreeMarker}} with capital {{M}}. The 
{{FreemarkerServlet}} class from FM2 is not consistent with that, and it should 
be renamed in FM3. The new {{FreemarkerView}} and {{AbstractFreemarkerView}} 
classes should also be renamed.

> FM3 freemarker-spring module, Web MVC support
> -
>
> Key: FREEMARKER-55
> URL: https://issues.apache.org/jira/browse/FREEMARKER-55
> Project: Apache Freemarker
>  Issue Type: Task
>Affects Versions: 3.0.0
>Reporter: Daniel Dekany
>
> Add Spring "Web MVC framework" functionality to freemarker-spring.
> This can be complex task (and the issue possibly has to be subdivided), as it 
> involves things like:
> * Some aspects of the FreeMarker 2 integration (developed by the Spring 
> developers) are quite confusing ({{FreemarerConfigurer}}, etc.), and we are 
> looking into if it needs to be like that.
> * See if we can support {{@EnableWebMvc}} (note that FreeMarker 2 support is 
> hard coded into {{ViewResolverRegistry}}, which we can't modify)
> * Creating custom directives/methods to expose Spring features like the 
> Spring JSP Tag Library does (but in a way that firs FreeMarker better)
> * Expose JSP custom tag support from the {{freemarker-servlet}} module.
> Depends on: FREEMARKER-54



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)