How to enable symbolic link support in the file handler in EAP 7

Solution Unverified - Updated -

Issue

I enabled the following custom file handler in undertow subsystem to serve static contents from the specific path in EAP 7:

        <subsystem xmlns="urn:jboss:domain:undertow:4.0">
            ...
            <server name="default-server">
                <http-listener name="default" socket-binding="http" ... />
                ...
                <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content" />
                    <location name="/example" handler="example-file-handler" /> <!- added this -->
                </host>
            </server>
            ...
            <handlers>
                <file name="welcome-content" path="${jboss.home.dir}/welcome-content" />
                <file name="example-file-handler" path="/path/to/example/static-contents" /> <!- added this -->
            </handlers>

However, a symbolic link in the directory does not work through the file handler and static contents under the symbolic link are not accessible (404 not found is returned) in EAP 7.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content