-
1. Re: Exploded WebModul: Can web-uri point outside of jboss?
thomasmarkus May 18, 2006 4:25 AM (in response to daisukeyon)I have exactly the same problem.
It is very annoying that you cannot have your web application at some place on your harddirk where you have checked out from cvs/svn and have the appserver at a different place.
We have a given filestructure, our exploded directories do NOT have a ".war" ending (hence they cannot be used as exploded dirs) and the webapps of our j2ee application are wide spreaded at different locations.
It is so cool in oc4j and other appservers and very important if you can use something like<web-uri>D:\data/prg/TRUNK/platform/ext/webmc/web/webroot</web-uri>
or<web-uri>../../ext/webmc/web/webroot</web-uri>
and do NOT have everything packed and copied at a single place and name the directory xy.ear/ or the war's xy.war/.
any suggestions? I'm sure we just missed something in the documentaiton.? -
2. Re: Exploded WebModul: Can web-uri point outside of jboss?
starksm64 May 18, 2006 9:10 AM (in response to daisukeyon)Its not required by the spec to support such deployments. We have a long standing feature request for this that I have upped the priority on for the next release:
http://jira.jboss.com/jira/browse/JBAS-1486 -
3. Re: Exploded WebModul: Can web-uri point outside of jboss?
thomasmarkus May 18, 2006 10:15 AM (in response to daisukeyon)thanks for the quick reply.
We have patched just one line in EARDeployer.java and AbstractWebContainer.java and it seems to work.
EARDeployer: starting from line 247 (4.0.4src), this will give the possibility to add directories outside the EAR-package:if (di.isDirectory) { File f = new File(parentDir, fileName); //XXX start we added the next line if(!f.exists()) f = new File(fileName); //XXX end sub = new DeploymentInfo(f.toURL(), di, getServer()); }
AbstractWebContainer: starting from line 276, this will disable the need for a webapplication directory to end with ".war":public boolean accepts(DeploymentInfo sdi) { // Should be checking for .war and .war/ boolean accepts = super.accepts(sdi); //XXX start, added next line if( ! accepts ) if ( sdi.webContext!=null ) accepts = true; //XXX end ...
-
4. Re: Exploded WebModul: Can web-uri point outside of jboss?
rogerdengcn Mar 20, 2007 9:51 PM (in response to daisukeyon)Thanks Thomasmarkus 's patch, It works very well for exploded ear. But I want to deploy a exploded war with web-uri point to directory outside of the ear file. I changed the code from 256 line of EARDeployer, it works for me. Hope the later JBoss AS release support this feature, it's very important if application want to support more than one J2EE AS(sicne other J2EE AS have such feature, even it is not J2EE mandatory feature).
// if( nestedURL == null ) // throw new DeploymentException("Failed to find module file: "+fileName); // sub = new DeploymentInfo(nestedURL, di, getServer()); if( nestedURL == null ) { File f = new File(fileName); if (f.exists()) { sub = new DeploymentInfo(f.toURL(), di, getServer()); } else { throw new DeploymentException("Failed to find module file: "+fileName); } } else { sub = new DeploymentInfo(nestedURL, di, getServer()); }