[jboss-user] [EJB3] - Get a file from resources with an EJB

ameo do-not-reply at jboss.com
Mon Nov 19 06:24:50 EST 2012


ameo [https://community.jboss.org/people/ameo] created the discussion

"Get a file from resources with an EJB"

To view the discussion, visit: https://community.jboss.org/message/777141#777141

--------------------------------------------------------------
Hello,

i have the following package structure within my EAR-File:

EAR
* ejb.jar
* jsf.war* css
* jsf
* WEB-INF
* resources

* lib

Now I want to access a file that is in the resources folder with an EJB.
The EJB is in the ejb.jar.

I tried the following...but what is the path to the resource folder ? AND where - in which folder - i have to put the resources?

| Thread.currentThread().getContextClassLoader().getResourceAsStream("..."); |  |

Thanks for your help,
ameo
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/777141#777141]

Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121119/23a5ceac/attachment.html 


More information about the jboss-user mailing list