Monday, August 17, 2015

Weblogic ServletContext getRealPath - NullPointerException




Follow these steps to handle NullPointerException in web application while executing

ServletContext.getRealPath();

1. Login to weblogic console
2. Select Domain
3. Web Application Tab
4. Enable Archived Real Path

You can also apply fix in application level by adding the following entry to weblogic.xml file:

<container-descriptor>
    <show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>

No comments:

AWS EC2 - SSH locked with UFW

Need to update the instance's user data: 1. Stop the instance 2. Right click (windows) or ctrl + click (Mac) on the instance to open a c...