Re: How to redirect an external web site and where is setRequestTarget method?

2013-03-04 Thread mike.hua
It is good to throw the RedirectToUrlException! @Override public void onSubmit() { RedirectToUrlException objRedirect; objRedirect = new RedirectToUrlException(http://www.163.com/;); throw objRedirect; } Thanks for Vineetsemwal and Stephen's help! -- View this message

How to redirect an external web site and where is setRequestTarget method?

2013-03-03 Thread mike.hua
According to the web site: https://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html public void onSubmit() { // Make sure no output for the current cycle is ever sent. getRequestCycle().setRequestTarget(new RedirectRequestTarget(http://www.163.com;)); } I can't

Re: How to redirect an external web site and where is setRequestTarget method?

2013-03-03 Thread Stephen Walsh
I'm using throw new RestartResponseAtInterceptPageException to redirect to an external page. That doc is for Wicket 1.3. I found that same page and started using RestartResponseAtInterceptPageException instead. I forget where I found the documentation on it, but I believe that was a change with

Re: How to redirect an external web site and where is setRequestTarget method?

2013-03-03 Thread vineet semwal
use RedirectToUrlException On Mon, Mar 4, 2013 at 8:31 AM, mike.hua hz...@sohu.com wrote: According to the web site: https://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html public void onSubmit() { // Make sure no output for the current cycle is ever sent.