Jsp简易留言板的实现:application与Arraylist应用示例
来源:互联网 发布:处方软件 编辑:程序博客网 时间:2024/06/05 05:07
<p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><u>index.jsp</u></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>< import="java.util.*"%></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><html xmlns="<a target=_blank href="http://www.w3.org/1999/xhtml" style="color: rgb(240, 109, 153);">http://www.w3.org/1999/xhtml</a>"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>index</title></head></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><body><% ArrayList al_say=new ArrayList(); application.setAttribute("say",al_say); response.sendRedirect("ChatRoom.jsp"); %> </body></html></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><u>ChatRoom.jsp</u></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>< import="java.util.*"%></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><html xmlns="<a target=_blank href="http://www.w3.org/1999/xhtml" style="color: rgb(240, 109, 153);">http://www.w3.org/1999/xhtml</a>"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>ChatRoom</title></head></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><body><form method=post action="say.jsp"> <input type="text" name="say"> <input type="submit" value="提交"> <input type="reset" value="重置"> </form></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><% ArrayList al_say=new ArrayList(); al_say=(ArrayList)application.getAttribute("say"); for (int says=0;says<al_say.size();says++){%> <%=al_say.get(says)%><br/> <%}%> </body></html></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><u>say.jsp</u></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>< import="java.util.*"%></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><html xmlns="<a target=_blank href="http://www.w3.org/1999/xhtml" style="color: rgb(240, 109, 153);">http://www.w3.org/1999/xhtml</a>"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"/><title>无标题文档</title></head></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; color: rgb(69, 69, 69); font-family: tahoma, helvetica, arial; font-size: 14px; line-height: 14px;"><body><% String say=new String (request.getParameter("say").getBytes("iso-8859-1")); ArrayList al_say=new ArrayList(); al_say=(ArrayList)application.getAttribute("say"); al_say.add(say); response.sendRedirect("ChatRoom.jsp"); %> </body></html></p>
0 0
- Jsp简易留言板的实现:application与Arraylist应用示例
- vuejs+bootstrap实现简易的留言板功能
- JSP语言做简易留言板
- 基于MVC的简易留言板
- JSP+Servlet+JavaBean传统方式实现简易留言板制作(注册、登录、留言)
- JSP教程--Application 的应用
- 【java集合】自己实现简易的ArrayList
- 简易留言板
- 简易留言板
- vue实现简易留言板(todolist)
- HTML5本地储存实现--简易留言板
- PHP简易表单验证与简易留言板实例
- 使用Java+MySQL做的简易留言板
- 使用Django开发一个简易的留言板
- 基于MVC的简易留言板-适合初学者
- 简单留言板的实现
- 数据库实现的留言板
- JSP+JavaBean+Servlet实现一个留言板
- Target_Action 设计模式
- Eclipse 3D编程配置
- C#连接MYSQL数据库,包括增删查改
- QT编写拨号 WINDOS利用宽带拨号Rasdial命令
- 栈的使用之检验算术表达式中括号是否配对
- Jsp简易留言板的实现:application与Arraylist应用示例
- Swift 属性 函数
- Java虚拟机学习笔记(三)——虚拟机性能监控与故障处理工具
- 判断两个链表是否相交
- MapReduce全局变量之捉虫记
- C#实现的组合模式
- 用yii发送邮件
- PowerDesigner 学习之数据仓库连接
- Leetcode Add Binary