1 Reply Latest reply on Jan 7, 2005 9:39 AM by john doe

    Static content in external directories

    Lennart Petersson Novice

      This is possible in straight JBoss/Tomcat. But what about JBossNukes? Is it possible to link to html pages and/or images stored other place then within JBoss?

      /L

        • 1. Re: Static content in external directories
          john doe Newbie

          Works the same way in Nukes.
          Add a context for your static rep. in jboss-service.xml

           <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">
          
           <!-- Access logger -->
           <Valve className="org.apache.catalina.valves.AccessLogValve"
           prefix="localhost_access" suffix=".log"
           pattern="common" directory="${jboss.server.home.dir}/log"/>
          
           <!-- This valve clears any caller identity set by the realm
           and provides access to the realm about the existence of an
           authenticated caller to allow a web app to run with a realm
           that support unauthenticated identities. It also establishes
           any run-as principal for the servlet being accessed.
           -->
           <Valve className="org.jboss.web.tomcat.security.SecurityAssociationValve"/>
           <!-- Default context parameters -->
           <DefaultContext cookies="true" crossContext="true" override="true"/>
           <!-- Add a static context /images using directory /tmp/images -->
           <Context docBase='C:/tmp/images' path='/tmpimages' />
          

          URLs beginning with /tmpimages will be "catched" by jboss web server before Nukes.

          Another way is to use Apache in front of JBoss. See related posts.
          Hope this helps