我用jsp+tomcat调试jsp程序,出现Enumeration cannot be resolved 但我的程序有

bruce-feng bruce-feng 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

我的jsp文件是:
<%@ page language="java" import="java.sql.*" import="java.util.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Including the output of other jsps</title>
</head>

<body>
<% Enumeration enum = request.getParameterNames();
while(enum.hasMoreElements()){
String inputName = (String)enum.nextElement();
String inputVale = request.getParameter(inputName);
if(inputValue.equals("golferStats")){
%>
<jsp:include page="ShowGolferStats.jsp"/>
<%
}else if(inputValue.equals("courseStats")){
%>
<jsp:include page="ShowCourseStats.jsp"/>
<%}//end else clause
}//end while loop
%>
</body>
</html>


具体的错误是:


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 9 in the jsp file: /Hour16/DataPresentation.jsp
Enumeration cannot be resolved
6: </head>
7:
8: <body>
9: <% Enumeration enum = request.getParameterNames();
10: while(enum.hasMoreElements()){
11: String inputName = (String)enum.nextElement();
12: String inputVale = request.getParameter(inputName);


An error occurred at line: 9 in the jsp file: /Hour16/DataPresentation.jsp
Syntax error on token "enum", delete this token
6: </head>
7:
8: <body>
9: <% Enumeration enum = request.getParameterNames();
10: while(enum.hasMoreElements()){
11: String inputName = (String)enum.nextElement();
12: String inputVale = request.getParameter(inputName);


An error occurred at line: 10 in the jsp file: /Hour16/DataPresentation.jsp
Syntax error on token "enum", invalid Expression
7:
8: <body>
9: <% Enumeration enum = request.getParameterNames();
10: while(enum.hasMoreElements()){
11: String inputName = (String)enum.nextElement();
12: String inputVale = request.getParameter(inputName);
13: if(inputValue.equals("golferStats")){


An error occurred at line: 11 in the jsp file: /Hour16/DataPresentation.jsp
Syntax error on token "enum", delete this token
8: <body>
9: <% Enumeration enum = request.getParameterNames();
10: while(enum.hasMoreElements()){
11: String inputName = (String)enum.nextElement();
12: String inputVale = request.getParameter(inputName);
13: if(inputValue.equals("golferStats")){
14: %>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.14
急急急














...全文

相关推荐

Cherry-Studio-CN-2.1.6-win-x64-setup.exe

Cherry-Studio-CN-2.1.6-win-x64-setup.exe

深山技术宅

【高速电路设计】基于协议的板级布局指南:差分信号完整性与电源热管理协同优化方案

内容概要:本文档详细介绍了规格补充学习,并在实际项目中配合仿真工具与实测手段进行验证。

Kernel_RDMA

《AutoCAD 机械工程基础教程2014版》课件+教案+教学大纲

《AutoCAD 机械工程基础教程2014版》课件+教案+教学大纲

qq_38220914

国央企创新负责人如何借助平台实现创新资源的高效协同配置?.docx

科易网基于40亿+科创知识图谱数据库,深度探索AI技术在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,研究科技创新领域的AI+数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN

基于小波分析的小电流接地系统单相接地故障选线仿真【仿真+说明文档+说明PPT】

基于小波分析的小电流接地系统单相接地故障选线仿真【仿真+说明文档+说明PPT】内容概要:本文围绕一个多机器人路径规划(Multi-Agent Path Finding, MAPF)的MATLAB代码库进行系统性解读,重点阐述了基于优先级规划(Prioritized Planning, PP)的求解框架。该框架采用四层架构设计——几何解析、拓扑构建、调度规划与可视化呈现,实现了从地图输入到无冲突路径输出的完整流程。核心技术包括动态边权膨胀机制以缓解硬封锁带来的不可解问题、节点预留历史结构提升冲突查询效率、几何惩罚驱动的局部同步策略降低时间复杂度,以及基于Petri网的两阶段整数规划方法用于判定解的存在性与优化路径序列。文章还详细分析了三种时间同步策略的取舍、交换冲突的处理机制及可视化链路的设计实现,强调了工程实践中信息前移、模块解耦与可维护性的重要性。; 适合人群:具备一定算法基础和MATLAB编程能力,从事路径规划、多智能体系统、机器人调度等相关领域的科研人员与研究生。; 使用场景及目标:① 学习和复现多机器人路径规划中的优先级规划算法及其工程实现;② 理解动态边权膨胀、节点预留、局部同步等关键技术如何提升算法效率与鲁棒性;③ 借鉴模块化框架设计思想,应用于仓储物流、无人机编队、自动驾驶等实际场景的路径规划系统开发;④ 利用提供的可视化工具进行算法行为分析与教学演示。; 阅读建议:建议读者按照文中所述的数据流顺序逐步研读各模块,重点关注各层之间的接口设计与不变量约束,结合代码实践调试不同地图与智能体规模下的运行效果,并尝试调整惩罚权重、同步策略等参数以深入理解算法性能边界。

荔枝科研社
评论 4
收藏 已收藏
分享
返回顶部
bruce-feng
Apache 24,915 成员 16,537 内容