2

Getting Below error on Jsp when added below Code..

Code : Map<Long, String> topMenuMap = new HashMap<Long, String>();

Error : The type java.util.Map$Entry cannot be resolved.

It is indirectly referenced from required .class files

Jacob G.
  • 28,856
  • 5
  • 62
  • 116
Sumit Singh
  • 229
  • 3
  • 7
  • 4
    A general recommendation would be to put your Map in a Controller/Servlet – Stefan Dec 29 '17 at 11:21
  • [Update your toolchain, JSP engine, libraries, frameworks, etc.](https://stackoverflow.com/a/26105217/2711488)… – Holger Jan 02 '18 at 16:11

2 Answers2

3

import java.util.* in JSP page <%@ page import="java.util.*" %>

Youcef LAIDANI
  • 55,661
  • 15
  • 90
  • 140
Anupam Biswas
  • 66
  • 1
  • 4
0

here they say to upgrade Tomcat 7 to higher version to be compatible with Java 8. Minimum version is Tomcat 7.0.54

https://www.howopensource.com/2015/07/unable-to-compile-class-for-jsp-the-type-java-util-mapentry-cannot-be-resolved/

j23
  • 160
  • 9