//=======================查看资源信息=============================//
        Ext.define('strSiteName', {  
        extend: 'Ext.data.Model',  
        fields: [
            {name: 'title',     type: 'string'},  
            {name: 'keywords', type: 'string'},  
            {name: 'doc',     type: 'string'},  
            {name: 'describe',     type: 'string'},  
            {name: 'date', type: 'string'},  
            {name: 'author', type: 'string'},  
            {name: 'publisher', type: 'string'}          
                      
        ]  
    });  
        var store3 = Ext.create('Ext.data.Store', {
          model: 'strSiteName',   
          proxy: {
                 type: 'ajax',
                 url:'01.jsp',
                 reader: {
                     type: 'json',
                     root: 'root',
                 }
             }
        });
       store3.load();
        // create the Grid, see Ext.
        var grid2 = Ext.create('Ext.ux.LiveSearchGridPanel', {
            store: store3,
            region: 'center',
            columnLines: true,
            columns: [
                {
                    text     : 'title',
                    width    : 175, 
                    sortable : false, 
                    dataIndex: 'title'
                },
                {
                    text     : 'keywords', 
                    width    : 215, 
                    sortable : true, 
                    dataIndex: 'keywords'
                },
                {
                    text     : 'describe', 
                    width    : 345, 
                    sortable : true, 
                    dataIndex: 'describe'
                },{
                    text     : 'doc', 
                    width    : 75, 
                    sortable : true, 
                    dataIndex: 'doc'
                },
                {
                    text     : 'author', 
                    width    : 85, 
                    sortable : true, 
                    dataIndex: 'author'
                },  {
                    text     : 'publisher', 
                    width    : 85, 
                    sortable : true, 
                    dataIndex: 'publisher'
                },  {
                    text     : 'date', 
                    width    : 185, 
                    sortable : true, 
                    dataIndex: 'date'
                }
            ],
            height: 350,
            width: 600,
            title: 'Live Search Grid',
            viewConfig: {
                stripeRows: true
            }
        });
        //======================查看资源信息结束========================//
//浏览器控制台现实的错误+返回的json数据
Uncaught ReferenceError: Ext is not defined js/bootstrap.js:1
Resource interpreted as Script but transferred with MIME type application/x-js: "chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/page_context.js". chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/page.js:853
Uncaught Unable to parse the JSON returned by the server: You're trying to decode an invalid JSON String: {success:true,totalProperty:100,root:[{"title":"0","keywords":"0","doc":"0","describe":"0","date":"0","author":"0","publisher":"0"},{"title":"1","keywords":"1","doc":"1","describe":"1","date":"1","author":"1","publisher":"1"},{"title":"2","keywords":"2","doc":"2","describe":"2","date":"2","author":"2","publisher":"2"},{"title":"3","keywords":"3","doc":"3","describe":"3","date":"3","author":"3","publisher":"3"},{"title":"4","keywords":"4","doc":"4","describe":"4","date":"4","author":"4","publisher":"4"},{"title":"5","keywords":"5","doc":"5","describe":"5","date":"5","author":"5","publisher":"5"},{"title":"6","keywords":"6","doc":"6","describe":"6","date":"6","author":"6","publisher":"6"},{"title":"7","keywords":"7","doc":"7","describe":"7","date":"7","author":"7","publisher":"7"},{"title":"8","keywords":"8","doc":"8","describe":"8","date":"8","author":"8","publisher":"8"},{"title":"9","keywords":"9","doc":"9","describe":"9","date":"9","author":"9","publisher":"9"}]}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="http://localhost:8080/kuaidianHoutai_0002/">
    
    <title>My JSP '01.jsp' starting page</title>
  </head>
  <body>
   
  </body>
</html>

解决方案 »

  1.   

     Ext is not defined 
    js/bootstrap.js之前 引入Ext库没?
    json没问题
      

  2.   


    <script type="text/javascript" src="js/bootstrap.js"></script>
    这句话引入了
      

  3.   

    ext那个类库文件和你的bootstrap.js在一起没,导入的ext路径和bootstrap.js是一样的,不行你就直接导入ext类库就好了,bootstrap.js只是判断要导入哪种类型的ext类库的<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
      <base href="http://localhost:8080/kuaidianHoutai_0002/">
       <script type="text/javascript" src="ext-all.js"></script>
      <title>My JSP '01.jsp' starting page</title>
      </head>
      <body>
       
      </body>
    </html>
      

  4.   


    <link rel="stylesheet" type="text/css" href="css/ext-all.css">
    <link rel="stylesheet" type="text/css" href="css/example.css" />
    <script type="text/javascript" src="js/bootstrap.js"></script>
    <script type="text/javascript" src="js/ext-all.js"></script>
    <script type="text/javascript" src="js/ext-all-debug.js"></script>
    <script type="text/javascript" src="js/ext-lang-zh_CN.js"></script>
    这是完整的类库
      

  5.   

    还有为什么返回的数据中会有<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
      <base href="http://localhost:8080/kuaidianHoutai_0002/">
        
      <title>My JSP '01.jsp' starting page</title>
      </head>
      <body>
        
      </body>
    </html>

    这个东西
      

  6.   

    你没有删除jsp中的html代码啊?这些html代码会一起输出到客户端的,除非你关闭输出流,java不知道,如果是asp可以使用response.end<%
    response.write ""
    response.end'==========结束输出
    %>
    html代码