6 Replies Latest reply on Jun 23, 2015 11:54 PM by jaikiran

    Wildfly 9.0 CR2 Symbolic Links

    roosjr

      I've downloaded and installed Wildfly 9.0 CR2 and like the improvements I've been seeing.  However, I'm needing the ability to use symbolic links.  I was under the impression this capability had been put back in 9.0 Beta 1 (WFLY-4254) after being removed in Wildfly 8.2.  If it is there how do I active it?

        • 1. Re: Wildfly 9.0 CR2 Symbolic Links
          ctomc

          as you can see in issue you linked you need to enable them in jboss-web.xml

           

          but when you are talking about symbolic links what exactly do you have in mind?

          • 2. Re: Wildfly 9.0 CR2 Symbolic Links
            roosjr

            I'm attempting to display image thumbnails on standard html web pages.  The images are accessed via symbolic links to my data storage area.   I did add the symbolic link flag to the jboss-web.xml but am still getting 404 error messages.

            • 3. Re: Wildfly 9.0 CR2 Symbolic Links
              ctomc

              James Roos wrote:

               

              I'm attempting to display image thumbnails on standard html web pages.  The images are accessed via symbolic links to my data storage area.   I did add the symbolic link flag to the jboss-web.xml but am still getting 404 error messages.

              in what context? as part of your war? or in you have file handler configured in undertow subsystem that handles your images?

              • 4. Re: Wildfly 9.0 CR2 Symbolic Links
                roosjr

                We expose a sub-folder that exists on the file system by defining a shared resource in a module.xml file and

                referencing it in our jboss-deployment-structure.xml configuration. Inside the sub-folder we keep a properties

                file which, in turn, specifies the complete path to another folder which is a symbolic link.

                So we have a module.xml file that contains this...

                 

                    <resources>

                        <resource-root path="../../../../../../../preferences"/>

                    </resources>

                  

                In this resource-root there is a file named:

                  specific.properties

                This contains key/value pairs like

                 

                LOCATION_OF_SMALL_PNG_FILES=c:\data\images\small_png_files

                 

                Where small_png_files is symbolically linked to F:\VERY_LARGE_DISK\ALL-IMAGES\SMALL_IMAGES\PNG-FILES.

                 

                We also declare under the undertow 2.0 section a file handler that points to the c:\data\images directory

                 

                        <handlers>
                            <file name="docBase" path="c:\data\images"/>
                        </handlers>
                • 5. Re: Wildfly 9.0 CR2 Symbolic Links
                  roosjr

                  The images identified in the previous response are also being served up in a URL inside a standard HTML web page.  The browser is pointing to that location (top level area is the docBase defined in the standalone.xml) but the image files are not being served up (we get the 404 messages).

                   

                  I'm wondering if the update you posted a week ago ( Expose symlink configuration and other attributes on file handler - wildfly/FileHandler.java at master · wildfly/wildfly · GitHub) will address some of the issues we are experiencing.

                  • 6. Re: Wildfly 9.0 CR2 Symbolic Links
                    jaikiran

                    Could you please attach an application to this thread which reproduces the issue that you are running into? Please also include the exact URLs that you are using (and which are failing) so that someone can quickly take a look.