aspose file tools*
The moose likes JSP and the fly likes .ini file in Web App Environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark ".ini file in Web App Environment" Watch ".ini file in Web App Environment" New topic
Author

.ini file in Web App Environment

SP Nam
Ranch Hand

Joined: Oct 15, 2003
Posts: 41
Hi

I am using .ini file for some properties which are used in my jsp pages.
Where to put the .ini file as it is config file specific to web application.

Any suggestion please.

SP Nam
[ November 18, 2005: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60991
    
  65

What types of properties are you talking about? ini files are not part of the standards.

You might consider properties files or context parameter entries in web.xml.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
SP Nam
Ranch Hand

Joined: Oct 15, 2003
Posts: 41
I will go with properties files, how to got about it, where to put the property file.

SP Nam
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60991
    
  65

As with any other properties file, you can place it anywhere along the classpath and retrieve using the normal Java mechanisms.

Alternatively, you can place it anywhere within the web app context and use the ServletContext.getResourceAsStream method.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60991
    
  65

P.S. I slightly modified the title of this topic as it is not a Tomcat-specific issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: .ini file in Web App Environment