资源简介
用JSP页面做的学生作业管理系统,使用MYSQL数据库。供参考。

代码片段和文件信息
import javax.mail.*;
import javax.mail.internet.*;
import java.util.Properties;
import java.sql.*;
import java.util.*;
/**
* Program uses with cron to check every minutes if some users:
* --> Still do not have submit their assignement 1 day before the due date
* --> have passed the due date for their assignement
* in each case an email is send to those users
*/
public class MailAutoDuedatePassed {
/**
* The database‘s connection
*/
protected static Connection _con;
/**
* The database‘s location
*/
protected static String _source = “jdbc:mysql://127.0.0.1/test“;
/**
* The database‘s user
*/
protected static String _dbmUser = “root“;
/**
* The database‘s password
*/
protected static String _dbmPassword = “admin“;
/**
* The smtp server‘s host
*/
protected static String _smtpServerHost = “127.0.0.1“;
/**
* The user‘s login to connect to the smtp server
*/
protected static String _smtpUserLogin = ““;
/**
* The password to connect to the smtp server
*/
protected static String _smtpPassword = ““;
/**
* The author of the email
*/
protected static String _mailAuthor = “NotificationSystem@sixtwenty.com“;
/**
* The main program checking the two issues
*/
public static void main(String[] args) {
// Initialisation of the connection with the database
try {
Class.forName(“com.mysql.jdbc.Driver“).newInstance();
_con = DriverManager.getConnection(_source _dbmUser _dbmPassword);
//if (!_con.isClosed())
// System.out.println(“Connected to “ + _source);
} catch(Exception e) {
System.err.println(“Unable to connect to the database“);
System.exit(1);
}
Vector infoImpend = new Vector();
Vector infoLate = new Vector();
String subjectImpend = ““;
String subjectLate = ““;
String contentImpend = ““;
String contentLate = ““;
checkDuedateImpend(infoImpend);
checkDuedatePassed(infoLate);
// Send all the emails for the impending projects
for (int i = 0; i < infoImpend.size(); i++) {
subjectImpend = “Project “ + infoImpend.elementAt(i).getProjectName()+ “ due date is impending“;
contentImpend = “Dear “ + infoImpend.elementAt(i).getUserName() + “\n\n“;
contentImpend = contentImpend + “The project “ + infoImpend.elementAt(i).getProjectName() + “(“ + infoImpend.elementAt(i).getProjectId() + “)“;
contentImpend = contentImpend + “ due date is impending.\nYou have now one day to submit your submission.“;
contentImpend = contentImpend + “\n\nPlease do not reply to this automatically send email.“;
try {
send(subjectImpend
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7801 2006-10-30 10:48 grp-e\db\createDb.sql
目录 0 2008-07-05 09:42 grp-e\db
文件 748 2006-10-30 10:48 grp-e\docs\definitions-list.html
文件 3497 2006-10-30 10:48 grp-e\docs\help-doc.html
文件 799 2006-10-30 10:48 grp-e\docs\index.html
文件 8362 2006-10-30 10:48 grp-e\docs\navbar.html
文件 4485 2006-10-30 10:48 grp-e\docs\operation-index.html
文件 937 2006-10-30 10:48 grp-e\docs\overview-summary.html
文件 1163 2006-10-30 10:48 grp-e\docs\st
文件 4554 2006-10-30 10:48 grp-e\docs\subelement-list.html
文件 1893 2006-10-30 10:48 grp-e\docs\submit\accessLevelRequest-message.html
文件 1930 2006-10-30 10:48 grp-e\docs\submit\accessLevelResponse-message.html
文件 4023 2006-10-30 10:48 grp-e\docs\submit\addProjectRequest-message.html
文件 1925 2006-10-30 10:48 grp-e\docs\submit\addProjectResponse-message.html
文件 2790 2006-10-30 10:48 grp-e\docs\submit\addSubmissionRequest-message.html
文件 1949 2006-10-30 10:48 grp-e\docs\submit\addSubmissionResponse-message.html
文件 2335 2006-10-30 10:48 grp-e\docs\submit\authenticateUserRequest-message.html
文件 1974 2006-10-30 10:48 grp-e\docs\submit\authenticateUserResponse-message.html
文件 1901 2006-10-30 10:48 grp-e\docs\submit\getProjectByIDRequest-message.html
文件 1961 2006-10-30 10:48 grp-e\docs\submit\getProjectByIDResponse-message.html
文件 1483 2006-10-30 10:48 grp-e\docs\submit\getProjectListRequest-message.html
文件 1968 2006-10-30 10:48 grp-e\docs\submit\getProjectListResponse-message.html
文件 3147 2006-10-30 10:48 grp-e\docs\submit\getProjectRequest-message.html
文件 1929 2006-10-30 10:48 grp-e\docs\submit\getProjectResponse-message.html
文件 1909 2006-10-30 10:48 grp-e\docs\submit\getProjectStatusRequest-message.html
文件 1973 2006-10-30 10:48 grp-e\docs\submit\getProjectStatusResponse-message.html
文件 1929 2006-10-30 10:48 grp-e\docs\submit\getProjectSubmissionsRequest-message.html
文件 2027 2006-10-30 10:48 grp-e\docs\submit\getProjectSubmissionsResponse-message.html
文件 1917 2006-10-30 10:48 grp-e\docs\submit\getSubmissionListRequest-message.html
文件 1995 2006-10-30 10:48 grp-e\docs\submit\getSubmissionListResponse-message.html
............此处省略128个文件信息
相关资源
- 微博系统(Java源码,servlet+jsp),适
- JSP企业人事管理系统设计(源代码+论
- 实现一个图书管理系统
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- JSP,SQL,MVC的选课系统
- 基于JSP的学生宿舍管理系统(源码 数
- JSP选课管理系统
- mysql jsp网站源码下载
- JSP做的化妆品商城
- Jsp购物车实例
- 基于JSP的校友信息管理系统(添加数
- 基于jsp的bbs论坛 非常详细
- 操作系统作业 (pv,作业管理,等5个
- jsp oracle通讯录
- JSP学生信息管理系统 Mysql数据库
- 使用jsp servlet做的投票系统
- JSP登陆验证 实现JSP用户名 密码 验
- jsp基于servlet 图书馆管理系统
- jsp学生成绩管理系统.rar
- 在线考试系统源代码(jsp)
- 超级好的纯jsp写的聊天室
- JSP 网上购物网页项目
- JSP+mysql新闻发布系统.rar
- jsp 学生信息管理系统设计与实现
- jsp与SQL Server数据库实现的客户注册登
- 简易教学管理系统(jsp spring struts h
- 学生信息管理系统 JSP MySQL
- jsp ajax 三级联动菜单
- jsp新闻公告与最新消息系统(具备添
评论
共有 条评论