java模

ʱ䣺 2013-02-24 17:58:56 ߣ rapoo

java模

?忥潮?丹便以模模?乨项丨freemarkelocity宻欢Q?/p>

代?/p>

    public static void main(String[] args)    {        String source = IO.read(new File("debug/test.html"), "UTF-8", 4096);        TemplateCompiler compiler = new TemplateCompiler(source);        System.out.println("source.length: " + source.length());        long t1 = System.currentTimeMillis();        Template template = compiler.compile();                long t2 = System.currentTimeMillis();        System.out.println("compile complete: " + (t2 - t1));        long t3 = System.currentTimeMillis();                for(int i = 0; i < 100; i++)        {        StringWriter writer = new StringWriter();        JspWriter out = new JspWriter(writer);        PageContext pageContext = new PageContext(out);        Map<String, Object> user = new HashMap<String, Object>();        user.put("userName", "xuesong.net");        pageContext.setAttribute("user", user);        template.evaluate(pageContext);        }        long t4 = System.currentTimeMillis();        System.out.println("run time: " + (t4 - t3));    }
模注jstlQjsp?强大??

Q宼 jspstl?宾?~E衹?/p>

el表达弨gnl?/p>


容档~?档?迴签ava?/p>

对两Q???强?佨衽ava?辤??@truts使M就?tackOverFlow缺就@覡衳H覾|屨??该廥Q?ơW?@止break便伹庿?大??/p>

已宣表两满?0K大档大@?300Q衤?0衷?辺aO丨學???java代丽?/p>

>

ȵƼ