-
基于JSP技术开发的论坛源代码
资源介绍
JSP 论坛 源码 源文件压缩上传
<%@ page language="java" import="com.lbc.bbs.dao.*,com.lbc.bbs.dao.impl.*,java.util.*,com.lbc.bbs.entity.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("utf-8");
//不管在什么情况下·有没有中文的接收我们必须设置他的request的setCharacterEncoding方法
ReplyDao replyDao =new ReplyDaoImpl();
int uId=Integer.parseInt(request.getParameter("uId"));
int boardId=Integer.parseInt(request.getParameter("boardId"));
int topicId=Integer.parseInt(request.getParameter("topicId"));
int replyId=Integer.parseInt(request.getParameter("replyId"));
User user2=null;
int flag=0;
if(session.getAttribute("users")!=null){
user2=(User)session.getAttribute("users");
}else{
user2=new User();
response.sendRedirect("../login.jsp");
}
if(user2.getUId()!=uId){
out.print("");
}else{
flag=replyDao.deleteReply(replyId);
if(flag>0){
response.sendRedirect("../detail.jsp?page=1&boardId="+boardId+"&topicId="+topicId+"&uId="+uId);
}
}
%>
- 上一篇: tslib-1.4的移植
- 下一篇: jsp 论坛源码 (自主建站,方便实惠,还能学习)