Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Examples for SymlinkAllowedResourceAliasChecker in XML config file

Le jeudi 26 juin 2025 23:18:17 CEST, vous avez écrit :
> Are you creating / adding custom Base Resources?
> 
> Or are you just serving standard static content from your `<Set
> name="war">/run/schroot/mount/dev/usr/share/css-validator/css-validator</Set>`
> path?

I don't think I'm adding custom Base Resources. I just serve the content of /run/schroot/mount/dev/usr/share/css-validator/css-validator.

> Then you'll have an easier time just configuring the DefaultServlet to
> allow aliases and/or symlinks
> In either file ...

Thanks! That was helpful and it works (I'll stick with the XML configuration approach which is easier to maintain as a separate package rather than modifying the jetty server configuration).

One more question. Why does it actually work (and follow the symlinks in WEB-INF/lib) even if I don't use "SymlinkAllowedResourceAliasChecker"? Is it because of this statement in https://javadoc.jetty.org/jetty-12/org/eclipse/jetty/ee8/nested/ContextHandler.html?

"By default, the context is created with the AllowedResourceAliasChecker which is configured to allow symlinks. If this alias checker is not required, then clearAliasChecks() or setAliasChecks(List) should be called."

But if I use `clearAliasChecks()` like this (<Call name="clearAliasChecks" />) symlinks are still followed.

Is this a bug or a feature?

Regards
Fab




Back to the top