【发布时间】:2025-11-27 13:25:01
【问题描述】:
我试图在我的 JSP 页面中包含 2 个 JSP 文件。我的主页名为 temp.jsp - 它位于我的 Web 项目中名为 tempFolder 的子文件夹中。 我试图在主项目文件夹(称为 invalidcqs.jsp)中包含一个文件,在主项目文件夹的子文件夹(envmon)中包含一个文件(称为 env_status_report.jsp)。
我的 temp.jsp 文件中的代码是:
<html>
<head>
<title>Screen1 using includes</title>
<meta http-equiv="refresh" content="10"/>
</head>
<body style="background-color:#E6E6FA">
<%@ include file="../envmon/env_status_report.jsp" %>
<br><hr><br>
<%@ include file="../invalidcqs.jsp" %>
</body>
</html
第二个包含 <%@ include file="../invalidcqs.jsp" %> 工作正常,但第一个 <%@ include file="/../envmon/env_status_report.jsp" %> 在 Eclipse 中显示错误。
错误的文本是:
Multiple annotations found at this line: - Syntax error on token "else", delete this token - Syntax error, insert "Finally" to complete TryStatement - Syntax error on token "else", delete this token
有谁知道为什么 Eclipse 不喜欢这个?
【问题讨论】: