Error when launching a JSP that uses a variable called enum
After migrating your store, you attempt to launch a custom store page but exception error messages are logged. You are using a variable called enum on your store page.
Problem
An
exception similar to the following
example occurs:
com.ibm.ws.jsp.webcontainerext.JSPErrorReport: JSPG0049E: /HostedStoreFrontAssetStore/UserArea/AccountSection/FLMyAccountDisplay.jsp failed to compile :
JSPG0091E: An error occurred at line: 248 in the file: /HostedStoreFrontAssetStore/UserArea/AccountSection/FLMyAccountDisplay.jsp
JSPG0093E: Generated servlet error from file: /HostedStoreFrontAssetStore/UserArea/AccountSection/FLMyAccountDisplay.jsp
/opt/IBM/WebSphere/AppServer/profiles/follett7/temp/WC_efollett_node/server1/WC_efollett/Stores.war/HostedStoreFrontAssetStore/UserArea/AccountSection/_FLMyAccountDisplay.java : 796 : Enumeration cannot be resolved JSPG0091E:
An error occurred at line: 248 in the file: /HostedStoreFrontAssetStore/UserArea/AccountSection/FLMyAccountDisplay.jsp
JSPG0093E: Generated servlet error from file: /HostedStoreFrontAssetStore/UserArea/AccountSection/FLMyAccountDisplay.jsp
/opt/IBM/WebSphere/AppServer/profiles/follett7/temp/WC_efollett_node/server1/WC_efollett/Stores.war/HostedStoreFrontAssetStore/UserArea/AccountSection/_FLMyAccountDisplay.java : 796 : Syntax error on token "enum", delete this token JSPG0091E:
Solution
You used enum as a variable in your custom JSP file, but enum is a data type in JDK 1.6. Data type names cannot be used as variable names. Rename the variable to a more appropriate value, such as myEnum.