• 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
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

getInitParameter not working...

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a problem with this method.
I am running my servlet in install-dir/webpages/WEB-INF/servlets/
and have servlets.properties in install-dir/webpages/WEB-INF/ but
my Servlet doesn't read initialization values. I dont' know why.
I thought I set up all the CLASSPATH and PATH right..
Can you think of anything?
Thanks
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to find out what directory is the actual working directory for your servlet. It's not always obvious. Put a debug printout in your servlet to tell you this info. You obtain it using System.getProperty("user.dir"). Then ensure your property file is place in the directory it shows.
Hope this helps
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic