How to Load resources from "WEB-INF/someDir" in EAP6 using TCCL

Solution Unverified - Updated -

Issue

  • We want to load some resources from "WEB-INF/someDir"in EAP6.
  • Earlier in JBoss AS4 versions it was possible to load resources from "WEB-INF/someDir" as following:
 String res="/WEB-INF/someDir/test.properties";
 InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(res);
  • However now in EAP6 it returns "is=inputStream"

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.