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

Woonsan Ko commented on FREEMARKER-55:
--------------------------------------

Hi [~ddekany],

I've created a new PR based on your reviews like the following:
- Switched Servlet spec dependency to 3.0 and jsp-api/EL dependencies to 2.2.
- I've set the spring dependency version to 4.0.x (4.0.9.RELEASE) as a minimal 
servlet-spec 3.0 based framework.
- Made {{TaglibFactory}} immutable and add {{Builder}} extending 
{{CommonBuilder}} inside the {{TaglibFactory}}.
- Moved {{SpringResourceTemplateLoader}} to {{org.apache.freemarker.spring}} 
package.

Regarding "the existing Spring macros/functions", yes, I agree. We'll need to 
add new macros/functions.

Regarding "FreemarkerViewResolver exposing things like FreemarkerServlet: ...", 
{{FreemarkerViewResolver}} doesn't expose {{FreemarkerServlet}}, but it uses 
only constants defined in the {{FreemarkerServlet}} to use the same attribute 
names, for instance. It used to expose some 'protected' getters/setters for the 
internal {{GenericServlet}} (for page object in JSP taglibs), {{ObjectWrapper}} 
and {{ServletContextModel}}, but those were removed now. Used only internally 
now.
BTW, {{View}} of Spring Framework is dependent on {{HttpServletRequest}} and 
{{HttpServletResponse}}. So, {{pageContextServlet}}, {{servletContextModel}} 
and {{taglibFactory}} in {{FreemarkerView}} (passed by 
{{FreemarkerViewResolver}}) should be okay.

Regards,

Woonsan

> 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)

Reply via email to