Inside my Webservice implementation inside Apache CXF
view plaincopy to clipboardprint?
@WebService public class STWeb implements STWebService {
// Inside this class , i need to read a properties file located in WEB-INF
/classes/ folder
}
Please tell me how to read the properties file , located in WEB-INF
/classes/ folder from this webservice implementation method
I tried using , the following options
1. InputStream is = this.getClass().getResourceAsStream("WEB-INF
/classes/STBwebservice.properties");
2.
view plaincopy to clipboardprint?
Properties properties = new Properties();
properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("WEB-INF
/classes/STBwebservice.properties"));
Please remember that this is a pure java file (i mean no JEE ) and please
suggest if theer is abeter approach for this
--
View this message in context:
http://cxf.547215.n5.nabble.com/How-to-load-a-custom-Properties-file-from-webservice-implementation-method-tp4984336p4984336.html
Sent from the cxf-user mailing list archive at Nabble.com.