I have the following code which shows some products in a combobox
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%
List<String> productos = new ArrayList<>();
productos.add("TV");
productos.add("PC");
productos.add("Stereo");
productos.add("Iphone");
%>
<select>
<%
for (String p : productos)
{
out.println("<option>" + p + "</option>");
}
%>
</select>
</body>
</html>
But when I run it, I get the following error
org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6199: Generated servlet error: source value 1.5 is obsolete and will be removed in a future release PWC6199: Generated servlet error: target value 1.5 is obsolete and will be removed in a future release PWC6199: Generated servlet error: To suppress warnings about obsolete options, use -Xlint: -options. PWC6197: An error occurred at line: 17 in the jsp file: /index.jsp PWC6199: Generated servlet error: diamond operator is not supported in-source 1.5 (use -source 7 or higher to enable diamond operator) <
I have version 8 of Java, version 4.1.1 of Glassfish and the latest version of Netbeans.