what you could do is this in 1.1:
redirectToInterceptPage(newPage(Login.class));
setResponsePage(null);
On 2/7/06, Dipu <[EMAIL PROTECTED]> wrote:
Hi ,I have got a base page which is extended by most of the other pages in my application.I am trying to stick in a check in the base page to redirect the user to the login page if requiredBut its throwing a WicketRuntimeExceptioncode snippet for redirecting to the login page isif(FabProperties.getProperty(FabInfo.AUTH_REQUIRED).equalsIgnoreCase(FabInfo.STR_TRUE) && !session.isLoggedin()){
//setResponsePage(newPage(Login.class));
redirectToInterceptPage(newPage(Login.class));
//getResponse().redirect("?bookmarkablePage=com.xmltravel.fab1.wicket.login.Login.Login");}Can anyone please tell me how to get around this issue. I am using wicket-1.1-b4I don't want to set the application home to the Login pageStack Trace16:04:50.406 ERROR! [SocketListener0-1] wicket.RequestCycle.internalOnRuntimeException(RequestCycle.java:785) >19> Unexpected runtime exception [page = [Page class = com.xmltravel.fab1.wicket.flights.FlightSearch, id = 4]]wicket.WicketRuntimeException: Already redirecting to '/fab1/?path=5'. Cannot redirect more than onceat wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:88)at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:330)at wicket.RequestCycle.respond(RequestCycle.java:934)at wicket.RequestCycle.request(RequestCycle.java:411)at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208)at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635)at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)at org.mortbay.http.HttpServer.service(HttpServer.java:954)at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)ThanksDipu