[jboss-cvs] jboss-portal/portlet/src/main/org/jboss/portal/portlet/aspects/portlet ...
Julien Viet
julien at jboss.com
Mon Aug 21 19:20:52 EDT 2006
User: julien
Date: 06/08/21 19:20:52
Modified: portlet/src/main/org/jboss/portal/portlet/aspects/portlet
ContextTrackerInterceptor.java
Log:
remove usage of contextPath information coming from the PortalWebApp and instead use information provided by the servlet container at runtime
Revision Changes Path
1.2 +3 -6 jboss-portal/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ContextTrackerInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ContextTrackerInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-portal/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ContextTrackerInterceptor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ContextTrackerInterceptor.java 11 Jul 2006 23:09:18 -0000 1.1
+++ ContextTrackerInterceptor.java 21 Aug 2006 23:20:52 -0000 1.2
@@ -23,8 +23,6 @@
import org.jboss.portal.portlet.invocation.PortletInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
-import org.jboss.portal.portlet.container.PortletContainer;
-import org.jboss.portal.portlet.container.info.ContainerPortletInfo;
import org.jboss.portal.common.invocation.InvocationException;
/**
@@ -33,15 +31,14 @@
*
*
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class ContextTrackerInterceptor extends PortletInterceptor
{
protected void invoke(PortletInvocation invocation) throws Exception, InvocationException
{
- // Get the context path we have been dispatched to
- PortletContainer container = ((ContainerPortletInfo)invocation.getInfo()).getContainer();
- String contextPath = container.getApplication().getContext().getContextPath();
+ //
+ String contextPath = (String)invocation.getDispatchedRequest().getAttribute("javax.servlet.include.context_path");
// Add it to the request context path set
org.jboss.portal.server.aspects.server.SessionInvalidatorInterceptor.getSet().add(contextPath);
More information about the jboss-cvs-commits
mailing list