| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 472 人关注过本帖
标题:[求助]jsp问题,很是感谢。
只看楼主 加入收藏
ue1984
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-4-20
收藏
 问题点数:0 回复次数:1 
[求助]jsp问题,很是感谢。

可以获取数据,但打印结果全为null
<%
int count=0;
if (session.getAttribute("count")!= null )
{
count = Integer.parseInt((String)session.getAttribute("count"));
out.println(count);

String subject[] = new String[count+1];
String name[] = new String[count+1];
String time[] = new String[count+1];

time[count] = (String)session.getAttribute("time[count]");
name[count] = (String)session.getAttribute("name[count]");
subject[count] = (String)session.getAttribute("subject[count]");

//for (int i = 0 ; i < time.length ; i++)
//out.println(time[i]);

for (int i = 0 ; i < count+1 ; i++)
{
%>
<table width="768" border="1" align="center">
<tr bgcolor="#CCCCCC">
<td>&nbsp;<%=subject[i]%></td>
<td>&nbsp;<%=name[i]%></td>
<td>&nbsp;<%=time[i]%></td>
</tr>
</table>
<%}}%>

搜索更多相关主题的帖子: jsp 感谢 
2006-05-17 15:37
ue1984
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-4-20
收藏
得分:0 

又是自问自答,呵呵,就算自得其乐了。
用while作循环调用就好。这样太麻烦了。呵呵


2006-05-18 13:57
快速回复:[求助]jsp问题,很是感谢。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023209 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved