Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Classloader getSystemResourceAsStream Error  RSS feed

 
A Kumar
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
 
Steve Morrow
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • 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...
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!