I am very new to JSP programming and I need to solve an error really fast for a project . Apologies if my research is insufficient .
I am getting the following error in my jsp
Syntax error on token "final", invalid VariableDeclaratorId
118: sanitize = sanitize.replace("[","").trim();
119: sanitize = sanitize.replace("]","").trim();
120: sanitize = sanitize.replace("\"","").trim();
121: String[] final = sanitize.split(",");
122:
123:
124: for(int i=0;i<final.length;i++){
An error occurred at line: 124 in the jsp file: /inc/AddClientForm.jsp
Syntax error on token "final", invalid Expression
121: String[] final = sanitize.split(",");
122:
123:
124: for(int i=0;i<final.length;i++){
125:
126:
127:
I am essentially splitting a string into an array and populating it on my jsp . I have the following imports on my jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*" %>
<%@ page import="java.lang.String" %>