当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 关于这个问题可能每个人有自己的解决办法。
 

 

 ·tomcat3.1存在暴露网站路径问题    »显示摘要«
    摘要: 涉及程序: tomcat 3.1 描述: tomcat 3.1 存在暴露网站路径问题 详细: tomcat 3.1 是在 apache 软件环境下开发的一个支持 jsp 1.1 和 servlets 2.2 的软件。它存在一个安全问题当发送一个不存在的 jsp 请求时会暴露网站上网页的全路径:举例:http://narco.guerrilla.sucks.co:8080/anything.j......
 ·netscape修复java安全漏洞    »显示摘要«
    摘要: 涉及程序: netscape 4.0-4.74 描述: netscape 修复 java 安全漏洞 详细: netscape java 安全漏洞补丁 -------------------------------------------------------------------------------- netscape 4.0 至 4.74 版本, 存在一个安全漏洞,......


在STRUTS中如何处理查询的到的RESULTSET
关于这个问题可能每个人有自己的解决办法.

1) 自己写个类(假定为datamap),这个类继承hashmap,并实现dynabean 【程序编程相关:A sample class to cl

但如果要按照struts的风格来做,应该是这样的: 【推荐阅读:生成静态文件的新闻系统核心代码(.net

3)将多条数据(也就是多个datamap)填到一个arraylist 【扩展信息:VB.NET里最方面的XP风格解决方案

2) 将resultset中的数据取出填充到这个datamap中

4) 将这个arraylist放到你的actionform中

5)在jsp中引用, 仿照 struts-example中的例子引用.

例如:

<logic:iterate id="subscription" name="user" property="subscriptions">

<tr>

<td align="left">

<bean:write name="subscription" property="host" filter="true"/>

</td>

<td align="left">

<bean:write name="subscription" property="username" filter="true"/>

</td>

<td align="center">

<bean:write name="subscription" property="type" filter="true"/>

</td>

<td align="center">

<bean:write name="subscription" property="autoconnect"/>

</td>

</tr>

</logic:iterate>

这里subscriptions就是刚才讲的 那个arraylist

user是actionform的名字

subscription就是你那个datamap的实例,代表一条记录

那些property实际上就是字段名了.
...   下一页
 ·apachetomcat的snoopservlet漏洞    »显示摘要«
    摘要: bugtraq id 1500 class access validation error cve generic-map-nomatch remote yes local yes published july 24, 2000 updated july 24, 2000 vulnerable ibm websphere application server 3.0.21 - ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE