ServletContext getRealPath cause problems on Weblogic

Hi All,

Sometime we face issues with the application where some of the Jsp/servlets try to access the resources using getRealPath of the ServletContext class.

The problem is that it works only when you explode the war file. Even there is a CR CR299135 for the weblogic 10+ versions to tackle this issue.

You have to configure the <show-archived-real-path-enabled> flag to let weblogic returns the actual path of the application.

This configuration can be applied 2 ways.

1. Domain Level

2  Application Level

1. For setting Domain Level: Open the config.xml and set the




2 Now to configure at Application Level, in weblogic.xml




Hope this helps.

R Vashi

1 thought on “ServletContext getRealPath cause problems on Weblogic

  1. Mahesh

    I am not seeing any weblogic.xml in my Application level and when i added the parameter in Domain level it is not working, do you mean to say WEB.XML ?? Please help me i got stuck from 2 days.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.