<input type="hidden" name="method" value="execute"/>//加上试试!<logic:iterate name="iterateList" id="iterateform" scope="request" type="com.youcompany.struts.form.Iterateform">
<tr>
<td><bean:write name="iterateform" property="name" filter="true"/></td>
<td><bean:write name="iterateform" property="home" filter="true"/></td>
<td><bean:write name="iterateform" property="num" filter="true"/></td>
<td><bean:write name="iterateform" property="email" filter="true"/></td>
<td><bean:write name="iterateform" property="passwd" filter="true"/></td>
<td><bean:write name="iterateform" property="userid" filter="true"/></td>
</tr>
</logic:iterate> asasaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
<tr>
<td><bean:write name="iterateform" property="name" filter="true"/></td>
<td><bean:write name="iterateform" property="home" filter="true"/></td>
<td><bean:write name="iterateform" property="num" filter="true"/></td>
<td><bean:write name="iterateform" property="email" filter="true"/></td>
<td><bean:write name="iterateform" property="passwd" filter="true"/></td>
<td><bean:write name="iterateform" property="userid" filter="true"/></td>
</tr>
</logic:iterate> asasaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
解决方案 »
- java 导出word文档。wps和word2010的兼容问题
- weblogic连接池不释放连接,当前连接数current capacity只增不减
- 求助:</html:select>标签问题
- 修改数据出现java.lang.NullPointerException!麻烦大家了!
- QQ上的系统发送小消息和邮箱新邮件提示消息发送是怎么做的?
- ssl
- 帮我看看代码,为何老是找不到dll?????
- struts2 的下载文件 下载文件的名称
- javax.servlet.ServletException: [Microsoft][ODBC Microsoft Access Driver] 标准表达式中数据类型不匹配
- 有了jsp+javabean,为什么还要servlet?
- 请问各位大虾有没有jsp/servlet/mysql/tomcat的中文解决方案!
- 谁能告诉我啊,我快傻了啊
用于taglib中的,很不错的!
如果不行!我也不会了!抱歉!
name id type scope都没问题啊,糊涂了啊
在控制台里就显示了。com.youcompany.struts.form.Iterateform@13245,
com.youcompany.struts.form.Iterateform@354g33,com.youcompany.struts.form.Iterateform@122fas.......................
我想这因该是读出来了吧,我是在DAO里读的数据,在action里显示的,
为什么在jsp 里没有啊
taglib是定义好的!
<logic:iterate name="iterateList" id="iterateform" scope="request" type="com.youcompany.struts.form.Iterateform">
<tr>
<td><%=iterateform.getName()%></td>
....
</tr>
</logic:iterate>这样应该就可以了,你试试吧!
其实你的jsp定得可能对了,我没有具体看:-) ,因为你错并是出在jsp中,是Action是错,不知你从哪里看到有要override父类的public ActionForward execute(...)方法,其实在Action中也写得很明白了:////////////////////如下//////////////////////////////////
/**
* An <strong>Action</strong> is an adapter between the contents of an incoming
* HTTP request and the corresponding business logic that should be executed to
* process this request. The controller (ActionServlet) will select an
* appropriate Action for each request, create an instance (if necessary),
* and call the <code>perform</code> method.</p>
*/
所以你重定execute方法是没有用的,只有写一个方法
public ActionForward execute(...){
return map.findForward(...);
}
就可以,你把你定写的execute换成perform准搞定,如行的话别了放分呀:-)
《jsp站点编程指南》里就是这么干的啊,那就是直接在public ActionForward execute(...){里写的啊。perform方法好象是以前老版本的吧,
我现在跳转到那个页面,只是不能显示iterate标签里的,但是页面的静态的字能显示,
你的方法是不是就把哪个方法名execute改成perform就好了啊,麻烦你了
Note: sun.tools.javac.Main has been deprecated.
/test/form/iterate.jsp:14: Undefined variable or class name: iterateForm
out.print((iterateForm.getName()));
^
1 error, 1 warning
com.youcompany.struts.form.Iterateform@354g33,com.youcompany.struts.form.Iterateform@122fas.......................
我觉得可能ktyl2000(天涯游子) 说的对,呵呵,被欺骗了,可是为什么啊,怎么解决请高手指点