首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Ajax >

jquery中ajax跟java的结合

2012-10-14 
jquery中ajax和java的结合public void comnamd(CommandContextString, Object input){HttpServletReques

jquery中ajax和java的结合

public void comnamd(CommandContext<String, Object> input){HttpServletRequest req = ((ServletCommandContext<String, Object>) input).getRequest();String content = loadFormTemplet(folderPath + File.separator + fileName + ".xml");addResponseMessage(resp, content);}private void addResponseMessage(HttpServletResponse resp, String message)throws PFCommandException {try {resp.setContentType("text/xml;charset=UTF-8");resp.setHeader("Cache-Control", "no-cache");PrintWriter out = resp.getWriter();out.print(message);out.flush();out.close();} catch (IOException e) {throw new PFCommandException(new Message("msg.form.response.message.error"));}}

热点排行