📄 forcum_0002ejsp_jsp.java
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class forcum_0002ejsp_jsp extends HttpJspBase {
static {
}
public forcum_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="/forcum.jsp";from=(0,48);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/forcum.jsp";from=(1,31);to=(12,0)]
out.write("\r\n<html>\r\n<head>\r\n<title>主题贴显示效果</title>\r\n<style type=\"text/css\">\r\n<!--\r\n.style1 {font-size: 36px}\r\n-->\r\n</style>\r\n</head>\r\n<body bgcolor=\"#ffffff\">\r\n");
// end
// begin [file="/forcum.jsp";from=(12,0);to=(12,30)]
{
String _jspx_qStr = "";
JspRuntimeLibrary.include(request, response, "logo.jsp" + _jspx_qStr, out, false);
if ("true".equals(request.getAttribute("javax.servlet.forward.seen")))
return;
}
// end
// HTML // begin [file="/forcum.jsp";from=(12,30);to=(22,0)]
out.write("\r\n\r\n\r\n<table border=\"0\" width=\"90%\" align=\"center\" borderColor=\"#F0F0F0\" >\r\n<tr align=\"center\" bgcolor=\"#666666\" >\r\n<td width=\"43%\" align=\"left\"> 标题</td>\r\n<td width=\"15%\" align=\"center\">作者</td>\r\n<td width=\"15%\" align=\"center\">回复/查看</td>\r\n<td width=\"26%\" align=\"center\">最后发表</td>\r\n</tr>\r\n");
// end
// begin [file="/forcum.jsp";from=(22,2);to=(44,0)]
Connection conn;
PreparedStatement ps;
ResultSet rs;
//
int forcumid=Integer.parseInt(request.getParameter("forcumid"));
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:bbs","","");
String s="select * from post where forcumid=? and parentid=0";
ps=conn.prepareStatement(s);
ps.setInt(1,forcumid);
rs=ps.executeQuery();
while(rs.next()){
int postid=rs.getInt(1);
String head=rs.getString(2);
String content=rs.getString(3);
int click_times=rs.getInt(8);
int reply_times=rs.getInt(9);
String last_postor=rs.getString(12);
// end
// HTML // begin [file="/forcum.jsp";from=(44,2);to=(47,26)]
out.write("\r\n<tr bgcolor=\"#CCCCCC\">\r\n<td width=\"43%\" >\r\n<a href=post.jsp?forcumid=");
// end
// begin [file="/forcum.jsp";from=(47,29);to=(47,37)]
out.print(forcumid);
// end
// HTML // begin [file="/forcum.jsp";from=(47,39);to=(47,47)]
out.write("&postid=");
// end
// begin [file="/forcum.jsp";from=(47,50);to=(47,56)]
out.print(postid);
// end
// HTML // begin [file="/forcum.jsp";from=(47,58);to=(47,62)]
out.write("><b>");
// end
// begin [file="/forcum.jsp";from=(47,65);to=(47,69)]
out.print(head);
// end
// HTML // begin [file="/forcum.jsp";from=(47,71);to=(49,31)]
out.write("</b></a></td>\r\n<td width=\"15%\" align=\"center\">无</td>\r\n<td width=\"15%\" align=\"center\">");
// end
// begin [file="/forcum.jsp";from=(49,34);to=(49,45)]
out.print(click_times);
// end
// HTML // begin [file="/forcum.jsp";from=(49,47);to=(49,48)]
out.write("/");
// end
// begin [file="/forcum.jsp";from=(49,51);to=(49,62)]
out.print(reply_times);
// end
// HTML // begin [file="/forcum.jsp";from=(49,64);to=(50,32)]
out.write("</td>\r\n<td width=\"26%\" align=\"left\">by:");
// end
// begin [file="/forcum.jsp";from=(50,35);to=(50,46)]
out.print(last_postor);
// end
// HTML // begin [file="/forcum.jsp";from=(50,48);to=(52,0)]
out.write("</td>\r\n</tr>\r\n");
// end
// begin [file="/forcum.jsp";from=(52,2);to=(57,0)]
}
}catch(Exception e){
System.out.println(e);
}
// end
// HTML // begin [file="/forcum.jsp";from=(57,2);to=(61,30)]
out.write("\r\n</table>\r\n<table align=\"center\" width=\"90%\">\r\n<tr align=\"left\"><td>\r\n<a href=\"newpost.jsp?forcumid=");
// end
// begin [file="/forcum.jsp";from=(61,33);to=(61,41)]
out.print(forcumid);
// end
// HTML // begin [file="/forcum.jsp";from=(61,43);to=(67,0)]
out.write("\">发新帖</a>\r\n</td></tr>\r\n</table>\r\n\r\n</body>\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 + -