/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.zyc.struts.action;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.zyc.struts.Listener.MessageSessionAttributeListener;
import com.zyc.struts.Listener.MessageSessionListener;
/**
* MyEclipse Struts
* Creation date: 02-20-2008
*
* XDoclet definition:
* @struts.action validate="true"
*/
public class MessageAction extends Action {
/*
* Generated Methods
*/
// private Map map=new HashMap();
/**
* Method execute
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
response.setContentType("text/xml;Charset=gbk");
response.setHeader("Cache-Control", "no-cache");
response.setCharacterEncoding("gbk");
int peoplecount=Integer.parseInt(request.getParameter("peoplecount"));
MessageSessionListener listener=new MessageSessionListener();
MessageSessionAttributeListener sessionAttributeListener=new MessageSessionAttributeListener();
int count=listener.getCount();
PrintWriter out;
// if(peoplecount<count){
// try {
// out=response.getWriter();
// List list=sessionAttributeListener.getlist();
// out.println("<?xml version=\"1.0\" encoding=\"gbk\"?>");
// out.println("<p>");
// out.println("<ps>");
// out.println("<count>"+count+"</count>");
// for(int index=peoplecount;index<list.size();index++){
// out.println("<name>"+new String(String.valueOf(list.get(index)).getBytes("iso8859-1"),"gbk")+"</name>");
// }
// out.println("</ps>");
// out.println("</p>");
// } catch (UnsupportedEncodingException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// } catch (IOException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// }
// if(peoplecount>count){
try {
out=response.getWriter();
List list=sessionAttributeListener.getlist();
out.println("<?xml version=\"1.0\" encoding=\"gbk\"?>");
out.println("<p>");
out.println("<ps>");
out.println("<count>"+count+"</count>");
for(int index=0;index<list.size();index++){
out.println("<name>"+new String(String.valueOf(list.get(index)).getBytes("iso8859-1"),"gbk")+"</name>");
}
out.println("</ps>");
out.println("</p>");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// }
return null;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
java在线客服
共84个文件
gif:29个
jar:10个
java:9个
3星 · 超过75%的资源 需积分: 1 29 下载量 117 浏览量
2016-09-28
19:48:03
上传
评论
收藏 1.39MB RAR 举报
温馨提示
java在线客服源码
资源推荐
资源详情
资源评论
收起资源包目录
在线客服.rar (84个子文件)
messagetest
.mystrutsdata 254B
.settings
com.genuitec.eclipse.j2eedt.core.prefs 1KB
src
com
zyc
struts
messageBean.java 771B
ApplicationResources.properties 86B
form
LoginForm.java 2KB
action
CloseSessionAction.java 1KB
LoginAction.java 1KB
MessageAction.java 3KB
SendMessagesAction.java 3KB
UploadfilesAction.java 1KB
Listener
MessageSessionAttributeListener.java 1KB
MessageSessionListener.java 896B
.project 1KB
WebRoot
uploadfile.jsp 1KB
center.html 761B
img
sefsefsf.gif 797B
{BB5A097A-6C1C-40E1-827C-78E7CC705952}_03.gif 14KB
send.jpg 21KB
U}ZK)C]S58~THH19N31GI2S_03.gif 901B
_notes
{BB5A097A-6C1C-40E1-827C-78E7CC705952}_03.gif.mno 191B
vwed.gif 778B
dbdbdb.gif 764B
ISO8358SM22UBUVVCL[@T9C_03.gif 232B
wadadS_03.gif 781B
U}ZK)C]Sadwadad.gif 1KB
loading.gif 2KB
META-INF
MANIFEST.MF 39B
WEB-INF
struts-nested.tld 70KB
validator-rules.xml 13KB
struts-bean.tld 9KB
struts-html.tld 72KB
struts-logic.tld 14KB
struts-tiles.tld 8KB
web.xml 1KB
.struts-config.mex 2KB
classes
com
zyc
struts
ApplicationResources.properties 86B
form
LoginForm.class 1KB
action
SendMessagesAction.class 4KB
LoginAction.class 2KB
MessageAction.class 3KB
CloseSessionAction.class 1KB
UploadfilesAction.class 1KB
messageBean.class 1KB
Listener
MessageSessionAttributeListener.class 2KB
MessageSessionListener.class 2KB
struts-config.xml 1KB
lib
jspSmartUpload.jar 14KB
commons-beanutils.jar 184KB
jakarta-oro.jar 64KB
commons-validator.jar 82KB
commons-fileupload.jar 22KB
commons-logging.jar 37KB
struts.jar 531KB
antlr.jar 350KB
commons-digester.jar 164KB
19145056215.jar 12KB
alert.html 32B
index.html 1KB
js
ajax.js 8KB
login.jsp 2KB
uploadfiles
brow
titter.gif 1KB
tongue.gif 2KB
smile.gif 2KB
mad.gif 2KB
kiss.gif 987B
cry.gif 3KB
shy.gif 3KB
hug.gif 1KB
lol.gif 1KB
sad.gif 1KB
funk.gif 3KB
huffy.gif 4KB
handshake.gif 1KB
victory.gif 1KB
Thumbs.db 28KB
loveliness.gif 2KB
biggrin.gif 1KB
shocked.gif 2KB
time.gif 687B
sweat.gif 2KB
call.gif 603B
message.html 5KB
.mymetadata 296B
.classpath 1KB
.myeclipse
共 84 条
- 1
资源评论
- wlwywcsdn2018-08-14谁能教下啊,index.html页面打开后怎么用?
- weixin_367076122019-07-30八百年前的代码也好意思传上来,真是浪费我的C币啊,一点参考价值都没有
- 我知道你是高手2017-10-16先用着,把分赚回来再说
谁的大王
- 粉丝: 111
- 资源: 79
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功