简体   繁体   中英

how to change behaviour of Jdeveloper expecting files in weblogic default domain

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());
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM