spring mvc - How to access normal java objects in FTL? -


i using spring 4 freemarker template. have helper class methods want access in ftl template file. don't want pass model. how can it?

look @ this, can pass helper class: http://www.javawebdevelop.com/1389653/

  // ftl     public static templatehashmodel usestaticpackage(string packagename)     {       try       {         beanswrapper wrapper = beanswrapper.getdefaultinstance();         templatehashmodel staticmodels = wrapper.getstaticmodels();         templatehashmodel filestatics = (templatehashmodel) staticmodels.get(packagename);         return filestatics;       }       catch (exception e)       {          e.printstacktrace();         }     }    //     //data.put("list", list);   data.put("helper",usestaticpackage("com.test.helper"));    // ftl    ${helper.method()}  

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -