package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;;
public final class landing_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GB2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n<html>\r\n<head>\r\n<title>\r\nlanding\r\n</title>\r\n</head>\r\n<body bgcolor=\"#ffffff\">\r\n<h1 align=\"center\">\r\n验证登陆信息界面\r\n</h1>\r\n");
try
{
String name=request.getParameter("txtChatId");
String pwd=request.getParameter("txtChatPassWord");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:chatDB","sa","");
PreparedStatement s=con.prepareStatement("Select * from chatTable where chatId=? and [password]=? ");
s.setString(1,name);
s.setString(2,pwd);
ResultSet rs=s.executeQuery();
boolean flag=rs.next();
if(flag)
{
out.print("<div align='center'><font color=red size=5>登陆成功</font></div>");
try
{
String chatid=request.getParameter("txtChatId");
session.setAttribute("chatid",chatid);
}
catch(Exception ex)
{
out.print(ex.toString());
}
response.sendRedirect("index.jsp");
}
else
{
out.print("<div align='center'><font color=red size=5>登陆失败</font></div>");
response.sendRedirect("login.jsp");
}
rs.close();
s.close();
con.close();
}
catch(Exception ex)
{
out.print(ex.toString());
}
out.write("\r\n</body>\r\n</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
聊天室源代码(JSP+SERVLET)
共89个文件
class:10个
java:5个
jsp:5个
4星 · 超过85%的资源 需积分: 11 64 下载量 156 浏览量
2008-11-05
10:37:42
上传
评论 1
收藏 188KB ZIP 举报
温馨提示
聊天室源代码,JSP+SERVLET 实现
资源推荐
资源详情
资源评论
收起资源包目录
.zip (89个子文件)
聊天程序
ChatMessage
Tomcat
work
jspModule
org
apache
jsp
sending_jsp.java 2KB
landing_jsp.class 5KB
sending_jsp.class 3KB
login_jsp.class 3KB
talking_jsp.java 2KB
talking_jsp.class 4KB
landing_jsp.java 3KB
login_jsp.java 2KB
index_jsp.java 2KB
index_jsp.class 3KB
tldCache.ser 44B
webapps
ChatMessage.jpx 7KB
Servlet.library 227B
bak
jspModule
sending.jsp~13~ 485B
index.jsp~18~ 579B
index.jsp~21~ 748B
landing.jsp~4~ 1KB
sending.jsp~21~ 477B
login.jsp~32~ 816B
landing.jsp~1~ 337B
sending.jsp~12~ 486B
sending.jsp~19~ 477B
WEB-INF
web.xml~140~ 314B
web.xml~142~ 314B
web.xml~134~ 314B
web.xml~139~ 828B
web.xml~138~ 314B
web.xml~141~ 828B
web.xml~143~ 828B
web.xml~137~ 828B
web.xml~136~ 314B
web.xml~135~ 828B
talking.jsp~14~ 604B
talking.jsp~10~ 630B
login.jsp~33~ 647B
landing.jsp~7~ 1KB
login.jsp~30~ 838B
sending.jsp~17~ 486B
login.jsp~27~ 767B
talking.jsp~9~ 465B
sending.jsp~14~ 530B
landing.jsp~3~ 919B
login.jsp~34~ 645B
login.jsp~31~ 832B
index.jsp~19~ 561B
sending.jsp~15~ 487B
index.jsp~16~ 323B
login.jsp~26~ 699B
sending.jsp~18~ 478B
index.jsp~22~ 579B
talking.jsp~16~ 648B
sending.jsp~20~ 575B
index.jsp~20~ 579B
index.jsp~15~ 368B
talking.jsp~12~ 563B
sending.jsp~16~ 655B
landing.jsp~8~ 1KB
index.jsp~23~ 597B
login.jsp~25~ 744B
talking.jsp~13~ 652B
landing.jsp~5~ 1KB
index.jsp~17~ 373B
talking.jsp~11~ 614B
talking.jsp~15~ 652B
login.jsp~29~ 786B
login.jsp~28~ 785B
landing.jsp~6~ 1KB
landing.jsp~9~ 1KB
landing.jsp~10~ 1KB
talking.jsp~17~ 609B
index.jsp~14~ 329B
landing.jsp~2~ 927B
talking.jsp~8~ 563B
jspModule
login.jsp 687B
WEB-INF
web.xml 314B
index.jsp 692B
sending.jsp 511B
landing.jsp 1KB
talking.jsp 734B
ChatMessage.jpx.local 2KB
ChatMessage.jpx.local~ 2KB
classes
Generated Source
jsp cache
jspModule
org
apache
jsp
landing_jsp.class 4KB
sending_jsp.class 3KB
login_jsp.class 3KB
talking_jsp.class 3KB
index_jsp.class 3KB
package cache
org.apache.jsp.dep2 12KB
database
chatDB_Data.MDF 1024KB
chatDB_Log.LDF 1024KB
共 89 条
- 1
资源评论
- yeweiouyang2013-05-28不错吧。对初学有用
- r1oger2012-08-01不错吧。对初学有用
- lhmzimoshang2015-06-26还不错,挺有用的,谢谢分享
- danniel1632013-10-22还不错,只是写的比较的繁琐。
louyingxin
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 杨辉三角(Pascal's Triangle)是一个在数学中非常著名的数列,它以一种特定的模式排列数字,内容以5种代码实例实现
- yolov5数据集:CT图像肾脏、结石检测(2类别,包含训练集、验证集)
- 电力102规约请求报文实录
- RTL8723 linux+安卓驱动 2020版本
- ISO 26262 道路车辆-功能安全-系统级产品开发
- 数据挖掘期末题 选择填空简答
- EKF在CTRV模型上的建模推导
- 用于:https://laoshifu.blog.csdn.net/article/details/138191428 多层创建
- 电力102规约(电能累计量的传输规约)培训
- 「常用」E9外部流程接口
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功