几个错误帮忙卡下呗

zwb521 2010-10-22 09:54:50
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 12 in the jsp file: /abcd.jsp
Calendar cannot be resolved to a type
9: String ls_lasttime="";
10: String ls_now="";
11: String content="";
12: Calendar cal=Calendar.getInstance();
13: ls_now=cal.get(Calendar.DAY_OF_MONTH);
14:
15: String cantwrite="";


An error occurred at line: 12 in the jsp file: /abcd.jsp
Calendar cannot be resolved
9: String ls_lasttime="";
10: String ls_now="";
11: String content="";
12: Calendar cal=Calendar.getInstance();
13: ls_now=cal.get(Calendar.DAY_OF_MONTH);
14:
15: String cantwrite="";


An error occurred at line: 13 in the jsp file: /abcd.jsp
Calendar.DAY_OF_MONTH cannot be resolved to a type
10: String ls_now="";
11: String content="";
12: Calendar cal=Calendar.getInstance();
13: ls_now=cal.get(Calendar.DAY_OF_MONTH);
14:
15: String cantwrite="";
16: String filename = request.getRealPath(lsfn_time);


An error occurred at line: 24 in the jsp file: /abcd.jsp
IOException cannot be resolved to a type
21: {
22: f.createNewFile();
23: }
24: catch(IOException e)
25: {
26: cantwrite="y";
27: }


An error occurred at line: 41 in the jsp file: /abcd.jsp
The operator || is undefined for the argument type(s) boolean, String
38: fr.close();
39: }
40:
41: if(ls_lasttime!=ls_now || request.getParameter("lsreload"))
42: {
43: try
44: {


An error occurred at line: 45 in the jsp file: /abcd.jsp
PrintWriter cannot be resolved to a type
42: {
43: try
44: {
45: PrintWriter pw = new PrintWriter(new FileOutputStream(filename));
46: pw.println(ls_now);
47: pw.close();
48: }


An error occurred at line: 45 in the jsp file: /abcd.jsp
PrintWriter cannot be resolved to a type
42: {
43: try
44: {
45: PrintWriter pw = new PrintWriter(new FileOutputStream(filename));
46: pw.println(ls_now);
47: pw.close();
48: }


An error occurred at line: 45 in the jsp file: /abcd.jsp
FileOutputStream cannot be resolved to a type
42: {
43: try
44: {
45: PrintWriter pw = new PrintWriter(new FileOutputStream(filename));
46: pw.println(ls_now);
47: pw.close();
48: }


An error occurred at line: 49 in the jsp file: /abcd.jsp
IOException cannot be resolved to a type
46: pw.println(ls_now);
47: pw.close();
48: }
49: catch(IOException e)
50: {
51: cantwrite="y";
52: content="error writing file.";


An error occurred at line: 71 in the jsp file: /abcd.jsp
Duplicate local variable filename
68:
69: if(cantwrite!="y")
70: {
71: String filename = request.getRealPath(lsfn_content);
72: java.io.File f = new java.io.File(filename);
73: if(!f.exists())
74: {


An error occurred at line: 72 in the jsp file: /abcd.jsp
Duplicate local variable f
69: if(cantwrite!="y")
70: {
71: String filename = request.getRealPath(lsfn_content);
72: java.io.File f = new java.io.File(filename);
73: if(!f.exists())
74: {
75: try


An error occurred at line: 79 in the jsp file: /abcd.jsp
IOException cannot be resolved to a type
76: {
77: f.createNewFile();
78: }
79: catch(IOException e)
80: {
81: cantwrite="y";
82: }


An error occurred at line: 86 in the jsp file: /abcd.jsp
PrintWriter cannot be resolved to a type
83: }
84: try
85: {
86: PrintWriter pw = new PrintWriter(new FileOutputStream(filename));
87: pw.println(content);
88: pw.close();
89: }


An error occurred at line: 86 in the jsp file: /abcd.jsp
PrintWriter cannot be resolved to a type
83: }
84: try
85: {
86: PrintWriter pw = new PrintWriter(new FileOutputStream(filename));
87: pw.println(content);
88: pw.close();
89: }


An error occurred at line: 86 in the jsp file: /abcd.jsp
FileOutputStream cannot be resolved to a type
83: }
84: try
85: {
86: PrintWriter pw = new PrintWriter(new FileOutputStream(filename));
87: pw.println(content);
88: pw.close();
89: }


An error occurred at line: 90 in the jsp file: /abcd.jsp
IOException cannot be resolved to a type
87: pw.println(content);
88: pw.close();
89: }
90: catch(IOException e)
91: {
92: cantwrite="y";
93: }

...全文
184 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
renjianguokeivor 2010-10-22
  • 打赏
  • 举报
回复
错误信息里都说的很清楚了
zwb521 2010-10-22
  • 打赏
  • 举报
回复
您有关于包引用讲解么
霜之哀伤 2010-10-22
  • 打赏
  • 举报
回复
不懂要学啊,这些都是基础的Java的问题,你要先学基础。
基础要靠自己,不要上来就问
qybao 2010-10-22
  • 打赏
  • 举报
回复
需要的包没有引入
zwb521 2010-10-22
  • 打赏
  • 举报
回复
还有这几个

An error occurred at line: 14 in the jsp file: /114look.jsp
Type mismatch: cannot convert from int to String
11: String ls_now="";
12: String ls_content="";
13: Calendar cal=Calendar.getInstance();
14: ls_now=cal.get(Calendar.DAY_OF_MONTH);
15:
16: String cantwrite="";
17: String filename = request.getRealPath(lsfn_time);


An error occurred at line: 42 in the jsp file: /114look.jsp
The operator || is undefined for the argument type(s) boolean, String
39: fr.close();
40: }
41:
42: if(ls_lasttime!=ls_now || request.getParameter("lsreload"))
43: {
44: try
45: {


An error occurred at line: 72 in the jsp file: /114look.jsp
Duplicate local variable filename
69:
70: if(cantwrite!="y")
71: {
72: String filename = request.getRealPath(lsfn_content);
73: java.io.File f = new java.io.File(filename);
74: if(!f.exists())
75: {


An error occurred at line: 73 in the jsp file: /114look.jsp
Duplicate local variable f
70: if(cantwrite!="y")
71: {
72: String filename = request.getRealPath(lsfn_content);
73: java.io.File f = new java.io.File(filename);
74: if(!f.exists())
75: {
76: try

JSP语法我不懂,呵呵
霜之哀伤 2010-10-22
  • 打赏
  • 举报
回复
An error occurred at line: 12 in the jsp file: /abcd.jsp
Calendar cannot be resolved to a type

这不是说的很明白么。
sling2007 2010-10-22
  • 打赏
  • 举报
回复
没有引入相应的包啊

在页面的加入
<%@ page import="java.util.*,java.io.*" %>
zwb521 2010-10-22
  • 打赏
  • 举报
回复
比如ls_now=cal.get(Calendar.DAY_OF_MONTH);

哪里有错啊,怎么强制转换成string
内容概要:本文围绕水陆两栖无人机的任务规划与执行问题,提出了一种基于Matlab实现的智能路径规划解决方案,重点融合粒子群优化算法(PSO)与遗传算法(GA)进行三维环境下的避障路径规划。研究系统性地构建了从复杂地形建模、任务需求分析到算法设计与仿真实验的完整流程,实现了在多约束、动态障碍物等复杂环境下无人机的高效任务调度。通过对GA与PSO两种智能优化算法在路径长度、收敛速度、路径平滑度及稳定性等方面的对比分析,深入探讨了各自在无人机路径规划中的适用场景与性能差异,验证了所提方法在提升任务执行效率与安全性方面的有效性。该方案不仅适用于水陆交互通用场景,也为多模态无人系统自主导航提供了可扩展的技术框架。; 适合人群:具备一定Matlab编程能力和算法基础,从事无人机路径规划、智能优化算法研究、自动化控制或相关领域科研工作的研究生、科研人员及工程技术人员。; 使用场景及目标:①应用于水陆两栖无人机在复杂自然环境(如江河湖海与陆地交错区域)中的自主巡航与任务执行;②比较遗传算法与粒子群算法在三维动态路径规划中的优化性能,指导实际工程中算法选型;③为多约束条件下无人系统的自主决策与实时避障提供算法支持与仿真验证平台。; 阅读建议:建议读者结合提供的Matlab代码进行动手实践,重点关注两种算法的数学建模过程、适应度函数设计、参数调优策略及路径生成逻辑,通过仿真实验直观对比算法性能差异,深入理解智能优化算法在复杂路径规划问题中的应用机制与优化潜力。

58,440

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧