JAVA JDK 实例宝典
xue1225go
HeRong 加油 !!! 必胜 !!!!!
展开
-
JSP无刷新聊天室
login.html 登录聊天室 <table width="400" height="100" border="1" align="center" cellpadding="0" cellspacing="0"> 登录聊天室 <form name="form1" method="post" action="/charpter1转载 2012-03-15 09:59:56 · 7804 阅读 · 5 评论 -
获取客户端的真实IP地址
获取客户端的IP地址 <% //获取HTTP头的x-forwarded-for信息 String realIP = request.getHeader("x-forwarded-for"); if(realIP != null && realIP.length() != 0){ //如果有x-forwarded-for信息,而且等于unknown,则继续读取下一个信息转载 2012-03-14 15:36:02 · 879 阅读 · 0 评论 -
设置和读取Cookie
使用Cookie记录用户访问本网页的次数 <% Cookie temp = null; //取得Cookie资料 Cookie[] cookies = request.getCookies(); int cookielen = cookies.length; int count = 0; String date = ""; if (cookielen != 0)转载 2012-03-14 16:42:05 · 1068 阅读 · 0 评论 -
使用JspSmart文件上传
index.html 文件上传 文件上传选择 <form method="post" action="do_upload.jsp" enctype="multipart/form-data"> 1、 2、 3、转载 2012-03-15 13:14:24 · 4248 阅读 · 2 评论