infile.jsp代码如下:
<html>
<head><title>An Include Text</title></head>
<body bgcolor="white">
<%@ page buffer="8kb" autoFlush="true"%>
<%@ page import="java.util.*"%>
<%String temp=new String((new java.util.Date()).toLocaleString());%>
<jsp:include page="time.jsp" flush="true"/>
<jsp:param name="nowtime" value="<%=temp%>"/>
</jsp:include>
</body>
</html>time.jsp代码如下:
<html>
<head>
<title>An Include Text</title></head>
<body bgcolor="white">
<%
String time=new String();
time=request.getParameter("nowtime");
%>
<div align="center"><br>
<font color="blue" size="+5"><b>
现在的时刻为:
<%=time%>
</b></font>
</div>
</body>
</html>
为什么infile.jsp运行后会出错??
<html>
<head><title>An Include Text</title></head>
<body bgcolor="white">
<%@ page buffer="8kb" autoFlush="true"%>
<%@ page import="java.util.*"%>
<%String temp=new String((new java.util.Date()).toLocaleString());%>
<jsp:include page="time.jsp" flush="true"/>
<jsp:param name="nowtime" value="<%=temp%>"/>
</jsp:include>
</body>
</html>time.jsp代码如下:
<html>
<head>
<title>An Include Text</title></head>
<body bgcolor="white">
<%
String time=new String();
time=request.getParameter("nowtime");
%>
<div align="center"><br>
<font color="blue" size="+5"><b>
现在的时刻为:
<%=time%>
</b></font>
</div>
</body>
</html>
为什么infile.jsp运行后会出错??
解决方案 »
- 谁能给我讲讲List<String> list = new ArrayList<String>();和List list = new ArrayList()的区别吗?
- 一条update语句,这样写可以更新么?请教,谢~
- 请教关于"正在处理.."页面的问题
- Hibernat+Spring 问题
- 网站上传到网上后FCK编辑器不能上传图片了??!!
- 200分求助!java怎么调用proc?proc怎么编译并运行?
- jsp 中ResultSet的使用问题
- thinking in java2中的一处错误,可能是印刷错误!
- 请教有关页面跳转的问题
- 快帮帮我吧?还没解决.谢谢!
- JAVA如何获得客户端的IP???
- 紧急求救.Struts中errors.add(new ActionError("error.msg"))报错.谢谢(急)
是不是应该这样:
<jsp:include page="time.jsp" flush="true"/>
或者
<jsp:include page="time.jsp" flush="true"></jsp:include><jsp:include page="time.jsp" flush="true"/>...</jsp:include>报错
我没有试过,不敢断言^_^