[jboss-dev-forums] [Design of POJO Server] - Re: Exploded WAR archive with no web.xml is no longer suppor

alesj do-not-reply at jboss.com
Fri Oct 10 10:58:08 EDT 2008


"adrian at jboss.org" wrote : 
  | wouldn't have the correct classpath, etc.
  | 
Why wouldn't it have correct classpath?
As you said, every .war file is recognized as a war,
hence getting war-kind of classpath.

This does the trick for me

  |    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());
  |       }
  |    }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181539#4181539

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181539



More information about the jboss-dev-forums mailing list