Author: julien(a)jboss.com
Date: 2007-01-08 04:02:18 -0500 (Mon, 08 Jan 2007)
New Revision: 5956
Modified:
branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/deployment/PortalWebAppFactory.java
Log:
make portlet deployment work with tomcat 6 and JBoss Web Server 1.0.x
Modified:
branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/deployment/PortalWebAppFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/deployment/PortalWebAppFactory.java 2007-01-08
08:56:03 UTC (rev 5955)
+++
branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/deployment/PortalWebAppFactory.java 2007-01-08
09:02:18 UTC (rev 5956)
@@ -45,6 +45,7 @@
private static final int UNKNOWN = 0;
private static final int TOMCAT4 = 1;
private static final int TOMCAT5 = 2;
+ private static final int TOMCAT6 = 3;
private final MBeanServer server;
@@ -66,6 +67,9 @@
return new PortalWebTomcat4App(webApp);
case TOMCAT5:
return new PortalWebTomcat5App(webApp, server);
+ case TOMCAT6:
+ // For now trying to build TC6 with TC5 web app
+ return new PortalWebTomcat5App(webApp, server);
default:
throw new CannotCreatePortletWebAppException("JBossWeb cannot handle
it");
}
@@ -83,14 +87,22 @@
String result = (String)getServerInfoMethod.invoke(null, EMPTY_OBJECT_ARRAY);
if (result != null)
{
- if (result.startsWith("Apache Tomcat/5"))
+ if (result.startsWith("Apache Tomcat/6"))
{
+ return TOMCAT6;
+ }
+ else if (result.startsWith("Apache Tomcat/5"))
+ {
return TOMCAT5;
}
else if (result.startsWith("Apache Tomcat/4"))
{
return TOMCAT4;
}
+ else if (result.startsWith("JBoss Web Server/1.0"))
+ {
+ return TOMCAT5;
+ }
}
}
catch (ClassNotFoundException e)
Show replies by date