2 Replies Latest reply on Jun 28, 2007 10:24 AM by karink

    follow symbolic links just in one single war file

    karink

      Hi,
      I am using JBoss 4.0.5 with Tomcat 5.5.9 embedded.
      I would like to deploy an exploded war file having some symlinks to some static content. For all other deployed war files deployed in the same application server following the symbolic links should not be able.

      I read several forums entries about this issue giving the solution to
      configure the stuff in the global server.xml file in the default context
      like that

      <DefaultContext allowLinking="true"/>


      As I would like to have it just for my single war file, this could not be the solution for me.

      I tried deploying a context.xml file in WEB-INF directory of my war file with
      the following content

      <Context>
      <Resources className="org.apache.naming.resources.FileDirContext"
       allowLinking="true" docBase="" />
      </Context>


      Debugging it, I see that the context.xml is loaded, but nevertheless following the symbolic link fails.

      Any help is really appreciated
      Regards Karin

        • 1. Re: follow symbolic links just in one single war file
          karink

          Hi,
          even for global configuration the configuration stated above did not work
          Neither the DefaultContext flag nor the stuff in the context.xml
          I got the globally configuration only to work when I configure following in the global context.xml file

          <Context allowLinking="true" cookies="true" crossContext="true">
          ...
          </Context>


          Using this I could also supply the context.xml in the WEB-INF directory
          of my war file and then enabling the allowLinking support just for my single war.
          This was in fact exactly what I'm looking for.

          Just one question is open for me.
          Is this JBoss's recommended way to do it and will it be support in newer
          Tomcat/Jboss version?

          Regards
          Karin

          • 2. Re: follow symbolic links just in one single war file
            karink

            sorry I just recognized I use JBoss 4.0.5. and Tomcat 5.5.20
            Regards
            Karin