2 Replies Latest reply on Jan 21, 2006 10:06 AM by jjf112

    Using a symlink in a web URL

    jjf112

      I have a web application deployed on a JBoss app server. I want to access some content that is on the actual linux server that is not in the web application root. Is it possible to access these files from the web url using symbolic links? I can't get it to work. Thanks.

        • 1. Re: Using a symlink in a web URL
          payet.b

          It's not a safety and clean idea to try to access directly files of your filesystem from a web application and not very portable. But you can experiement a solution using "hard link" instead of "symbolic link" under linux, with an exploded web application.
          Ex:

          bertou$ cat /tmp/myexternalfile.html


          My test file


          My test file content



          bertou$
          ln /tmp/myexternalfile.html default/deploy/jbossweb-tomcat50.sar/ROOT.war

          bertou$ lynx -dump "http://127.0.0.1:8080/myexternalfile.html"
          My test file content

          • 2. Re: Using a symlink in a web URL
            jjf112

            Thanks for the reply. I actually need to access a directory of csv files and you cannot create a hard link to a directory. Are there any other ways. Does JBoss not support symbolic links? Thanks.