How to configure Wildfly to serve static content (like images)?

Add another file handler and another location to the undertow subsystem in standalone.xml: <server name=”default-server”> <http-listener name=”default” socket-binding=”http”/> <host name=”default-host” alias=”localhost”> <location name=”https://stackoverflow.com/” handler=”welcome-content”/> <location name=”/img” handler=”images”/> </host> </server> <handlers> <file name=”welcome-content” path=”${jboss.home.dir}/welcome-content” directory-listing=”true”/> <file name=”images” path=”/var/images” directory-listing=”true”/> </handlers>

Spring Security on Wildfly: error while executing the filter chain

Investigating the problem I have noticed that there is some mess with cookies and referers in the auth request. Currently wildfly authentication will work if you change webapplication context to the Root Context: <server name=”default-server” default-host=”webapp”> <http-listener name=”default” socket-binding=”http”/> <host name=”default-host” alias=”localhost” default-web-module=”sso.war”/> </server> After restarting wildfly and clearing cookies all should work as expected

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)