> > > > To redirect, try: > > public class P1 extends WebPage { > @Override > protected void onBeforeRender() { > super.onBeforeRender(); > throw new RestartResponseException(P2.class); > } > > } >
Hi I want to handle a POST request , and output custom messages , but.... In onBeroereRenderer() , I write the following codes : HttpServletResponse res = ((WebResponse) getWebRequestCycle().getResponse()).getHttpServletResponse(); PrintWriter out = res.getWriter(); out.print(responseText); But wicket seems pre-output HTML's DOCTYPE , that makes the remote site can't parse...: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" I've already deleted the corresponding HTML file. How to make wicket not pre-output any HTML header/doctype ?