ITeye博客

struts2

共 2 篇文章

struts2中iterator标签迭代一行两列

假如有jsp页面要实现一个列表信息,格式如下: 第1条信息 第2条信息 第3条信息 第4条信息 第5条信息 第6条信息 第7条信息 第8条信息 <table width="500" border="0" cellspacing="0" cellpadding="0"> <s:iterator value="myList" var="m" status="index"> <s:if test="#index.odd || #index.first"> <tr> </s:if> <td><s:property value="#m.name"/></td> <s:if test="#index.e…

2011-11-24 10:51 · struts2 · JSP · table · iterator

struts2 实现随机验证码

action中的代码: [code="java"]@Controller(value = "randomPictureAction") public class RandomPictureAction extends BaseAction { private static final long serialVersionUID = -6950908478971552308L; private ByteArrayInputStream inputStream; public String execute() throws Exception { // 在内存中创建图象 int width = …

2011-03-24 17:28 · struts2 · Apache · Struts · XML · JSP · 配置管理