After deploying a war in Jboss I've noticed problems with readin Velocity templates. Basically it appears that:
.getClass().getClassLoader().getResource("/template/xhtml/text.vm")
doesn't return anything but null, however:
.getClass().getClassLoader().getResource("template/xhtml/text.vm")
works fine, as good as
.getClass().getResource("/template/xhtml/text.vm)
I've tried java 2 classloading compliance on and off, I also tried different combinations ejblenient and using/not using jboss classloader in tomcat.
The resource being looked for is located in webapp.war/WEB-INF/lib/webwork.2.1.jar.
Environment: jboss 4.0.0 jdk 1.5.0-b64
Is this documented behaviour or known issue?