DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13061>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13061 Use of getRealPath() prevents deployment in WAR or EAR file Summary: Use of getRealPath() prevents deployment in WAR or EAR file Product: Axis Version: current (nightly) Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Basic Architecture AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Under some application servers (tested with Weblogic 6.1), the current axis code base cannot be deployed as part of a WAR or EAR file. This is because the various calls to ServletContext.getRealPath() return null, as per the Java documentation (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getResource(java.lang.String)). When deployed as a WAR, the ServletContext.getResource() method should be used instead. This is an extension to bug 10512 which identified this problem in the AxisServlet doGet() method, but not in the other areas in which getRealPath() call occur. A quick solution is to modify all classes that call geRealPath() to check to see if the value returned was null. If it was null, then getResource() should be called instead. The following classes use getRealPath(): org.apache.axis.configuration.EngineConfigurationFactoryServlet org.apache.axis.server.JNDIAxisServerFactory org.apache.axis.transport.http.AxisServlet org.apache.axis.transport.http.AxisServletBase When I modified the above classes, I was able to deploy and use Axis from within a WAR file on Weblogic 6.1. I am not certain if using getResource() is sufficient or an optimal solution as I have not had the time to fully investigate the problem and solution yet. This problem will not occur on app servers such as Tomcat which allow getRealPath() calls to work when the application is deployed as a jar.