response.setContentType("text/xml; charset=" + encoding);
response.setContentType("text/xml; charset=" + encoding);
response.setContentType("text/xml; charset=" + encoding);
response.setContentType("text/xml; charset=" + encoding);
/** * Additional header configs for ajax redirects */ protected void configureAjaxRedirect() { // Set the encoding (see Wicket-2348) final String encoding = Application.get() .getRequestCycleSettings() .getResponseRequestEncoding(); // Set content type based on markup type for page setCharacterEncoding(encoding); setContentType("text/xml; charset=" + encoding); setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); setHeader("Cache-Control", "no-cache, must-revalidate"); setHeader("Pragma", "no-cache"); }
public void respond(RequestCycle requestCycle) { WebResponse r = (WebResponse)requestCycle.getResponse(); // Determine encoding final String encoding = Application.get() .getRequestCycleSettings() .getResponseRequestEncoding(); r.setCharacterEncoding(encoding); r.setContentType("text/xml; charset=" + encoding); // Make sure it is not cached by a r.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); r.setHeader("Cache-Control", "no-cache, must-revalidate"); r.setHeader("Pragma", "no-cache"); Iterator<T> comps = getChoices(val); renderer.renderHeader(r); while (comps.hasNext()) { final T comp = comps.next(); renderer.render(comp, r, val); } renderer.renderFooter(r); }
/** * @see org.apache.wicket.IRequestTarget#respond(org.apache.wicket.RequestCycle) */ public void respond(RequestCycle requestCycle) { WebResponse response = (WebResponse)requestCycle.getResponse(); final String encoding = Application.get() .getRequestCycleSettings() .getResponseRequestEncoding(); // Set content type based on markup type for page response.setCharacterEncoding(encoding); response.setContentType("text/xml; charset=" + encoding); // Make sure it is not cached by a client response.setDateHeader("Expires", System.currentTimeMillis()); response.setHeader("Cache-Control", "no-cache, must-revalidate"); response.setHeader("Pragma", "no-cache"); response.write("<?xml version=\"1.0\" encoding=\""); response.write(encoding); response.write("\"?><ajax-response></ajax-response>"); }
public void respond(RequestCycle requestCycle) { final WebResponse response = (WebResponse) requestCycle.getResponse(); final Application app = Application.get(); final String encoding = app.getRequestCycleSettings().getResponseRequestEncoding(); response.setCharacterEncoding(encoding); response.setContentType("text/xml; charset=" + encoding); // Make sure it is not cached by a client response.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); response.setHeader("Cache-Control", "no-cache, must-revalidate"); response.setHeader("Pragma", "no-cache"); response.write("<?xml version=\"1.0\" encoding=\""); response.write(encoding); response.write("\"?>"); response.write("<ajax-response>"); response.write(responseText); response.write("</ajax-response>"); }
public void respond(RequestCycle requestCycle) { final WebResponse response = (WebResponse) requestCycle.getResponse(); final Application app = Application.get(); final String encoding = app.getRequestCycleSettings().getResponseRequestEncoding(); response.setCharacterEncoding(encoding); response.setContentType("text/xml; charset=" + encoding); // Make sure it is not cached by a client response.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); response.setHeader("Cache-Control", "no-cache, must-revalidate"); response.setHeader("Pragma", "no-cache"); response.write("<?xml version=\"1.0\" encoding=\""); response.write(encoding); response.write("\"?>"); response.write("<ajax-response>"); response.write(responseText); response.write("</ajax-response>"); }
/** * @see org.apache.wicket.IRequestTarget#respond(org.apache.wicket.RequestCycle) */ public void respond(RequestCycle requestCycle) { final Application app = Application.get(); // Determine encoding final String encoding = app.getRequestCycleSettings().getResponseRequestEncoding(); // Set content type based on markup type for page final WebResponse response = (WebResponse) requestCycle.getResponse(); response.setCharacterEncoding(encoding); response.setContentType("text/plain; charset=" + encoding); // Make sure it is not cached by a client response.setHeader("Expires", Time.now().subtract(Duration.minutes(1)).toDateString()); response.setHeader("Cache-Control", "no-cache, must-revalidate"); response.setHeader("Pragma", "no-cache"); response.setLastModifiedTime(Time.now()); // set filename response.setAttachmentHeader(getFilename()); response.write(getContent()); }