📄 check2ejsp.java
字号:
import hell.userdetail;
import ejb.*;
import javax.ejb.*;
import java.math.*;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import java.rmi.RemoteException;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class check2ejsp extends HttpJspBase {
// begin [file="/check.jsp";from=(2,3);to=(22,0)]
private Login login = null;
public void jspInit() {
try {
InitialContext ic = new InitialContext();
Object objRef = ic.lookup("Login");
LoginHome home = (LoginHome)PortableRemoteObject.narrow(objRef, LoginHome.class);
login = home.create();
} catch (RemoteException ex) {
System.out.println("Couldn't create Login bean."+ ex.getMessage());
} catch (CreateException ex) {
System.out.println("Couldn't create Login bean."+ ex.getMessage());
} catch (NamingException ex) {
System.out.println("Unable to lookup home: "+ "Login "+ ex.getMessage());
}
}
public void jspDestroy() {
login = null;
}
// end
static {
}
public check2ejsp( ) {
}
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="/check.jsp";from=(0,48);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/check.jsp";from=(1,141);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/check.jsp";from=(22,2);to=(69,0)]
out.write("\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\r\n<style type=\"text/css\">\r\n<!--\r\nbody {\r\n\tmargin-top: 0px;\r\n}\r\n.style2 {font-family: monospace, sans-serif, \"·\\u00BD\\u00D5\\u00FD\\u00CA\\u00E6\\u00CC\\u00E5\", \"·\\u00BD\\u00D5\\u00FD\\u00D2\\u00A6\\u00CC\\u00E5\"}\r\n.style4 {\r\n\tfont-size: 24px;\r\n\tfont-weight: bold;\r\n}\r\n.style5 {font-family: monospace, sans-serif, \"·\\u00BD\\u00D5\\u00FD\\u00CA\\u00E6\\u00CC\\u00E5\", \"·\\u00BD\\u00D5\\u00FD\\u00D2\\u00A6\\u00CC\\u00E5\"; font-size: 18px; }\r\na:link {\r\n\ttext-decoration: none;\r\n\tcolor: #FF6600;\r\n}\r\na:visited {\r\n\ttext-decoration: none;\r\n}\r\na:hover {\r\n\ttext-decoration: underline;\r\n}\r\na:active {\r\n\ttext-decoration: none;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n<body bgcolor=\"white\">\r\n<h1><b><center>\r\n</center></b></h1>\r\n<div align=\"center\"></div>\r\n<hr>\r\n<table width=\"936\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#CCCCCC\">\r\n<tr>\r\n<td width=\"131\" class=\"style5\"><div align=\"center\"><a href=\"index.jsp\" class=\"style5\"><strong>用户登陆</strong></a></div></td>\r\n<td width=\"178\" class=\"style5\"><div align=\"center\"><a href=\"booklist.jsp\" class=\"style5\"><strong>在线购物</strong></a></div></td>\r\n<td width=\"239\" class=\"style5\"><div align=\"center\"><a href=\"cart.jsp\" class=\"style5\"><strong>我的购物车</strong></a></div>\r\n<div align=\"center\"></div></td>\r\n<td width=\"378\" align=\"right\" class=\"style5\"><div align=\"center\"><a href=\"list.jsp\" class=\"style5\"><strong>我的订单</strong></a></div></td>\r\n</tr>\r\n</table>\r\n<table width=\"936\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#CCCCCC\">\r\n<tr>\r\n<td width=\"500\"><div align=\"center\">\r\n\r\n");
// end
// begin [file="/check.jsp";from=(69,2);to=(75,4)]
String userid = request.getParameter("userid");
String password = request.getParameter("password");
if( userid == null ){
out.println("<center>") ;
out.println("<hl>用户或密码有误,重试!</hl><BR><BR>") ;
// end
// HTML // begin [file="/check.jsp";from=(75,6);to=(76,15)]
out.write("\r\n<p><b><a href=\"");
// end
// begin [file="/check.jsp";from=(76,18);to=(76,42)]
out.print(request.getContextPath());
// end
// HTML // begin [file="/check.jsp";from=(76,44);to=(78,0)]
out.write("/index.jsp\"><p>返回</p></a></b>\r\n\r\n");
// end
// begin [file="/check.jsp";from=(78,2);to=(86,0)]
out.println("</center>") ;
return;
}
try{ userdetail a =null;
a = login.checkpassword( userid , password );
if (a==null){
out.println("<hl>Hello</hl>") ;
// end
// HTML // begin [file="/check.jsp";from=(86,2);to=(87,3)]
out.write("\r\n ");
// end
// begin [file="/check.jsp";from=(87,3);to=(89,17)]
if (true) {
out.clear();
String _jspx_qfStr = "";
_jspx_qfStr = _jspx_qfStr + "?errmsg=" +"%B4%ED%CE%F3%B5%C4%D3%C3%BB%A7ID%BB%F2%C3%DC%C2%EB%21";
pageContext.forward("index.jsp" + _jspx_qfStr);
return;
}
// end
// HTML // begin [file="/check.jsp";from=(89,17);to=(90,0)]
out.write("\r\n");
// end
// begin [file="/check.jsp";from=(90,2);to=(97,0)]
}
} catch (Exception ee){
System.out.println(ee.toString());
}
response.sendRedirect("index.jsp");
// end
// HTML // begin [file="/check.jsp";from=(97,2);to=(100,8)]
out.write("\r\n</div>\r\n</tr>\r\n</table>");
// 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 + -