• 大小: 11.34MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-06
  • 语言: Java
  • 标签: JSP  SQL  

资源简介

JSP和SQL实现的管理系统,很好,可以看看,适合大学生做毕业设计,入门级教材,可参考,很好的资源,模块划分详细,代码完整,逻辑清晰

资源截图

代码片段和文件信息

package com.org.action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.org.service.*;

import java.util.*;

public class AddNewsAction extends ActionSupport{

private String title;
private String content;
private String author;

private String  type;

private NewsDetailControl newsDetailCtrl;

    public void setNewsDetailCtrl(NewsDetailControl newsDetailCtrl)
    {
        this.newsDetailCtrl = newsDetailCtrl;
    }


public String execute() throws Exception 
{
Map session = ActionContext.getContext().getSession();
boolean returnCode=newsDetailCtrl.AddNews(title contentauthortype);
if (returnCode==true)
{
return SUCCESS;
}
else
{
addActionerror(“保存记录失败“);
return “failure“;
}

}


public void validate()
{
if (gettitle() == null || gettitle().trim().equals(““))
{
addFieldError(“title“ “标题不能为空“);
}
if (getAuthor() == null || getAuthor().trim().equals(““))
{
addFieldError(“author“ “作者不能为空“);
}

if (getType() == null || getType().trim().equals(““))
{
addFieldError(“type“ “类型不能为空“);
}
if (getContent() == null || getContent().trim().equals(““))
{
addFieldError(“content“ “内容不能为空“);
}

}





public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}

public String gettitle() {
return title;
}
public void settitle(String title) {
this.title = title;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}


}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2635  2008-01-21 23:11  新闻中心管理系统2\sshnews\.classpath

     文件          4  2008-01-12 21:44  新闻中心管理系统2\sshnews\.cvsignore

     文件        442  2008-01-12 21:44  新闻中心管理系统2\sshnews\.project

     文件        356  2008-01-13 11:52  新闻中心管理系统2\sshnews\.tomcatplugin

     文件         47  2008-01-25 17:52  新闻中心管理系统2\sshnews\default.jsp

     文件        280  2008-01-25 20:18  新闻中心管理系统2\sshnews\error.jsp

     文件         51  2008-01-18 22:57  新闻中心管理系统2\sshnews\index.jsp

     文件          7  2008-01-12 21:44  新闻中心管理系统2\sshnews\WEB-INF\.cvsignore

     文件        576  2008-01-21 16:16  新闻中心管理系统2\sshnews\WEB-INF\admin\addnews.jsp

     文件        335  2008-01-21 15:17  新闻中心管理系统2\sshnews\WEB-INF\admin\adminfailure.jsp

     文件        187  2008-01-19 11:52  新闻中心管理系统2\sshnews\WEB-INF\admin\adminindex.jsp

     文件        457  2008-01-19 11:53  新闻中心管理系统2\sshnews\WEB-INF\admin\adminlogin.jsp

     文件       1159  2008-01-26 13:47  新闻中心管理系统2\sshnews\WEB-INF\admin\allnews.jsp

     文件        931  2008-01-21 19:42  新闻中心管理系统2\sshnews\WEB-INF\admin\editcontent.jsp

     文件        797  2008-01-21 17:49  新闻中心管理系统2\sshnews\WEB-INF\admin\editresult.jsp

     文件        777  2008-01-21 01:59  新闻中心管理系统2\sshnews\WEB-INF\admin\head.jsp

     文件          0  2008-01-17 22:58  新闻中心管理系统2\sshnews\WEB-INF\admin\newsdeleted.jsp

     文件        933  2008-01-21 17:57  新闻中心管理系统2\sshnews\WEB-INF\admin\viewcontent.jsp

     文件       3324  2008-01-21 01:39  新闻中心管理系统2\sshnews\WEB-INF\applicationContext.xml

     文件        541  2008-01-16 01:53  新闻中心管理系统2\sshnews\WEB-INF\classes\AdminUser.hbm.xml

     文件       2544  2008-01-21 23:11  新闻中心管理系统2\sshnews\WEB-INF\classes\com\org\action\AddNewsAction.class

     文件       2117  2008-01-21 23:11  新闻中心管理系统2\sshnews\WEB-INF\classes\com\org\action\AdminLoginAction.class

     文件       1517  2008-01-21 23:11  新闻中心管理系统2\sshnews\WEB-INF\classes\com\org\action\ClientAllNewsAction.class

     文件       1769  2008-01-21 23:11  新闻中心管理系统2\sshnews\WEB-INF\classes\com\org\action\ClientSearchNewwAction.class

     文件       1464  2008-01-21 23:11  新闻中心管理系统2\sshnews\WEB-INF\classes\com\org\action\ClientViewContentAction.class

     文件       1202  2008-01-21 23:11  新闻中心管理系统2\sshnews\WEB-INF\classes\com\org\action\DeleteNewsAction.class

     文件       2451  2008-01-21 23:11  新闻中心管理系统2\sshnews\WEB-INF\classes\com\org\action\EditNewsAction.class

     文件       1463  2008-01-21 23:11  新闻中心管理系统2\sshnews\WEB-INF\classes\com\org\action\GetAllNewsAction.class

     文件       1160  2008-01-21 23:11  新闻中心管理系统2\sshnews\WEB-INF\classes\com\org\action\interceptor\AdminLoginInterceptor.class

     文件       1965  2008-01-21 23:11  新闻中心管理系统2\sshnews\WEB-INF\classes\com\org\action\ViewContentAction.class

............此处省略140个文件信息

评论

共有 条评论