资源简介
用户:
1.进行注册和登录;对用户的信息进行修改
2.浏览新闻动态,了解最新时事
3.进行心理测试,通过登陆后,选择感兴趣的试题,进行心理测验,提交后,得出相对应的结果。同时,可以对结果进行打分,为以后同学进行心理测试提供参考价值。
4.进行心理咨询。当碰到心理问题,需要提问后,可以在网站上进行留言。
5.对感兴趣的文章进行下载
6.可以搜索感兴趣的信息
代码片段和文件信息
package com.action;
/**
* 管理员登陆 增加 修改 删除 删除登陆日志
*/
import java.io.IOException;
import java.util.List;
import java.util.StringTokenizer;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.bean.AdminBean;
import com.bean.SystemBean;
import com.util.Constant;
import com.util.MD5;
public class AdminAction extends HttpServlet {
/**
* Constructor of the object.
*/
public AdminAction() {
super();
}
/**
* Destruction of the servlet.
*/
public void destroy() {
super.destroy(); // Just puts “destroy“ string in log
// Put your code here
}
/**
* The doGet method of the servlet.
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
doPost(requestresponse);
}
/**
* The doPost method of the servlet.
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
response.setContentType(Constant.CONTENTTYPE);
request.setCharacterEncoding(Constant.CHARACTERENCODING);
try{
String method=request.getParameter(“method“).trim();
AdminBean loginbean = new AdminBean();
HttpSession session = request.getSession();
session.setMaxInactiveInterval(1200);
SystemBean systembean = new SystemBean();
String sysdir = systembean.getDir();
if(method.equals(“one“)){//admin登录
String username = request.getParameter(“username“);
String password = request.getParameter(“password“);
if(username == null||username.trim().equals(““)){
request.setAttribute(“message“ “请正确输入用户名!“);
request.getRequestDispatcher(sysdir+“/login.jsp“).forward(request response);
}
else if(password == null||password.trim().equals(““)){
request.setAttribute(“message“ “请输入密码!“);
request.getRequestDispatcher(sysdir+“/login.jsp“).forward(request response);
}
else{
String md5password = MD5.MD5(password);
String agent = request.getHeader(“user-agent“);
StringTokenizer st = new StringTokenizer(agent“;“);
String useros=st.nextToken();
String loginip = request.getRemoteA
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-08-13 18:31 274JSP心里健康网\
文件 2826344 2012-03-28 17:49 274JSP心里健康网\JSP心里健康网录像.exe
目录 0 2013-08-13 17:58 274JSP心里健康网\mental\
文件 1495 2012-04-06 20:04 274JSP心里健康网\mental\.classpath
目录 0 2013-10-20 17:02 274JSP心里健康网\mental\.myeclipse\
文件 291 2012-04-06 20:04 274JSP心里健康网\mental\.myme
文件 1224 2012-03-28 11:54 274JSP心里健康网\mental\.project
目录 0 2013-09-11 15:04 274JSP心里健康网\mental\WebRoot\
目录 0 2013-08-13 17:57 274JSP心里健康网\mental\WebRoot\FCKeditor\
文件 835 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\default.jsp
目录 0 2013-08-13 17:58 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\
目录 0 2013-08-13 17:57 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\
目录 0 2013-08-13 17:57 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\
文件 3875 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckcontextmenu.js
文件 1422 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckdocumentfragment_gecko.js
文件 1728 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckdocumentfragment_ie.js
文件 12153 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckdomrange.js
文件 2032 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckdomrange_gecko.js
文件 4460 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckdomrange_ie.js
文件 7691 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckeditingarea.js
文件 1517 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckelementpath.js
文件 16356 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckenterkey.js
文件 1414 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckevents.js
文件 2980 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckicon.js
文件 1965 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckiecleanup.js
文件 1776 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckimagepreloader.js
文件 4292 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckkeystrokehandler.js
文件 3743 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckmenublock.js
文件 1560 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckmenublockpanel.js
文件 4462 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckmenuitem.js
文件 8389 2012-03-28 11:50 274JSP心里健康网\mental\WebRoot\FCKeditor\editor\_source\classes\fckpanel.js
............此处省略770个文件信息
评论
共有 条评论