Cannot access sub-directory when war deployed in staging mode (Doc ID 953486.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Weblogic Server - Version: 10.3 and later   [Release: and later ]
Information in this document applies to any platform.

Goal

When an application war TestApplication.war file is deployed in WLS 10.3 it creates

                 server\stage\TestApplication\TestApplication.war (a war file)

When the same application is deployed on WLS 8.1 it creates

                server\stage\TestApplication\TestApplication.war (exploded directory)

If there is a sub directory inside the application, here, tmp which I am accessing from code:

getServlet().getServletContext().getRealPath("/tmp");

In WLS 8.1 there are no issues. Path of tmp is returned. In WLS 10.3 Path returned is null.


Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms