Fixes are available
APAR status
Closed as program error.
Error description
ServletContext.getRealPath does not work for files in the extended document root. The method ServletContext.getRealPath(path) does not work for files in the extended document root. For Example with this configuration: <jspAttributes xmi:id="JSPAttribute_1274102087474" name="extendedDocumentRoot" value="C:\test\"/> and this structure in C:\test: test.jsp and this code in a servlet: response.getWriter().println(getServletContext().getRealPath("/t est.jsp" )); the path of the WAR file is returned, not the extended document root. LOCAL FIX: none.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server V6.1 * **************************************************************** * PROBLEM DESCRIPTION: The ServletContext.getRealPath() Java * * Servlet API does not look for the * * requested resource in an * * extendedDocumentRoot path. * **************************************************************** * RECOMMENDATION: * **************************************************************** The ServletContext.getRealPath() Java Servlet API will not return the correct path for a requested resource when the resource exists in an extendedDocumentRoot path and does not exist in the installed application path.
Problem conclusion
The ServletContext.getRealPath() Java Servlet API has been updated to look for the requested resource in the extendedDocumentRoot path if the resource is not found in installed application path. If the requested resource is also not found in the extendedDocumentRoot path, a null value is returned. To enable this new behavior, the following webcontainer custom property needs to be set: com.ibm.ws.webcontainer.checkEDRingetRealPath = true (default is false) Note: the similar problem has been fixed for IBM WebSphere Application Server Version 7.0 release with APAR PM21451. Please refer to the following technote for instructions on enabling WebContainer custom properties: http://www.ibm.com/support/docview.wss?rss=180&uid=swg21284395 The fix for this APAR is currently targeted for inclusion in fix pack 6.1.0.43. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PM48454
Reported component name
WEBSPHERE APP S
Reported component ID
5724J0800
Reported release
610
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-09-22
Closed date
2011-11-28
Last modified date
2011-11-28
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
WEBSPHERE APP S
Fixed component ID
5724J0800
Applicable component levels
R61A PSY
UP
R61H PSY
UP
R61I PSY
UP
R61P PSY
UP
R61S PSY
UP
R61W PSY
UP
R61Z PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
28 October 2021