Home > general > Access Resources from webapp directory

Access Resources from webapp directory

I keep forgetting this…

Your best bet is to place the files you need to read into WEB-INF/classes and then
access them using the class loader. For example:

URL = myfileUrl =
Thread.currentThread().getContextClassLoader().getResource("my.file");

View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170852#4170852

Advertisements
Categories: general Tags:
  1. 6 September 2008 at 08:09

    wow , thanks for info

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: