WAS v8.5 > Migrate, coexist, and interoperate > Migrating web applications > Migrating web application components

Migration scenario for the getHeaderNames method

WebSphere Application Server v8 and later supports the Java Servlet 3.0 API.

As part of the Java Servlet 3.0 API, the following method is included in the HttpServletResponse:

The com.ibm.websphere.servlet.response.StoredResponse class that existed before WAS v8 had the following method:

Because StoredResponse implements HttpServletResponse, StoredResponse no longer compiles without changing the return type of its getHeaderNames method to a type implementing Collection <String>. This change breaks any existing application using the old Enumeration return type.

For transitioning users: To ensure the most successful migration, the return type of the StoredResponse getHeaderNames method was changed to com.ibm.websphere.servlet.response.CollectionEnumerationHybrid<String>. This type implements both Collection<String> and Enumeration. trns


Related concepts:

Java Servlet 3.0 considerations


+

Search Tips   |   Advanced Search