This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Resource Loading from Container Apps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Resource Loading from Container Apps" Watch "Resource Loading from Container Apps" New topic

Resource Loading from Container Apps

Charley Watson

Joined: Mar 19, 2005
Posts: 10
I am looking for knowledge pointers on how to load a resource as stream from within a 2.0 compliant application. My utility class needs file resources that are/will be included in the root of a jar. Any help with this process is greatly appreciated.

My environment: JBoss 4.XX on WinXP,Linux...


Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Charley,

Here there is a piece of code that loads an xml stream at runtime:

There is one more side of the story: you need to understand your container class loader architecture in order to play with this code safely.

I think, therefore I exist -- Rene Descartes
I agree. Here's the link:
subject: Resource Loading from Container Apps
Similar Threads
Help: upgraded from tomcat 5.0 to 5.5.27 and getting Naming Exception
accessing message resources in processPreprocess
Remote Administration of Websphere
How to use one resource bundle in another bundle?
Accessing Resource bundle from Facelets UI