For now, doing an HttpServletResponse.sendRedirect works, but it just logs
this error.. 

ERROR - WebResponse                - Unable to redirect to:
?wicket:interface=:1::::, HTTP Response has already been committed.

There has to be a better alternative..


mfs wrote:
> 
> So you are saying re-direction isn't supported in the constructor ? I cant
> think of an alternative, given i had to expose a logout page to the
> external app for wicket apps session invalidation and soon after
> invalidation i have to it pass to a non-wicket logout html
> 
> BTW throwing AbortException gives me the following exception
> 
> 08/04/29 19:34:31 Logout Page - Invalidating Session
> 08/04/29 19:34:31 Redirecting to external app -
> https://xyz/context/dy74o1231123zvb/logout
> ERROR - RequestCycle               - Method onLinkClicked of interface
> org.apache.wicket.markup.html.link.ILinkListener targeted at component
> [MarkupContainer [Component id = logoutLink, page =
> xyz.abc.wicket.app.page.SearchPage, path = 0:logoutLink.SearchPage$1,
> isVisible = true, isVersioned = true]] threw an exception
> org.apache.wicket.WicketRuntimeException: Method onLinkClicked of
> interface org.apache.wicket.markup.html.link.ILinkListener targeted at
> component [MarkupContainer [Component id = logoutLink, page =
> xyz.abc.wicket.app.page.SearchPage, path = 0:logoutLink.SearchPage$1,
> isVisible = true, isVersioned = true]] threw an exception
>         at
> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:194)
>         at
> org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
>         at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
>         at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
>         at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
>         at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331)
>         at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>         at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363)
>         at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
>         at
> com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
>         at
> com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
>         at
> com.evermind.server.http.HttpRequestHandler.handleNotFound(HttpRequestHandler.java:1041)
>         at
> com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:911)
>         at
> com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
>         at
> com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
>         at
> com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
>         at
> oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
>         at
> com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
>         ... 18 more
> Caused by: org.apache.wicket.AbortException
>  
> 
> 
> 
> Johan Compagner wrote:
>> 
>> I think this usecase should be supported but isnt the best way, you
>> should throw an AbortException when you want to redirect in the
>> constructor. Dont know from top of my head if we have one just for an
>> url but that is easily made
>> 
>> On 4/30/08, mfs <[EMAIL PROTECTED]> wrote:
>>>
>>> Guys,
>>>
>>> I have a LogoutPage which does the following in its constructor
>>>
>>> LogoutPage()
>>> {
>>>     getSession().invalidate();
>>>
>>>     // redirecting to the external app logout page
>>>     RequestCycle.get().setRequestTarget(
>>>         new RedirectRequestTarget(Host.getHttpsUrl()
>>>             + xyz.getLogoutURL()));
>>>
>>>     getRequestCycle().setRedirect(true);
>>> }
>>>
>>> Now, for some reasons the redirect to the specified external app page
>>> doesnt
>>> happen, infact i am taken to the session-expired page (which is because
>>> the
>>> request comes to wicket app, instead of redirection to this external
>>> app) .
>>> Let me add that i am using wiket-auth-roles for authorization...
>>>
>>> Also the reason i am doing this inside the Page itself (and not in the
>>> onClick or some other event as suggested in another other thread) is
>>> because
>>> i need to expose this LogoutPage to an external app as well, which will
>>> redirect to this page after invalidating the session....This part of
>>> Interoperability/SingleSignon Support.
>>>
>>> Thanks in advance.
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p16974119.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p16976245.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to