Struts框架 自定义标签类文件(checkout所选书籍及其价钱)
来源:互联网 发布:遗传算法特征选择代码 编辑:程序博客网 时间:2024/06/07 23:41
package com.yourcompany.struts.model;
import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;
public class app extends TagSupport {
private Book[] name = null;
double money=0;
public Book[] getName() {
return name;
}
public void setName(Book[] name)
{
this.name = name;
}
public int doStartTag() throws JspException
{
JspWriter out = pageContext.getOut();
money=0;
for(int i=0;i<name.length;i++)
{
try
{
out.println("<LI>"+" "+name[i].getIsbn()+" "+name[i].getName()+" "+name[i].getPrice()+"$");
money = money + Integer.parseInt(name[i].getPrice());
} catch (IOException e)
{
e.printStackTrace();
}
}
try
{ out.println("<br>");
out.println("Total:"+money);
} catch (IOException e)
{
e.printStackTrace();
}
return SKIP_BODY;
}
}
- Struts框架 自定义标签类文件(checkout所选书籍及其价钱)
- Struts框架 自定义标签的tld文件
- Struts框架 JSTL,自定义标签导入以及自定义标签格式
- Struts:自定义标签(转)
- struts自定义标签
- 自定义struts标签
- struts自定义标签开发
- Struts自定义标签
- struts自定义标签
- struts 自定义标签
- 自定义struts标签分页
- struts自定义标签
- struts自定义标签
- struts-自定义标签
- SSH框架Struts文件上传自定义错误提示信息解决方案
- Struts应用及自定义标签
- Struts自定义标签的过程
- Struts 实现自定义分页标签
- 很忙碌。
- OpenGL 关于视景台gluPerpective,glFrustum的理解
- 免费的.cn域名,我的新域名
- 表变量的连接
- 设计模式之Factory
- Struts框架 自定义标签类文件(checkout所选书籍及其价钱)
- 开始学习java web开发
- Struts框架 自定义标签的tld文件
- 表变量问题
- 了解 Struts Validator
- 宣泄
- 让spring帮助你在MVC层解决JPA的缓迟加载问题
- Struts框架 JSTL,自定义标签导入以及自定义标签格式
- 研读Spring发布包带的例子petClinic源码之第一部分 POJO