[jboss-cvs] JBossAS SVN: r79351 - in trunk: tomcat/src/resources and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 10 11:12:23 EDT 2008
Author: alesj
Date: 2008-10-10 11:12:23 -0400 (Fri, 10 Oct 2008)
New Revision: 79351
Added:
trunk/server/src/main/org/jboss/deployment/LegacyWebXmlLessDeployer.java
Modified:
trunk/tomcat/src/resources/war-deployers-jboss-beans.xml
Log:
[JBAS-6062]; initial work for web app w/o web.xml.
Copied: trunk/server/src/main/org/jboss/deployment/LegacyWebXmlLessDeployer.java (from rev 79338, trunk/server/src/main/org/jboss/deployment/JBossWebAppParsingDeployer.java)
===================================================================
--- trunk/server/src/main/org/jboss/deployment/LegacyWebXmlLessDeployer.java (rev 0)
+++ trunk/server/src/main/org/jboss/deployment/LegacyWebXmlLessDeployer.java 2008-10-10 15:12:23 UTC (rev 79351)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployment;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.WebMetaData;
+
+/**
+ * Support jsp's w/o web.xml.
+ * See JBAS-6062 for more details.
+ *
+ * @author ales.justin at jboss.org
+ */
+public class LegacyWebXmlLessDeployer extends AbstractDeployer
+{
+ public LegacyWebXmlLessDeployer()
+ {
+ addInput(WebMetaData.class);
+ addInput(JBossWebMetaData.class);
+ addOutput(JBossWebMetaData.class);
+ setStage(DeploymentStages.POST_PARSE);
+ }
+
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ if (unit.isAttachmentPresent(JBossWebMetaData.class))
+ return;
+
+ // only care about true deployments
+ if (unit instanceof VFSDeploymentUnit == false)
+ return;
+
+ if (unit.getSimpleName().endsWith(".war"))
+ {
+ log.debug("Web archive doesn't contain web.xml: " + unit.getName());
+ unit.getTransientManagedObjects().addAttachment(JBossWebMetaData.class, new JBossWebMetaData());
+ }
+ }
+}
\ No newline at end of file
Modified: trunk/tomcat/src/resources/war-deployers-jboss-beans.xml
===================================================================
--- trunk/tomcat/src/resources/war-deployers-jboss-beans.xml 2008-10-10 15:10:36 UTC (rev 79350)
+++ trunk/tomcat/src/resources/war-deployers-jboss-beans.xml 2008-10-10 15:12:23 UTC (rev 79351)
@@ -25,6 +25,9 @@
<property name="relativeOrder">2001</property>
</bean>
+ <!-- See JBAS-6062 -->
+ <bean name="WebXmlLess" class="org.jboss.deployment.LegacyWebXmlLessDeployer"/>
+
<!-- Allow for war local class loaders: in testing -->
<bean name="WarClassLoaderDeployer" class="org.jboss.web.tomcat.service.deployers.WarClassLoaderDeployer">
<property name="relativeOrder">-1</property>
More information about the jboss-cvs-commits
mailing list