I am using Wildfly 11 and Java 8. I am trying to deploy an EAR file containing multiple WAR files. One of my WAR files contains this in his web.xml ...
<context-param>
<param-name>Owasp.CsrfGuard.Config</param-name>
<param-value>csrfguard.properties</param-value>
</context-param>
This file is in one of my WARS in
myapp.war/WEB-INF/classes/csrfguard.properties
When I deploy WAR myself, everything deploys normally. However, when I deploy the EAR containing the WAR, I get an error complaining about the inability to find the properties file ...
Caused by: java.io.IOException: unable to locate resource - csrfguard.properties
at org.owasp.csrfguard.CsrfGuardServletContextListener.getResourceStream(CsrfGuardServletContextListener.java:85)
at org.owasp.csrfguard.CsrfGuardServletContextListener.contextInitialized(CsrfGuardServletContextListener.java:36)
... 10 more
I feel that there is a class loader issue, and I don't understand how to work. How do I tell my EAR file where to find the properties file?
source
share