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]:

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

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

评论 抢沙发

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

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