Hi,
i want to access a property-file from an adapter-class.
Now i get this file with an FileInputStream. But every time i get an FileNotFoundException although the property-file stored in cis\WEB-INF\classes or cis\PROJECTNAME\appclasses\classes.
Hi Bjoern,
thanks. With the classloader it works fine. But how can i load the file if i store it in a directory like …\tomcat\webapps\cis\myProject\config or somewhere else in my webapp.
…sorry, the class was com.softwareag.cis.server.Params…
/**
* Each CIS project is represented by an own directory inside the Web-
* Application. The directory is directly located under the Web-Application directory.
* <br><br>
* Example: the web application may look like...:<br>
* webAppXYZ/casabac/.... <== some casabac directories<br>
* webAppXYZ/cisdemos/... <== the demos project<br>
* webAppXYZ/HTMLBasedGUI/... <== the CIS-own project<br>
* webAppXYZ/project1/... <== application project<br>
* webAppXYZ/project2/... <== application project<br>
* webAppXYZ/WEB-INF/...<br>
* webAppXYZ/META-INF/...<br>
*/
public static String getApplicationDirectoryName(String application)
…but as I said: pay attention to servlet container restrictions. We access the function “ServletContext.getRealPath(”“);” which is an optional function according to J2EE spec.