I am using Jdeveloper 11.1.1.7.0
and developing Oracle adf web application. The default domain of weblogic server is C:\Users\User\AppData\Roaming\JDeveloper\system11.1.1.7.40.64.93\DefaultDomain\
.
It is expecting all files in this default domain location only. It is not reading from the project. So how to change this behaviour so that it can read from the project current path.
Will any one help on this issue.
Get the path from any image file then use that path to set the user.dir. Here getAbsoluteFile() and getAbsolutePath() plays a vital role.
String path=FacesContext.getCurrentInstance().getExternalContext().getResource("/samp.png").getPath();
File directory = new File(path).getAbsoluteFile();
System.out.println("***directory*" + directory.getAbsolutePath());
if (directory.exists()) {
System.setProperty("user.dir", directory.getAbsolutePath());
}