Apache Tomcat Java code review rules

Under the Java code review set of rules, the Apache Tomcat to WebSphere code migration category contains multiple rules. To learn how to get more information about a rule, see Displaying detailed help.

Rule Name Rule Description Automated Fix
Avoid using the invalid initial context java:/comp This rule detects an invalid initial context string that starts with java:/comp instead of java:comp (without the "/"). No
Do not use Tomcat org.apache.juli.logging This rule detects logging methods from the org.apache.juli.logging package and will help migrate your application to use the java.util.logging.Logger class. No
Do not use Apache Tomcat packages and APIs This rule detects instances of Apache Tomcat specific packages and APIs which need to be migrated. No
Do not use the Apache Tomcat BasicDataSource This rule detects instances of the org.apache.tomcat.dbcp.BasicDataSource class that is not available in WebSphere. No
Do not use the org.apache.tomcat.websocket. server.WsServerContainer doUpgrade method Migrate the Tomcat WsServerContainer doUpgrade method to the new IBM WebSocket API WsWsocServerContainer doUpgrade method. No
Ensure context lookups have corresponding deployment descriptor entries This rule detects initial context lookups so that you can check for corresponding environment variable entries in the web.xml file. No
Migrate MBeans specific to other application servers

This rule detects all invocations of the javax.management.ObjectName constructor that might be application-server specific and would need to be migrated for the application to run on WebSphere Application Server.

No
Validate the result of concatenation with getRealPath("/")

In WebSphere, getRealPath("/") returns a String that does not end in a trailing slash. Check that concatenation with this method adds a trailing slash if necessary.

No
Validate the result of concatenation with getRealPath("")

In Liberty, getRealPath("") returns a String that does not end in a trailing slash. Check that concatenation with this method adds a trailing slash if necessary.

No