How to access a file in a JBoss deployment?
Issue
-
Is it possible to access a resource in deployment with the following code only when deployment is exploded (extracted into a directory structure)? Unable to get the resource when deploying in the form of a jar archive such as an EAR:
URL url = SomeClass.class.getResource("SomeResource"); FileInputStream stream = new FileInputStream (new File (url));
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.x
- 6.0.x
- 6.1.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
