Author: thomas.heute(a)jboss.com
Date: 2007-11-30 05:27:26 -0500 (Fri, 30 Nov 2007)
New Revision: 9215
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java
Log:
JBPORTAL-1822 On logout, redirect to the default page of the default portal
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java 2007-11-30
09:27:05 UTC (rev 9214)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java 2007-11-30
10:27:26 UTC (rev 9215)
@@ -22,6 +22,10 @@
******************************************************************************/
package org.jboss.portal.core.controller.classic;
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+
import org.apache.log4j.Logger;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.core.controller.ControllerCommand;
@@ -39,8 +43,6 @@
import org.jboss.portal.core.controller.handler.ResponseHandlerException;
import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
-import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.command.view.ViewPageCommand;
import org.jboss.portal.core.theme.PageRendition;
import org.jboss.portal.server.ServerInvocation;
@@ -49,9 +51,6 @@
import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.web.ServletContextDispatcher;
-import javax.servlet.ServletException;
-import java.io.IOException;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
@@ -60,7 +59,7 @@
{
/** . */
- private static final PortalObjectId DEFAULT_PORTAL_PATH =
PortalObjectId.parse("/default", PortalObjectPath.CANONICAL_FORMAT);
+ // private static final PortalObjectId DEFAULT_PORTAL_PATH =
PortalObjectId.parse("/", PortalObjectPath.CANONICAL_FORMAT);
/** . */
private static final Logger log = Logger.getLogger(OtherResponseHandler.class);
@@ -97,7 +96,7 @@
if (location == null)
{
PortalObjectContainer portalObjectContainer =
controllerContext.getController().getPortalObjectContainer();
- Portal portal =
(Portal)portalObjectContainer.getObject(DEFAULT_PORTAL_PATH);
+ Portal portal =
(Portal)portalObjectContainer.getContext().getDefaultPortal();
ViewPageCommand renderCmd = new ViewPageCommand(portal.getId());
URLContext urlContext = invocation.getServerContext().getURLContext();
location = controllerContext.renderURL(renderCmd,
urlContext.asNonAuthenticated(), null);
@@ -115,7 +114,7 @@
if (location == null)
{
PortalObjectContainer portalObjectContainer =
controllerContext.getController().getPortalObjectContainer();
- Portal portal =
(Portal)portalObjectContainer.getObject(DEFAULT_PORTAL_PATH);
+ Portal portal =
(Portal)portalObjectContainer.getContext().getDefaultPortal();
ViewPageCommand renderCmd = new ViewPageCommand(portal.getId());
URLContext urlContext = invocation.getServerContext().getURLContext();
location = controllerContext.renderURL(renderCmd, urlContext, null);
@@ -172,7 +171,7 @@
}
else if (controllerResponse instanceof UnavailableResourceResponse)
{
- UnavailableResourceResponse unavailable =
(UnavailableResourceResponse)controllerResponse;
+ // UnavailableResourceResponse unavailable =
(UnavailableResourceResponse)controllerResponse;
//
return HTTPResponse.sendNotFound();
Show replies by date