Object request with JSP

I have a problem with a JSP file. I want to get the title, but I have an error:

Une erreur s'est produite à la ligne: 45 dans le fichier jsp: /logTest.jsp
Enumeration cannot be resolved to a type
42: String headerString = "";
43: String name = "";
44: 
45: for (Enumeration en = request.getHeaderNames(); en.hasMoreElements(); ) {
46:     name = (String)en.nextElement();
47:     headerString = headerString + name + "=<B>" + request.getHeader(name) + "</B><BR>";
48: }

      

My object (request) is not null, so I don't understand why I have this error.

Can you help me?

Thank.

+2


source to share


1 answer


You need to import explicitly java.util.Enumeration

. The stack trace gave you the answer: "Enumeration could not be resolved for type."



+6


source







All Articles