Hi Ashish,
As you need to read property file in web application, upfront i can suggest you two aternative
Approach 1. Place your property file in web-inf directory, read the property file in the servlet wherein you can specify path of the property file in the servlet init parameter while registering the servlet in web.xml
Approach 2. Place your property file visible in the web application classpath (e.g. web-inf/classes location). You can easily read the property file by using following api in the Utility class where a Utility class is also at the same level
this.getClass().getClassLoader().getResourceAsStream(<Name of your properties file>)
explore some of the examples that how to use above API.
Regards,
Ritesh
You can parameterize the property file in the servlet
how to use property file for database connection in web application?
i have desktop application but i am not able to run web application using property file.