Oops , sorry , I found what went wrong....
Because the Server page inherits another Parent Page.
So it output the header of its parent page...


2008/2/29 smallufo <[EMAIL PROTECTED]>:

>
> >
> > 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 ?
>

Reply via email to