Session.redirectToInterceptPage() has extremely brief Javadoc in 1.2. I understand we are redirecting to a page but there is no mention of what an intercept page is. At the very least we should have a @see #continueToOriginalDestination and a reverse link as well.

Gili

Johan Compagner wrote:
please try to upgrade to the latest 1.1 or even better try using the latest snapshots.

what you could do is this in 1.1:

redirectToInterceptPage(newPage(Login.class));
setResponsePage(null);


On 2/7/06, *Dipu* <[EMAIL PROTECTED] <mailto:[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 required
    But its throwing a WicketRuntimeException
code snippet for redirecting to the login page is if(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-b4
    I don't want to set the application home to the Login page
Stack Trace 16: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
    once
    at 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_)
Thanks
    Dipu


--
http://www.desktopbeautifier.com/


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to