Migration scenario for the getHeaderNames method

WebSphere® Application Server Version 8 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:
Collection<String> getHeaderNames()
The com.ibm.websphere.servlet.response.StoredResponse class that existed before WebSphere Application Server Version 8 had the following method:
Enumeration getHeaderNames()

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.

전이 사용자용 전이 사용자용: 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

주제 유형을 표시하는 아이콘 개념 주제



시간소인 아이콘 마지막 업데이트 날짜: July 9, 2016 6:07
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=cweb_getheadernames_migration
파일 이름:cweb_getheadernames_migration.html