且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将数据从json文件加载到extjs中

更新时间:2022-06-02 22:01:56

非常感谢大家.现在工作正常.服务器找不到文件,因为路径不正确.经过一番试验后,我终于能够通过提供正确的路径从json文件中获取json数据,例如-"TestPortlet3-portlet/js/example.json".最初,我只提供"/example.json"或"users.json".将.json文件保存在正确的文件夹中并提供正确的路径后,我能够显示json数据:)

Thanks a lot everyone. It is working fine now. The server could not find the files because the path was not proper. After experimenting a bit, I was finally able to fetch the json data from the json file by giving a proper path, like - "TestPortlet3-portlet/js/example.json". Initially, I was only giving "/example.json" or "users.json". On keeping the .json file in the correct folder and giving the correct path, I was able to display the json data :)