• 大小: 755KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-01
  • 语言: Java
  • 标签: java  web  入门  网站源码  

资源简介

网络交友网站采用纯javabean+JSP+Mysql实现,实现会员注册、会员登录、会员查找、会员浏览、公共留言、私人留言等功能。项目源码包web_sy.zip里面包含网络交友网站的所有源码以及sql脚本。适合java web开发初级者。

资源截图

代码片段和文件信息

package tom.jiafei;
import java.io.*;
public class HandleMessage
{ String content=null;
  public void setContent(String s)
    {content=s; 
    }
 //获取属性content的值,为了能显示HTML或JSP源文件,需进行流的处理技术:
 public String getContent()
   { try{ StringReader in=new StringReader(content) ;//指向字符串的字符流。
          PushbackReader push=new PushbackReader(in);
          StringBuffer stringbuffer=new StringBuffer(); 
          int c; 
          char b[]=new char[1];              
          while ( (c=push.read(b01))!=-1)//读取1个字符放入字符数组b。 
            { String s=new String(b);
              if(s.equals(“<“))        //回压的条件  
               {  push.unread(‘&‘);
                  push.read(b01); //push读出被回压的字符字节放入数组b.
                  stringbuffer.append(new String(b));
                  push.unread(‘L‘);
                  push.read(b01); //push读出被回压的字符字节放入数组b.
                  stringbuffer.append(new String(b));
                  push.unread(‘T‘);
                  push.read(b01); //push读出被回压的字符字节放入数组b.
                  stringbuffer.append(new String(b));
                }
              else if(s.equals(“>“))        //回压的条件  
               {  push.unread(‘&‘);
                  push.read(b01); //push读出被回压的字符字节放入数组b.
                  stringbuffer.append(new String(b));
                  push.unread(‘G‘);
                  push.read(b01); //push读出被回压的字符字节放入数组b.
                  stringbuffer.append(new String(b));
                  push.unread(‘T‘);
                  push.read(b01); //push读出被回压的字符字节放入数组b.
                  stringbuffer.append(new String(b));
               }
              else if(s.equals(“\n“))        
               {  stringbuffer.append(“
“);
               }
              else
               { stringbuffer.append(s);
               }
            }
          push.close();
          in.close();
          return  content=new String(stringbuffer);  
        }
   catch(IOException e)
      {return content=new String(“不能读取内容“);
      }   
 }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         544  2011-07-01 21:23  sql.txt
     目录           0  2011-05-29 18:21  web_sy\
     文件         456  2011-05-29 18:22  web_sy\.classpath
     目录           0  2011-05-29 18:21  web_sy\.myeclipse\
     文件         291  2011-06-11 09:29  web_sy\.mymetadata
     文件        1412  2011-05-29 18:23  web_sy\.project
     目录           0  2011-06-05 15:48  web_sy\.settings\
     文件         500  2011-05-29 18:21  web_sy\.settings\.jsdtscope
     文件          49  2011-05-29 18:21  web_sy\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2011-05-29 18:21  web_sy\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2011-05-29 18:21  web_sy\src\
     目录           0  2011-05-29 18:21  web_sy\src\tom\
     目录           0  2011-05-29 18:21  web_sy\src\tom\jiafei\
     文件        2193  2011-06-05 23:33  web_sy\src\tom\jiafei\HandleMessage.java
     文件        1547  2011-05-28 16:56  web_sy\src\tom\jiafei\Login.java
     文件         889  2010-05-25 14:47  web_sy\src\tom\jiafei\PageNumber.java
     文件        1356  2011-06-05 17:26  web_sy\src\tom\jiafei\PublicWord.java
     文件        2583  2011-06-05 22:37  web_sy\src\tom\jiafei\Register.java
     文件        1638  2011-06-05 23:33  web_sy\src\tom\jiafei\SecretWord.java
     目录           0  2011-06-07 18:01  web_sy\WebRoot\
     文件        1606  2011-06-05 23:35  web_sy\WebRoot\delete.jsp
     文件        2885  2011-05-28 16:53  web_sy\WebRoot\find.jsp
     文件         814  2011-06-06 23:31  web_sy\WebRoot\head.txt
     文件        1909  2011-06-06 10:47  web_sy\WebRoot\leaveword.jsp
     文件        1883  2011-06-05 16:28  web_sy\WebRoot\login.jsp
     文件        1512  2011-06-05 16:28  web_sy\WebRoot\message.jsp
     目录           0  2011-05-29 18:21  web_sy\WebRoot\meta-INF\
     文件          36  2011-05-29 18:21  web_sy\WebRoot\meta-INF\MANIFEST.MF
     文件        4353  2011-06-05 22:55  web_sy\WebRoot\ModifyMessage.jsp
     文件        3290  2011-05-28 16:54  web_sy\WebRoot\modifyPassword.jsp
     文件        4728  2011-06-05 23:24  web_sy\WebRoot\publicMessage.jsp
............此处省略17个文件信息

评论

共有 条评论