aspose file tools*
The moose likes Servlets and the fly likes Writing to properties file in WEB-INF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Writing to properties file in WEB-INF" Watch "Writing to properties file in WEB-INF" New topic
Author

Writing to properties file in WEB-INF

Zak Nixon
Ranch Hand

Joined: Sep 27, 2003
Posts: 126
This is an addedum to my previous problem: Writing properties to file.

Now, I am trying to read the db.properties file located in my
WEB-INF directory. Whenever I try to read the file though, using
.
I take the absolute path of this file, and it turns out to be
C:\db.properties. Is there anyway I can specify the path to be
in the WEB-INF directory by not specifying the absolute path?

Thanks

Zak
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61426
    
  67

Check out ServletContext.getRealPath().


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Writing to properties file in WEB-INF