ssh注册登录代码


用ssh实现的登录注册 还有文件的上传下载
资源截图
代码片段和文件信息
package com.action;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.Date;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.service.ArticleHandle;
import com.table.Article;
import com.table.Category;

public class Artic extends ActionSupport {
private String title;
private String content;
 private Date createTime;
  private Date updateTime;
private Category category;
private int score;
private int visitor;
private int commentor;
private String savePath;
private ArticleHandle articleHandle;
public String gettitle() {
return title;
}
public void settitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
public int getScore() {
return score;
}
public void setScore(int score) {
this.score = score;
}
public int getVisitor() {
return visitor;
}
public void setVisitor(int visitor) {
this.visitor = visitor;
}
public int getCommentor() {
return commentor;
}
public void setCommentor(int commentor) {
this.commentor = commentor;
}


public String getSavePath() {
return savePath;
}
public void setSavePath(String savePath) {
this.savePath = savePath;
}
public void setArticleHandle(ArticleHandle articleHandle) {
this.articleHandle = articleHandle;
}
public String execute() throws Exception{
String path1=savePath+“\“+gettitle();
        File f=new File(“f:“+File.separator+“SSH实例“+File.separator+“blog“+File.separator+“WebRoot“+File.separator+savePath+File.separator+gettitle()+“.txt“);
OutputStream out=new FileOutputStream(f);
String str=content;
byte[] b=str.getBytes();
out.write(b);
out.close();
if(articleHandle.add(titlepath1createTimeupdateTimescorevisitorcommentor)){

return SUCCESS;
}
else return ERROR;

}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-06-05 15:43  blog
     文件        4391  2013-05-18 08:51  blog.classpath
     目录           0  2013-06-08 09:28  blog.myeclipse
     文件         285  2013-05-16 21:30  blog.mymetadata
     文件        1277  2013-05-16 21:37  blog.project
     目录           0  2013-06-05 15:43  blog.settings
     文件         330  2013-05-16 21:30  blog.settingsorg.eclipse.jdt.core.prefs
     目录           0  2013-06-05 15:43  blogWebRoot
     目录           0  2013-06-05 15:43  blogWebRootmeta-INF
     文件          36  2013-05-16 21:30  blogWebRootmeta-INFMANIFEST.MF
     目录           0  2013-06-05 15:43  blogWebRootWEB-INF
     文件        1912  2013-06-05 12:28  blogWebRootWEB-INFactionContext.xml
     文件        3844  2013-06-05 12:29  blogWebRootWEB-INFean.xml
     目录           0  2013-06-05 15:43  blogWebRootWEB-INFclasses
     文件        5365  2013-06-05 12:30  blogWebRootWEB-INFclasses.struts.mex
     目录           0  2013-06-05 15:43  blogWebRootWEB-INFclassescom
     目录           0  2013-06-05 15:43  blogWebRootWEB-INFclassescomDao
     文件         441  2013-06-05 12:37  blogWebRootWEB-INFclassescomDaoArticleDao.class
     文件        2270  2013-06-05 12:43  blogWebRootWEB-INFclassescomDaoArticleDaoImpl.class
     文件         344  2013-05-30 17:06  blogWebRootWEB-INFclassescomDaoCategoryDao.class
     文件        1588  2013-05-30 18:02  blogWebRootWEB-INFclassescomDaoCategoryDaoImpl.class
     文件         256  2013-06-03 19:00  blogWebRootWEB-INFclassescomDaoPhotoDao.class
     文件        1419  2013-06-03 19:35  blogWebRootWEB-INFclassescomDaoPhotoDaoImpl.class
     文件         405  2013-06-02 16:48  blogWebRootWEB-INFclassescomDaoUserDao.class
     文件        1834  2013-06-02 17:29  blogWebRootWEB-INFclassescomDaoUserDaoImpl.class
     目录           0  2013-06-05 15:43  blogWebRootWEB-INFclassescomaction
     文件        3529  2013-06-04 16:46  blogWebRootWEB-INFclassescomactionArtic.class
     文件         753  2013-05-30 17:33  blogWebRootWEB-INFclassescomactionCategor.class
     文件         271  2013-06-03 19:06  blogWebRootWEB-INFclassescomactionDeletePo.class
     文件        1906  2013-06-02 10:37  blogWebRootWEB-INFclassescomactionLogin.class
     文件         706  2013-05-27 21:58  blogWebRootWEB-INFclassescomactionQuery.class
............此处省略155个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)