-2

I'm new to Java. So I have a java class titled "Banks" and I'm trying to write code in a JSP.....

This is what I have so far, but I don't want to keep going because of the errors. "Banks" is underlined and when I hover over it it says "Banks cannot be resolved to a type". What does that mean? I searched and it said that types should be capitalized and I did that but the error is still there.

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "w3.org/TR/html4/loose.dtd">
; 
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
</head>
<body>
<% 
    Banks b = new Banks(); //stuff goes in here 
    List<Accounts> accounts = bank.getAccounts();
%>
</table>
</body>
</html>
4castle
  • 32,613
  • 11
  • 69
  • 106
deezy
  • 1

1 Answers1

0

I think you are looking for: This is how you import in some cases.

<%@ page  import = "com.sample.Bank" %>

Put is just before the doc type. If this doesn't work search import JSP or import JSF or whatever technology seems right.

GC_

GC_
  • 448
  • 4
  • 23