Jfinal 学习笔记

  1. Jfinal 使用ajax 与后台交互




    
    
    Title





这是主页


    public void registe() {
        String fname = getPara("fname");
        setAttr("result", "1");
        setAttr("msg", fname);
        renderJson();
    }

  1. 加载全局路径 cxt
  handlers.add(new ContextPathHandler("cxt"));
  1. log4内置日志

log4j.properties

# log4j.rootLogger=WARN, stdout, file
log4j.rootLogger=ERROR, stdout, file
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}%n[%p]-[Thread: %t]-[%C.%M()]: %m%n

# Output to the File
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.DatePattern='_'yyyy-MM-dd'.log'
log4j.appender.file.File=./jfinal_demo.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}%n[%p]-[Thread: %t]-[%C.%M()]: %m%n

你可能感兴趣的:(Jfinal 学习笔记)