Hello,
Several of my jsp pages include other jsp pages. The project has many errors: "x cannot be resolved to a type". Is there a way to resolve these errors? Below is a small example of the issue:
JSP #1:
<%@ page import="com.testing.Introduction" %>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Hello</title>
</head>
<body>
<%
Introduction intro = new Introduction();
String speak = intro.sayHello();
%>
<p><%=speak %></p>
<%@ include file="Name.jsp" %>
</body>
</html>
JSP #2:
<html>
<head>
<title>Name</title>
</head>
<body>
<%
String speak2 = intro.sayName();
%>
<p>
<%=speak2 %>
</p>
</body>
</html>
Class:
package com.testing;
public class Introduction
{
public static void main(String[] args) {
}
public Introduction() {
super();
}
public String sayHello() {
return "Hello";
}
public String sayName() {
return "My name is Sam";
}
}
The error shows up in Name.jsp; the issue is with "intro". Any ideas how to resolve this issue?
Thank you in advance for your help!