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"));}}