This is my maven web project structure, and I'm using java 8 + netbeans + jboss eap 6.
Project
|__/src
|__/main
|__/java
|__/resources
| |__/velocity
| -template.vm
|__/webapp
Once application is running I'm trying get de resource path /proyect/src/main/resources/velocity/ this way:
String path = SomeClass.class.getResource("/" + templateName).getPath();
but instead I'm getting a path inside jboss EAP /bin folder like this:
C:/Users/MyUser/EAP-6.4.0/bin/content/MyWebApp.war/WEB-INF/classes/velocity/
And obviously that path doesn't exist.