wanjidong / jmesa

Automatically exported from code.google.com/p/jmesa
0 stars 0 forks source link

Lookup of jmesa.properties may fail at WebLogic Server #168

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Some containers like WebLogic Server return null when getRealPath() is
invoked.

This issues is also described in the following defect (for Struts 2):
 https://issues.apache.org/struts/browse/WW-186

A solutions to the problem is also described in the above defect. Here
is a summery of the solution:
[code]
String path = context.getRealPath(path);

if (path == null) {
 // resources are in a .war (JBoss, WebLogic)
 java.net.URL url = context.getResource(path);
 path = url.getPath();
}
[/code]

Original issue reported on code.google.com by jeff.johnston.mn@gmail.com on 5 Dec 2008 at 11:21