Struts2 JSON Plugin with Hibernate

So I'm trying to create a JSON object from a List of AcaClasses. Action Class: public class StudentJSONAction extends ActionSupport{ //Your result List private List gridModel; public String getJSON() { return execute(); } public String execute() { //Get the first student from the Factory and get their AcaClasses gridModel = StudentFactory.getAll().get(0).getAcaClasses(); return SUCCESS; } //Getters and Setters The StudentFactory is my interface to the hibernate database. Struts.xml true false When I call the getJSON action, all I get is: {"methods":[],"objectName":null,"serviceType":"JSON-RPC","serviceUrl":"\/FlowridersSP\/getJSON","version":".1"} [This][1] problem is very similar to mine but I would like to see if there is a solution using the Struts2 JSON Plugin Question: Why am I not getting back a list of AcaClasses in JSON form? My end goal is to plug in this JSON in the JQuery Grid Plugin [1]: https://stackoverflow.com/questions/445956/struts2-json-plugin-not-working-with-lazy-data

以上就是Struts2 JSON Plugin with Hibernate的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JSON 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏