Author: julien(a)jboss.com
Date: 2007-08-20 18:41:30 -0400 (Mon, 20 Aug 2007)
New Revision: 8005
Modified:
modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml
modules/web/trunk/web/src/main/org/jboss/portal/web/WebApp.java
modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java
modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6WebApp.java
Log:
minor improvement to web integration spi we need the ServletContext not the WEB-INF URL
(wich can be computed from the ServletContext)
Modified: modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml
===================================================================
--- modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml 2007-08-20 20:49:59
UTC (rev 8004)
+++ modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml 2007-08-20 22:41:30
UTC (rev 8005)
@@ -35,6 +35,15 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: modules/web/trunk/web/src/main/org/jboss/portal/web/WebApp.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/WebApp.java 2007-08-20 20:49:59
UTC (rev 8004)
+++ modules/web/trunk/web/src/main/org/jboss/portal/web/WebApp.java 2007-08-20 22:41:30
UTC (rev 8005)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.web;
+import javax.servlet.ServletContext;
import java.net.URL;
import java.io.InputStream;
import java.io.IOException;
@@ -36,11 +37,11 @@
{
/**
- * Returns the URL of the WEB-INF directory of the web application.
+ * Returns the servlet context of the web application.
*
- * @return the URL of the WEB-INF directory
+ * @return the servlet context
*/
- URL getWEBINFURL();
+ ServletContext getServletContext();
/**
* Returns an identifier for the web application valid in the scope of all the web
applications deployed.
Modified:
modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java
===================================================================
---
modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java 2007-08-20
20:49:59 UTC (rev 8004)
+++
modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java 2007-08-20
22:41:30 UTC (rev 8005)
@@ -26,6 +26,7 @@
import org.jboss.portal.web.RequestDispatchCallback;
import org.jboss.portal.web.WebAppEvent;
import org.jboss.portal.web.WebAppLifeCycleEvent;
+import org.jboss.portal.web.ServletContainer;
import org.jboss.portal.web.command.CommandDispatcher;
import org.jboss.portal.web.spi.ServletContainerContext;
import org.apache.catalina.LifecycleListener;
@@ -71,6 +72,11 @@
/** . */
private final CommandDispatcher dispatcher = new CommandDispatcher();
+ public TC6ServletContainerContext()
+ {
+ ServletContainer.registerContext(this);
+ }
+
public Object include(
ServletContext targetServletContext,
HttpServletRequest request,
Modified: modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6WebApp.java
===================================================================
---
modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6WebApp.java 2007-08-20
20:49:59 UTC (rev 8004)
+++
modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6WebApp.java 2007-08-20
22:41:30 UTC (rev 8005)
@@ -53,9 +53,6 @@
private ClassLoader loader;
/** . */
- private URL webinfurl;
-
- /** . */
private String id;
/** . */
@@ -76,7 +73,6 @@
loader = context.getLoader().getClassLoader();
id = context.getPath();
contextPath = context.getPath();
- webinfurl = servletContext.getResource("/WEB-INF");
}
void instrument() throws Exception
@@ -112,9 +108,9 @@
}
}
- public URL getWEBINFURL()
+ public ServletContext getServletContext()
{
- return webinfurl;
+ return servletContext;
}
public String getId()
Show replies by date