You can add one or more external contexts to wars deployed to a host by adding a Context element to the corresponding Host by editing the jbossweb-tomcat41.sar/META-INF/jboss-service.xml descriptor:
<server>
<mbean code="org.jboss.web.tomcat.tc4.EmbeddedTomcatService"
name="jboss.web:service=WebServer"> <attribute name="Java2ClassLoadingCompliance">true</attribute>
<attribute name="LenientEjbLink">true</attribute>
<attribute name="UseJBossWebLoader">true</attribute>
<attribute name="SubjectAttributeName">j_subject</attribute> <attribute name="Config">
<Server>
<Service name="JBoss-Tomcat">
<Engine name="MainEngine" defaultHost="localhost">
<Logger className="org.jboss.web.tomcat.Log4jLogger"
verbosityLevel="debug"
category="org.jboss.web.localhost.Engine"/>
<Host name="localhost">
... <Context path="/images" docBase="C:/tmp/images" debug="1"
reloadable="true" crossContext="true" />
...With this you can reference the /images path from any war deployed to the Host. For example, a test-ex.war index.html page accessible at http://localhost/test-ex/index.html that includes images from the external context:
test-ex.war/index.html <html>
<body>
<h1>External Images</h1>
<ul>
<li><img src="/images/img1.jpg" alt="Image1"></li>
<li><img src="/images/img1.jpg" alt="Image2"></li>
<li><img src="/images/img1.jpg" alt="Image3"></li>
</ul>
</body></html>
-- xxxxxxxxxxxxxxxxxxxxxxxx Scott Stark Chief Technology Officer JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx
Ivaturi,Srinivas wrote:
HiBut I am deploying my application as WAR in JBOSS. So my WAR cannot talk to Tomcat
I am able to create the Virtual Directory for my application in Tomcat in Server.XML.
Server.XML file. Now I have to crate a Virtual Directory in Jboss related XML file.
If anyone knows please help me in this.
Thanks in advance Srinivas Ivaturi
------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
