摘要:
在 struts2 中实现ajax,可以使用struts2-json-plugin扩展,但是返回的json字段必须都是Action中的属性,不可以随意的输出文本。返回任意的文本有两种方式,方法一:调用ServletAPIpublic class HelloAction extends ActionSupport { public String execute() throws Exception { HttpServletResponse response = ServletActionContext.getResponse(); response... 阅读全文