JSP code review

Under the JSP code review set, the WebSphere version migration category has rules described in the following table. To learn how to get more information about a rule, see Displaying detailed help.

Note: JSP pages written in XML syntax (JSP documents) are not supported.

Table 1. Migrating from Version 5.1
Rule Name Rule Description Automated Fix
Check for behavior change for included JSP encoding

In JSP 2.0, page encoding is done on a per-file basis. This rule detects the statically included JSP files that have different page encoding than the parent JSP.

No
Check for behavior change on the request.getAttribute() method

This rule flags calls to request.getAttribute() in JSP files that use automatic casting to a String. However in V6, the request.getAttribute() method returns an Object, not a String.

No
Check for behavior change on URLs containing a plus sign

This rule flags a URI in a JSP link tag (<a>) or a form action tag (<form action=...) that contain a plus ("+") character in the URI but not a part of the query parameters. The plus ("+") is only reserved in the query string portion of the URL.

No
Do not use default packages in JSP import statements

As of JSP 2.0, you cannot refer to any classes from the unnamed (also known as the default) package. This rule detects JSP Import Directives that contain classes from the default package.

No

Table 2. V6.1 to V7.0 migration
Rule Name Rule Description Automated Fix
Do not redefine a taglib prefix using a different URI This rule flags JSP taglib directives which associate the same prefix attribute value with different uri attribute values. No

Table 3. V7.0 to V8.0 migration
Rule Name Rule Description Automated Fix
Do not use Java keywords in JSP and JSF expression language elements This rule flags JSP expression language (EL) elements with variables names that contain Java keywords or EL reserved keywords. No