• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Conversion of free marker templates (ftl) to jsp's

 
Nikhil Das Nomula
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to convert some ftl files into JSP's and I am not sure how do I go about with it. I am not that familiar with freemarker too. Can someone suggest me how should I approach this issue.
 
Nikhil Das Nomula
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was going through my profile and how stupid was i ask this kind of question. However, if anyone wondered why I asked this question at that point of time was that we were using struts as the front end for our web application. And the view components were written in ftl's and JSP's. Struts support for ftl's is well known but it makes life complicated to debug. Hence we wanted to convert those ftl's into jsp's. So to do this in a struts application, you need to have a thorough understanding of OGNL because that is how the data is moved to/from the view in a struts application. All I needed to do is just change the syntax from ftl's to jsp's.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not that easy.

Freemarker/velocity type template engines usually require an interceptor or filter.

If you must do this, save the generated HTML from the browser and work backwards to JSP.
(Or better yet, JSF)

WP
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF is a completely different beast; avoid it.

It'd be much simpler to convert to JSPs. The servlet controller can perpare any data needed by the JSPs.
 
Nikhil Das Nomula
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yea JSP's are much simpler and straightforward
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic