Blob格式数据处理以及DataTable问题处理

一、BLOB格式数据处理

blob 格式处理
MySQL Oracle 有其他的处理办法
JFinal框架中
上传:正常上传
读取:
//参考网址 http://www.oschina.net/question/2000689_165923
String id = this.getPara("id");

Tpl tpl = Tpl.dao.findById(id);
Tpl_Txt tpl_Txt = Tpl_Txt.dao.findById(id);
//说明 tpl_content 是BLOB 类型 ;
String content ="";
try {
content = new String(tpl_Txt.getBytes("tpl_content"),"utf-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("===================================="+"/n"+content);
setAttr("tpl",tpl);
setAttr("tpl_context",content);

二、DataTable问题处理

1、DataTables warning table id = messageList-ajax error,
For more information about this error,please see http://datatables.net/tn/7

2、 1488164944826 Failed to load resource: the server responded with a status of 404 (Not Fou
   1488165197306 404 (Not Found)
解决 新建方法,不使用默认的ajax方法

3、jquery.dataTables.js:48 Uncaught TypeError: Cannot read property 'length' of undefined
    解决
        http://stackoverflow.com/questions/39676723/jquery-datatables-min-js48-uncaught-typeerror-cannot-read-property-length-of

4、 DataTables warning table id = messageList-Requested unknown parameter 0 for row 0
    解决:
    使用 空data 名
    或 mDataProp
    如:


    "sAjaxSource": url,
    "sAjaxDataProp": "",
    columns: [

    {"":"msg_id",} ,
    {"mDataProp":"msg_id",}

原文地址:https://www.cnblogs.com/yexingzhiguang/p/6477255.html