📄 do_0005flogjsp_0002ejsp_jsp.java
字号:
import java.sql.*;
import chatroomweb.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class do_0005fLogJsp_0002ejsp_jsp extends HttpJspBase {
// begin [file="/do_LogJsp.jsp";from=(5,0);to=(5,68)]
// end
static {
}
public do_0005fLogJsp_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
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;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/do_LogJsp.jsp";from=(0,48);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(1,31);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(2,33);to=(3,0)]
out.write("\r\n");
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(4,4);to=(5,0)]
out.write("\r\n");
// end
// begin [file="/do_LogJsp.jsp";from=(5,0);to=(5,68)]
chatroomweb.DbJspBean dbBean = null;
boolean _jspx_specialdbBean = false;
synchronized (pageContext) {
dbBean= (chatroomweb.DbJspBean)
pageContext.getAttribute("dbBean",PageContext.PAGE_SCOPE);
if ( dbBean == null ) {
_jspx_specialdbBean = true;
try {
dbBean = (chatroomweb.DbJspBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "chatroomweb.DbJspBean");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"chatroomweb.DbJspBean", exc);
}
pageContext.setAttribute("dbBean", dbBean, PageContext.PAGE_SCOPE);
}
}
if(_jspx_specialdbBean == true) {
// end
// begin [file="/do_LogJsp.jsp";from=(5,0);to=(5,68)]
}
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(5,82);to=(17,0)]
out.write("\r\n\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Language\" content=\"zh-cn\">\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 5.0\">\r\n<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">\r\n<title>聊天室管理</title>\r\n</head>\r\n\r\n<body>\r\n");
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(17,16);to=(18,0)]
out.write("\r\n");
// end
// begin [file="/do_LogJsp.jsp";from=(18,2);to=(27,0)]
int n;
String getname=new String();
String getpassword=new String();
getname=request.getParameter("inputname");
getpassword=request.getParameter("inputpassword");
n=getname.length()*getpassword.length();
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(27,2);to=(28,0)]
out.write("\r\n");
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(28,21);to=(29,0)]
out.write("\r\n");
// end
// begin [file="/do_LogJsp.jsp";from=(29,2);to=(31,0)]
if(n==0){
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(31,2);to=(35,0)]
out.write("\r\n<br/>\r\n\t<p><b>请输入完整的用户名和口令</b></p>\r\n\t<p><a href=\"Login.jsp\">返回</a></p>\r\n");
// end
// begin [file="/do_LogJsp.jsp";from=(35,2);to=(39,0)]
}
else{
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(39,2);to=(40,0)]
out.write("\r\n");
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(40,16);to=(42,0)]
out.write("\r\n\r\n");
// end
// begin [file="/do_LogJsp.jsp";from=(42,2);to=(51,0)]
try
{
out.print("now connect");
dbBean.connect();
if(dbBean.checkLogin(getname,getpassword))
{
out.println("now login pass");
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(51,2);to=(53,0)]
out.write("\r\n\r\n");
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(53,17);to=(54,0)]
out.write("\r\n");
// end
// begin [file="/do_LogJsp.jsp";from=(54,2);to=(60,0)]
String url="main.jsp";
response.sendRedirect(url);
}
else
{
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(60,2);to=(63,0)]
out.write("\r\n\t<p>请输入正确的姓名和口令<p>\r\n <p><a href=\"Login.jsp\">返回</a></p>\r\n");
// end
// begin [file="/do_LogJsp.jsp";from=(63,2);to=(78,0)]
}
}
catch(Exception e)
{
String errorcode=e.toString();
out.println("<BR>错误信息:"+errorcode);
}
finally
{
//stat.close();
//conn.close();
}
}
// end
// HTML // begin [file="/do_LogJsp.jsp";from=(78,2);to=(82,0)]
out.write("\r\n </body>\r\n\r\n</html>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -