Fixes are available
8.5.5.4: WebSphere Application Server V8.5.5 Fix Pack 4
8.5.5.5: WebSphere Application Server V8.5.5 Fix Pack 5
8.5.5.6: WebSphere Application Server V8.5.5 Fix Pack 6
8.5.5.7: WebSphere Application Server V8.5.5 Fix Pack 7
8.5.5.8: WebSphere Application Server V8.5.5 Fix Pack 8
8.5.5.9: WebSphere Application Server V8.5.5 Fix Pack 9
8.5.5.10: WebSphere Application Server V8.5.5 Fix Pack 10
8.5.5.11: WebSphere Application Server V8.5.5 Fix Pack 11
8.5.5.12: WebSphere Application Server V8.5.5 Fix Pack 12
8.5.5.13: WebSphere Application Server V8.5.5 Fix Pack 13
8.5.5.14: WebSphere Application Server V8.5.5 Fix Pack 14
8.5.5.15: WebSphere Application Server V8.5.5 Fix Pack 15
8.5.5.14: WebSphere Application Server V8.5.5 Fix Pack 14
8.5.5.17: WebSphere Application Server V8.5.5 Fix Pack 17
8.5.5.20: WebSphere Application Server V8.5.5.20
8.5.5.18: WebSphere Application Server V8.5.5 Fix Pack 18
8.5.5.19: WebSphere Application Server V8.5.5 Fix Pack 19
8.5.5.16: WebSphere Application Server V8.5.5 Fix Pack 16
8.5.5.21: WebSphere Application Server V8.5.5.21
APAR status
Closed as program error.
Error description
Servlet 3.0 Specifications state, in section 12.2, the following: . The empty string ("") is a special URL pattern that exactly maps to the application's context root, that is, requests of the form http://host:port/<contextroot>/. In this case the path info is ’/’ and the servlet path and context path is empty string (""). Specifying an empty string as the URL pattern of a servlet causes a 302 redirection from http://host:port/<contextroot> to http://host:port/<contextroot>/ and the servlet is never invoked. Once in http://host:port/<contextroot>/ a 404 error page is displayed if there is no other servlet with a URL pattern that matches the relative path '/'. . An example of a servlet mapping that causes the issue: . <servlet> <servlet-name>test-servlet</servlet-name> <servlet-class>com.example.TestServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>test-servlet</servlet-name> <url-pattern></url-pattern> </servlet-mapping>
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server Liberty Profile version 8.5.5 * **************************************************************** * PROBLEM DESCRIPTION: An empty string ("") as the URL pattern * * of a servlet causes an unwanted 302 * * redirection and a * * java.lang.StringIndexOutOfBoundsExcepti * * on occurs. * **************************************************************** * RECOMMENDATION: * **************************************************************** The Servlet 3.0 Specification, in section 12.2, states the following: The empty string ("") is a special URL pattern that exactly maps to the application's context root, i.e., requests of the form http://host:port/<contextroot>/. In this case the path info is ?/? and the servlet path and context path is empty string (""). However when using the Liberty Profile, specifying an empty string ("") as the URL pattern of a servlet causes a 302 redirection from http://host:port/<contextroot> to http://host:port/<contextroot>/ and the servlet is never invoked. Once in http://host:port/<contextroot>/ a 404 error page is displayed if there is no other servlet with a URL pattern that matches the relative path '/'. Also, the following exception will be thrown: com.ibm.ws.webcontainer.webapp.WebApp E jspAwareCreateServletWrapper SRVE0271E: Uncaught init() exception created by servlet [SERVLET_NAME] in application [APPLICATION_NAME]: java.lang.StringIndexOutOfBoundsException at java.lang.String.charAt(String.java:555) at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.j ava:1648) at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.j ava:1622) at com.ibm.ws.webcontainer.webapp.WebApp.jspAwareCreateServletWrapp er(WebApp.java:1405) at com.ibm.ws.webcontainer.webapp.WebApp.createServletWrappers(WebA pp.java:1351) [...] The following is an example of a servlet mapping that causes the issue:    <servlet>         <servlet- name>test-servlet</servlet-name>         <servlet- class>com.example.TestServlet</servlet-class>     </servlet>     <servlet-mapping>         <servlet-name>test-servlet</servlet- name>         <url-pattern></url-pattern>     </servlet- mapping>
Problem conclusion
The WebContainer code has been modified to properly map an empty string ("") URL pattern to the application's context root. The fix for this APAR is currently targeted for inclusion in fix pack 8.5.5.4. 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
PI27348
Reported component name
WAS LIBERTY COR
Reported component ID
5725L2900
Reported release
855
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2014-10-10
Closed date
2014-10-16
Last modified date
2014-10-16
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
WAS LIBERTY COR
Fixed component ID
5725L2900
Applicable component levels
R855 PSY
UP
Document Information
Modified date:
28 April 2022