0
Remote.jsp代碼:的<jsp:包括標籤不工作的<jsp:包括頁= 「Remote.jsp」/>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Remote Value</title>
</head>
<body>
<%
File remote = new File("D:\\test.txt");
FileReader fr = new FileReader(remote);
int ch;
while((ch = fr.read()) != -1)
out.println("<p>" + (char)ch + "</p>");
fr.close();
%>
</body>
</html>
<jsp:include page="Remote.jsp"/>
被嵌入到另一個jsp和路徑是正確的。 但每次我得到一個異常。
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 11 in the jsp file: /Remote.jsp File cannot be resolved to a type