5 Replies Latest reply on Jun 19, 2008 2:32 PM by Peter Johnson

    Web folder

    fabio l Newbie

      Hi, I'm new to JBoss and I need to create a web accessible folder by the url localhost:8080/ to view the file list.
      I read various topic about this on this forum, they suggest to modify the server.xml, within the "server\default\deploy\jboss-web.deployer", and I add the follow lines:

      <Context path="/registry" appBase=""
       docBase="c:\registry"
       debug="99" reloadable="true">
       </Context>
      


      but this doesn't work. I work with JBoss 4.2.2GA.
      Can you help me? Thank you

        • 1. Re: Web folder
          Peter Johnson Master

          Do not use a backslash, us a forward slash instead:

          docBase="c:/registry"


          • 2. Re: Web folder
            fabio l Newbie

            Thank you PeterJ,
            but it doesn't work!!!
            I'm in a dilemma..... sob!!!
            Are you sure that I have to modify only "server.xml"????

            Bye bye

            • 3. Re: Web folder
              Peter Johnson Master

              I just now tried it. It works for me. Where did you place the < Context > entry? It should be within the < Host > entry in the server.xml file.

              • 4. Re: Web folder
                fabio l Newbie

                Hi PeterJ, this is my "server.xml":

                <Server>
                
                
                 <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
                
                 <Listener className="org.apache.catalina.core.JasperListener" />
                
                 <Service name="jboss.web">
                
                 <Connector port="8080" address="${jboss.bind.address}"
                 maxThreads="250" maxHttpHeaderSize="8192"
                 emptySessionPath="true" protocol="HTTP/1.1"
                 enableLookups="false" redirectPort="8443" acceptCount="100"
                 connectionTimeout="20000" disableUploadTimeout="true" />
                
                 <Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3"
                 emptySessionPath="true" enableLookups="false" redirectPort="8443" />
                
                 <Engine name="jboss.web" defaultHost="localhost">
                
                 <Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm"
                 certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
                 allRolesMode="authOnly"
                 />
                
                 <Host name="localhost"
                 autoDeploy="false" deployOnStartup="false" deployXML="false"
                 configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
                 >
                
                
                
                
                 <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
                 cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
                 transactionManagerObjectName="jboss:service=TransactionManager" />
                
                
                 <!-- ADD static DIRECTORY -->
                 <Context path="/registroweb"
                 docBase="C:/registroweb" debug="99"
                 reloadable="true" >
                 </Context>
                
                
                 </Host>
                
                 </Engine>
                
                 </Service>
                
                </Server>
                


                I've tried this file on JBoss4.0.3, but in the jbossweb-tomcat55.sar folder, and it worked!!!

                Thank you, again!!!

                • 5. Re: Web folder
                  Peter Johnson Master

                  Post the full path name of a static file you are attempting to access. For example, my file was c:/registry/some.html

                  And post the URL you are using to access the static file. For example, I used http://localhost:8080/registry/some.html

                  By the way, I used JBossAS 4.2.2 and JDK 1.5.0_15.