Migrate Web application components from WAS V 5.x
Migration of Web apps deployed in previous versions of WAS is usually not necessary. WAS v7 supports...
- Java Servlet v2.2 v2.3 v2.4 v2.5
- JSP v1.2 v1.4 v2.0 v2.1
Servlet migration might be a concern if the app:
- Implements a WAS internal servlet to bypass a WAS V4.x single application path restriction
- Extends a PageListServlet that relies on configuration information in web.xml
- Calls the response.sendRedirect method using the encodeRedirectURL function or starting within a non-context root
- Depends on a default Content-Type response header being set or the behavior of a setContentType call after a getWriter call is made. The behavior is set by WAS version level using the Web container custom property...
com.ibm.ws.webcontainer.contenttypecompatibility...with a value of V4, V5, V6. or V7.
V4 V5 V6 V7 Default Content-Type text/html text/html; charset=<default_encoding> none none Append Charset on getWriter if the property does not exist on Content-Type Example:
response.setCharacterEncoding("UTF-8");
response.setContentType("text/xml"); response.getWriter();text/html text/html text/xml; charset=UTF-8 text/xml; charset=UTF-8 Remove charset from the Content-Type property if the setContentType property is called after getWriter with a ";charset=" portion Example:
setContentType("text/html;charset=ISO-8859-7"); getWriter(); setContentType("text/xml;charset=UTF-8");text/html text/html text/html text/xml; charset=ISO-8859-7
JSP migration might be a concern if the application references JSP page implementation classes in unnamed packages, or if we install WAS V4.x EAR files (deployed in V4.x with the JSP Precompile option), in V 5.x. we need to recompile all JSP pages when migrating from WAS V5.x.
Follow these steps if migration issues apply to your Web application:
- IBM internal servlets are used to enable special behavior such as file serving and serving servlets by class name. If a migrated application references internal servlets, the best practice is to enable or disable the functionality through the IBM WebSphere extensions XMI file, ibm-web-ext.xmi, located in each Web module WEB-INF directory or by using an assembly tool.
- If using these configuration options are not viable, then verify that the package names for the following internal servlets match what is used in the version 7 Web deployment descriptor.
Feature Configuration Option Servlet Class Directory browsing directoryBrowsingEnabled="true" com.ibm.ws.webcontainer.servlet.DirectoryBrowsingServlet Auto mapping of servlet paths serveServletsByClassnameEnabled="true: com.ibm.ws.webcontainer.servlet.SimpleFileServlet File serving fileServingEnabled="true" com.ibm.ws.webcontainer.servlet.FilterProxyServlet
- Add the Web container custom property...
com.ibm.ws.webcontainer.contenttypecompatibility...with a value of V4, V5, V6, V7. The value is determined by the version that the application is dependant on.
Because this property is a global setting, consider the effect on other applications.
Related tasks
Hot deployment and dynamic reloading
Migrate to Java Platform, Standard Edition (Java SE) 6
Assembly tools
Related
Web applications: Resources for learning
Set JVM sendRedirect calls to use context root 
Related information
Rational Application Developer documentation