资源简介
javaWeb博客系统,采用jsp,利用javaWeb,java技术

代码片段和文件信息
package servlet;
import java.io.IOException;
import java.util.ArrayList;
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 bean.SelectBean;
public class AdminLoginServlet extends HttpServlet {
/**
* Constructor of the object.
*/
public AdminLoginServlet() {
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(request response);
}
/**
* 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(“text/html;charset=gb2312“);
request.setCharacterEncoding(“gb2312“);
String name = request.getParameter(“name“);
String pwd = request.getParameter(“pwd“);
String sql = “select * from admin where name=‘“+name+“‘ and pwd=‘“+pwd+“‘“;
String args[] = {“id““name““pwd“};
SelectBean sb = new SelectBean();
ArrayList al = sb.select(args sql);
String str = ““;
if(al == null || al.size() == 0){
str = “/admin/index.jsp“;
request.setAttribute(“message“ “用户名或密码错误!“);
}else{
str = “/admin/modifyname.jsp“;
HttpSession session = request.getSession();
session.setAttribute(“adminlogin“ al);
}
request.getRequestDispatcher(str).forward(request response);
}
/**
* Initialization of the servlet.
*
* @throws ServletException if an error occure
*/
public void init() throws ServletException {
// Put your code here
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 802 2012-06-08 14:46 151JSP博客系统\blog\.classpath
文件 285 2012-06-06 22:49 151JSP博客系统\blog\.myme
文件 1222 2012-06-09 07:37 151JSP博客系统\blog\.project
文件 2620 2012-06-07 01:52 151JSP博客系统\blog\src\servlet\AdminLoginServlet.java
文件 2204 2012-06-05 18:46 151JSP博客系统\blog\src\servlet\ClickServlet.java
文件 4374 2012-06-11 02:12 151JSP博客系统\blog\src\servlet\DelServlet.java
文件 2627 2012-06-01 14:23 151JSP博客系统\blog\src\servlet\LeavewordServlet.java
文件 3613 2012-06-11 07:55 151JSP博客系统\blog\src\servlet\ModifyAdminServlet.java
文件 1320 2012-06-03 21:59 151JSP博客系统\blog\src\util\DBConn.java
文件 2311 2012-06-10 05:31 151JSP博客系统\blog\src\util\Validate.java
文件 4224 2012-06-02 02:56 151JSP博客系统\blog\WebRoot\admin\addadmin.jsp
文件 4700 2012-06-05 10:01 151JSP博客系统\blog\WebRoot\admin\adduser.jsp
文件 1930 2012-06-07 03:17 151JSP博客系统\blog\WebRoot\admin\adminadd.jsp
文件 2991 2012-06-04 16:36 151JSP博客系统\blog\WebRoot\admin\adminlist.jsp
文件 642 2012-06-01 15:16 151JSP博客系统\blog\WebRoot\admin\bottom.jsp
文件 3723 2013-02-05 18:23 151JSP博客系统\blog\WebRoot\admin\index.jsp
文件 2586 2012-06-02 05:46 151JSP博客系统\blog\WebRoot\admin\leaveword.jsp
文件 4066 2012-06-08 10:14 151JSP博客系统\blog\WebRoot\admin\modifyname.jsp
文件 4041 2012-06-07 00:23 151JSP博客系统\blog\WebRoot\admin\modifypwd.jsp
文件 2783 2012-06-01 13:32 151JSP博客系统\blog\WebRoot\admin\post.jsp
文件 2798 2012-06-10 14:39 151JSP博客系统\blog\WebRoot\admin\userpic.jsp
文件 835 2012-06-09 06:32 151JSP博客系统\blog\WebRoot\FCKeditor\default.jsp
文件 236 2012-06-04 03:56 151JSP博客系统\blog\WebRoot\FCKeditor\editor\css\behaviors\disablehandles.htc
文件 822 2012-06-03 18:47 151JSP博客系统\blog\WebRoot\FCKeditor\editor\css\behaviors\showtableborders.htc
文件 2040 2012-06-01 21:47 151JSP博客系统\blog\WebRoot\FCKeditor\editor\css\fck_editorarea.css
文件 2549 2012-06-01 13:57 151JSP博客系统\blog\WebRoot\FCKeditor\editor\css\fck_internal.css
文件 1514 2012-06-10 16:03 151JSP博客系统\blog\WebRoot\FCKeditor\editor\css\fck_showtableborders_gecko.css
文件 184 2012-06-02 09:17 151JSP博客系统\blog\WebRoot\FCKeditor\editor\css\images\fck_anchor.gif
文件 599 2012-06-10 06:41 151JSP博客系统\blog\WebRoot\FCKeditor\editor\css\images\fck_flashlogo.gif
文件 105 2012-06-06 22:14 151JSP博客系统\blog\WebRoot\FCKeditor\editor\css\images\fck_hiddenfield.gif
............此处省略571个文件信息
相关资源
- 微博系统(Java源码,servlet+jsp),适
- java串口通信全套完整代码-导入eclip
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
- Java 文件加密传输
- java做的房产管理系统
- 基于jsp的bbs论坛 非常详细
评论
共有 条评论