📄 display2ejsp.java
字号:
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class display2ejsp extends HttpJspBase {
// begin [file="/display.jsp";from=(13,0);to=(13,65)]
// end
static {
}
public display2ejsp( ) {
}
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="/display.jsp";from=(0,48);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/display.jsp";from=(1,58);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/display.jsp";from=(2,58);to=(3,0)]
out.write("\r\n");
// end
// HTML // begin [file="/display.jsp";from=(3,60);to=(4,0)]
out.write("\r\n");
// end
// HTML // begin [file="/display.jsp";from=(4,62);to=(5,0)]
out.write("\r\n");
// end
// HTML // begin [file="/display.jsp";from=(5,66);to=(6,0)]
out.write("\r\n");
// end
// HTML // begin [file="/display.jsp";from=(6,60);to=(13,0)]
out.write("\r\n<html>\r\n<head>\r\n<title>\r\ndisplay\r\n</title>\r\n</head>\r\n");
// end
// begin [file="/display.jsp";from=(13,0);to=(13,65)]
ldap3.javaBean bean0 = null;
boolean _jspx_specialbean0 = false;
synchronized (session) {
bean0= (ldap3.javaBean)
pageContext.getAttribute("bean0",PageContext.SESSION_SCOPE);
if ( bean0 == null ) {
_jspx_specialbean0 = true;
try {
bean0 = (ldap3.javaBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "ldap3.javaBean");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"ldap3.javaBean", exc);
}
pageContext.setAttribute("bean0", bean0, PageContext.SESSION_SCOPE);
}
}
if(_jspx_specialbean0 == true) {
// end
// begin [file="/display.jsp";from=(13,0);to=(13,65)]
}
// end
// HTML // begin [file="/display.jsp";from=(13,65);to=(14,0)]
out.write("\r\n");
// end
// begin [file="/display.jsp";from=(14,0);to=(14,45)]
JspRuntimeLibrary.introspect(pageContext.findAttribute("bean0"), request);
// end
// HTML // begin [file="/display.jsp";from=(14,45);to=(19,3)]
out.write("\r\n<body bgcolor=\"#9999ff\">\r\n<h1>\r\n查询结果为:\r\n</h1>\r\n ");
// end
// begin [file="/display.jsp";from=(19,3);to=(19,48)]
/* ---- html:form ---- */
org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0 = new org.apache.struts.taglib.html.FormTag();
_jspx_th_html_form_0.setPageContext(pageContext);
_jspx_th_html_form_0.setParent(null);
_jspx_th_html_form_0.setAction("display.do");
_jspx_th_html_form_0.setMethod("post");
try {
int _jspx_eval_html_form_0 = _jspx_th_html_form_0.doStartTag();
if (_jspx_eval_html_form_0 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
throw new JspTagException("Since tag handler class org.apache.struts.taglib.html.FormTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
if (_jspx_eval_html_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
// end
// HTML // begin [file="/display.jsp";from=(19,48);to=(21,9)]
out.write("\r\n <font size=\"5\">\r\n ");
// end
// HTML // begin [file="/display.jsp";from=(21,33);to=(22,2)]
out.write("\r\n ");
// end
// begin [file="/display.jsp";from=(22,4);to=(30,3)]
String attribute=request.getParameter("attribute"); //从index中获得查询条件
// String attresult=request.getParameter("attresult");
String attresult=new String(request.getParameter("attresult").getBytes("ISO8859-1"),"GBK");
// attresult=java.net.URLEncoder.encode(attresult);
String MY_FILTER = attribute+"="+attresult; //过滤条件为“从index.jsp中获得的两个值的复合值”
String str=bean0.search(MY_FILTER);
out.println(str);
// end
// HTML // begin [file="/display.jsp";from=(30,5);to=(32,3)]
out.write("\r\n </font>\r\n ");
// end
// begin [file="/display.jsp";from=(32,3);to=(32,15)]
} while (_jspx_th_html_form_0.doAfterBody() == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
}
if (_jspx_th_html_form_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;
} finally {
_jspx_th_html_form_0.release();
}
// end
// HTML // begin [file="/display.jsp";from=(32,15);to=(39,0)]
out.write("\r\n<br>\r\n <p align=\"center\"><a href=\"index.jsp\"><b><font size=\"6\">返回查询页面</font></b></a></p>\r\n</body>\r\n</html>\r\n\r\n\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 + -