简单问题一问

gkcc 2003-10-19 02:44:45
<html>
<head>
<title>测试缓存程序一</title>
</head>
<body>
<%@ page session=false %>
<%! int counter; %>
<%
long now=System.currentTimeMillis();
//得到程序的时间
response.setDateHeader("Expires",now+15000);
%>
信息更新次数:<%=counter++%>

</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: /2_1.jsp(7,18) quote symbol expected
...........
...全文
31 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
funcong 2003-11-01
  • 打赏
  • 举报
回复
<html>
<head>
<title>测试缓存程序一</title>
</head>
<body>
<%@ page session=false %>
<%! int counter; %>//-------->这里有问题,由于counter没有初值,那么下面使用counter++就会出错
<%
long now=System.currentTimeMillis();
//得到程序的时间
response.setDateHeader("Expires",now+15000);
%>
信息更新次数:<%=counter++%>//-------->这里有问题,与上面相对应


</body>
</html>
gkcc 2003-11-01
  • 打赏
  • 举报
回复
type Exception report

message

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

exception

org.apache.jasper.JasperException: /2_1.jsp(7,18) quote symbol expected
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:363)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:123)
at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:243)
at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:188)
at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:201)
..........
gkcc 2003-11-01
  • 打赏
  • 举报
回复
Tomcat5.0
用http://127.0.0.1:8080/可以访问默认的页面
我把2_1.jsp放在了和默认页面相同的目录下
然后用http://127.0.0.1:8080/2_1.jsp访问,就出现了错误
我机子上也装了IIS,可我没有启动IIS服务啊

sunshinehx 2003-10-27
  • 打赏
  • 举报
回复
该文件在什么环境下运行?
我用weblogic6.1试过了,你的程序没问题,可能你访问的路径不正确。
gkcc 2003-10-20
  • 打赏
  • 举报
回复
这是一本书上得例子,我没改,怎么就不行呢?
sdbgaolj 2003-10-19
  • 打赏
  • 举报
回复
不使用session?
clare0peng 2003-10-19
  • 打赏
  • 举报
回复
<%@ page session=false %>
這句話的問題
ejb99666 2003-10-19
  • 打赏
  • 举报
回复
楼竹什么意思

81,091

社区成员

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

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