Freemarker in Java app server, best practices
Chris <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
I currently use JSP, and am trying to migrate to Freemarker. In my JSP pages I normally have a backing Java class, one per page, and just instantiate it at the top of the page. I then call page.getThis() and .getThat() lower down in the page. I'm not quite sure how to get the same functionality in Freemarker. I could create a custom servlet for each .ftl page and then map one to the other in web.xml, but that seems like a waste. I'd rather be able to specify the appropriate servlet class right at the top of the ftl page, and then I won't have to add anything to web.xml. I looked at the example code in webapp2 in the Freemarker download, but it seems really convoluted and uses reflection, which just isn't very efficient. What's the best way to do this? ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july