TopAndBottom.java
资源名称:wapjsp.rar [点击查看]
上传用户:xiao85513
上传日期:2010-01-11
资源大小:2160k
文件大小:1k
源码类别:
手机WAP编程
开发平台:
Java
- package tagclass;
- import javax.servlet.jsp.*;
- import javax.servlet.jsp.tagext.*;
- public class TopAndBottom extends TagSupport
- {
- String title;
- public String getTitle()
- {
- return this.title;
- }
- public void setTitle(String newTitle)
- {
- this.title=newTitle;
- }
- public int doStartTag() throws JspException
- {
- try
- {
- pageContext.getOut().print("<table height=100% width=100%><tr height=10%><Td align=center><h1>*"+this.getTitle()+"*</h1></td></tr><TR valign=top><TD align=center>");
- }
- catch(Exception e)
- {
- throw new JspException(e);
- }
- return EVAL_BODY_INCLUDE;
- }
- public int doEndTag() throws JspException
- {
- try
- {
- String s="</td><tr><tr height=5% valign=bottom><Td><div align=right><a href='mailto:cyndi2@mail.china.com'>联系cyndi</a>|<a href='help.htm'>查看帮助</a>|<a href='http://herald.seu.edu.cn'>艺文频道</a></div><div align=center>herald版权所有</div></td></tr></table>";
- String t=new String(s.getBytes("gb2312"), "ISO8859_1");
- pageContext.getOut().print(t);
- }
- catch(Exception e)
- {
- throw new JspException(e);
- }
- return EVAL_PAGE;
- }
- }