• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Classloader getSystemResourceAsStream Error

 
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a piece of code that goes like this...

This is in one of the classes that is invoked at the time of the web application startup




When i ouput the ip..it give as null

I am not sure where should i keep the file so that the class can fetch it...

The class which has this code is in WEB-INF/classes/pkg


Thanks in advance

Regards
 
Ranch Hand
Posts: 657
Spring VI Editor Clojure
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am not sure where should i keep the file so that the class can fetch it...


In the classpath.

~
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thats true....

i kept in

web-inf/lib
web-inf

tomcat_server/common/lib
tomcat_server/bin

But it still cannot locate it...
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thats true....

i kept in

web-inf/lib
web-inf

tomcat_server/common/lib
tomcat_server/bin

But it still cannot locate it...
 
Everybody's invited. Even this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic