资源简介

该项目仅供参考,主要使用jsp、servlet、ajax技术开发的一个微博系统,实现了微博系统的基本功能。内涵完整源代码、数据库、使用说明等文件。下载后直接只需修改必要的数据库用户名、密码即可运行。

资源截图

代码片段和文件信息

import java.text.SimpleDateFormat;

import javaBean.Blog;
import javaBean.Message;

import DAO.IMyWeiBo;
import DAO.MyWeiBo;


public class test {
public static void main(String[] args) {
/*Message message=new Message();
message.setUserid(“received“);
message.setSender(“sender“);
message.setMessagetext(“messagetext“);
message.setMessagetime(“time“);

IMyWeiBo mwb=new MyWeiBo();
//将私信内容保存到数据库
//mwb.sendMessage(message);
System.out.println(message.getUserid()+“    “+message.getSender());
System.out.println(“已私信内容保存到数据库“);*/
String blogid=“41“;
Blog blog=new Blog();
MyWeiBo mwb= new MyWeiBo();
blog=mwb.getBlogByBlogId(blogid);

String blogtext=“转发:  //@“+blog.getUsername()+“ “+  blog.getBlogtext()+“ “;


Blog blog2= new Blog();
blog2.setUserid(“001“);//userid
blog2.setBlogtext(blogtext);//blogtext
blog2.setBlogimage(blog.getBlogimage());//blogimage
SimpleDateFormat sdf=new SimpleDateFormat(“MM-dd HH:mm“); 
String blogtime=(String)sdf.format(new java.util.Date());
blog2.setBlogtime(blogtime);
mwb.saveBlog(blog2);
mwb.doForward(blogid);
System.out.println(“已转发并保存到数据库“);
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-05-12 12:38  SchoolWeiBo\
     目录           0  2012-10-17 10:18  SchoolWeiBo\Database\
     文件     1310720  2012-12-18 23:46  SchoolWeiBo\Database\MyWeiBo_Data.MDF
     文件     1048576  2012-12-18 23:46  SchoolWeiBo\Database\MyWeiBo_Log.LDF
     目录           0  2012-12-18 23:21  SchoolWeiBo\SchoolWeiBo\
     文件         529  2012-09-25 20:42  SchoolWeiBo\SchoolWeiBo\.classpath
     目录           0  2012-11-21 21:39  SchoolWeiBo\SchoolWeiBo\.myeclipse\
     文件         529  2012-09-25 20:42  SchoolWeiBo\SchoolWeiBo\.myeclipse\.classpath
     目录           0  2012-10-11 11:32  SchoolWeiBo\SchoolWeiBo\.myeclipse\.myeclipse\
     文件         297  2012-09-25 20:43  SchoolWeiBo\SchoolWeiBo\.myeclipse\.mymetadata
     文件        1751  2012-09-12 09:27  SchoolWeiBo\SchoolWeiBo\.myeclipse\.project
     目录           0  2012-10-11 11:32  SchoolWeiBo\SchoolWeiBo\.myeclipse\.settings\
     文件         500  2012-09-12 09:24  SchoolWeiBo\SchoolWeiBo\.myeclipse\.settings\.jsdtscope
     文件         395  2012-09-12 09:24  SchoolWeiBo\SchoolWeiBo\.myeclipse\.settings\org.eclipse.jdt.core.prefs
     文件         462  2012-09-25 20:42  SchoolWeiBo\SchoolWeiBo\.myeclipse\.settings\org.eclipse.wst.common.component
     文件         252  2012-09-25 20:42  SchoolWeiBo\SchoolWeiBo\.myeclipse\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2012-09-25 20:42  SchoolWeiBo\SchoolWeiBo\.myeclipse\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2012-09-25 20:42  SchoolWeiBo\SchoolWeiBo\.myeclipse\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2012-11-21 21:39  SchoolWeiBo\SchoolWeiBo\.myeclipse\profiler\
     文件         834  2012-11-21 21:39  SchoolWeiBo\SchoolWeiBo\.myeclipse\profiler\test (1).xml
     目录           0  2012-10-11 11:32  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\
     目录           0  2012-10-11 11:32  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\DAO\
     文件        1740  2012-10-06 10:07  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\DAO\IMyWeiBo.java
     文件       29978  2012-10-07 23:54  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\DAO\MyWeiBo.java
     目录           0  2012-10-11 11:32  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\DB\
     文件        2765  2012-10-11 10:46  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\DB\DB.java
     目录           0  2012-10-11 11:32  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\javaBean\
     文件        1280  2012-09-20 14:27  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\javaBean\Blog.java
     文件         783  2012-10-05 16:28  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\javaBean\Comment.java
     文件         220  2012-09-20 14:27  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\javaBean\FavBlog.java
     文件         742  2012-09-21 10:29  SchoolWeiBo\SchoolWeiBo\.myeclipse\src\javaBean\Message.java
............此处省略503个文件信息

评论

共有 条评论