📄 newshome_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import sms.db.*;
import sms.bean.*;
import java.util.*;
public final class newsHome_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;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
NewsBean newsBean = new NewsBean();
ArrayList aList1 = newsBean.queryTitle("1",5);//查询最新学校公告标题内容用于页面分类列出最新新闻
ArrayList aList2 = newsBean.queryTitle("2",5);//查询最新考试信息标题内容用于页面分类列出最新新闻
ArrayList aList3 = newsBean.queryTitle("3",5);//查询最新校内新闻标题内容用于页面分类列出最新新闻
ArrayList aList4 = newsBean.queryTitle("4",5);//查询最新校外信息标题内容用于页面分类列出最新新闻
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>\r\n");
out.write("新闻动态主页\r\n");
out.write("</title>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write(".style1 {\r\n");
out.write("\tfont-family: \"方正舒体\";\r\n");
out.write("\tfont-size: 14mm;\r\n");
out.write("\tcolor: #330033;\r\n");
out.write("}\r\n");
out.write(".style2 {\r\n");
out.write("\tfont-family: \"华文中宋\";\r\n");
out.write("\tfont-size: 7mm;\r\n");
out.write("\tcolor: #330033;\r\n");
out.write("}\r\n");
out.write(".style6 {\r\n");
out.write("\tfont-size: 5mm;\r\n");
out.write("\tcolor: #330033;\r\n");
out.write("}\r\n");
out.write("body {\r\n");
out.write("\tmargin-top: 0px;\r\n");
out.write("\tmargin-bottom: 0px;\r\n");
out.write("}\r\n");
out.write("-->\r\n");
out.write("</style>\r\n");
out.write("</head>\r\n");
out.write("<body bgcolor=\"#ffffff\">\r\n");
out.write("<table width=\"100%\" border=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"84\" colspan=\"2\" bgcolor=\"#9999FF\"><table width=\"100%\" border=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"47%\" rowspan=\"2\" align=\"center\"><span class=\"style1\">信息平台</span></td>\r\n");
out.write(" <td width=\"53%\" height=\"34\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"32\"><span class=\"style2\">新闻动态</span></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr bgcolor=\"#CCCCCC\">\r\n");
out.write(" <td width=\"49%\" height=\"199\" valign=\"top\">\r\n");
out.write(" <table width=\"100%\" border=\"1\" bordercolorlight= #C1A4F4 borderColorDark=#ffffff cellPadding=0 cellSpacing=0>\r\n");
out.write(" <tr valign=\"middle\" bgcolor=\"#999999\">\r\n");
out.write(" <th height=\"30\" colspan=\"2\" align=\"left\" scope=\"col\"><span class=\"style6\">学校公告</span></th>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
//取得最新的学校公告标题信息用于显示
if(aList1 != null && aList1.size() > 0){
NewsBean newsBean1 = null;
for(int i = 0;i < aList1.size(); i++){
newsBean1 = (NewsBean)aList1.get(i);
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"76%\" height=\"30\">\r\n");
out.write(" <a href=\"viewNewsDetail.jsp?id=");
out.print(newsBean1.getId());
out.write("\" target=\"_blank\">\r\n");
out.write(" ");
out.print(newsBean1.getTitle());
out.write("\r\n");
out.write(" </a>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"24%\">");
out.print(newsBean1.getAddTime());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
}
out.write("\r\n");
out.write(" </table>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"51%\" align=\"center\" valign=\"top\">\r\n");
out.write(" <table width=\"100%\" border=\"1\" bordercolorlight= #C1A4F4 borderColorDark=#ffffff cellPadding=0 cellSpacing=0>\r\n");
out.write(" <tr bgcolor=\"#999999\">\r\n");
out.write(" <th height=\"30\" colspan=\"2\" align=\"left\" scope=\"col\"><span class=\"style6\">考试信息</span></th>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
//取得最新的考试信息标题信息用于显示
if(aList2 != null && aList2.size() > 0){
NewsBean newsBean2 = null;
for(int i = 0;i < aList2.size(); i++){
newsBean2 = (NewsBean)aList2.get(i);
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"76%\" height=\"30\"><a href=\"viewNewsDetail.jsp?id=");
out.print(newsBean2.getId());
out.write("\" target=\"_blank\">");
out.print(newsBean2.getTitle());
out.write("</a></td>\r\n");
out.write(" <td width=\"24%\">");
out.print(newsBean2.getAddTime());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
}
out.write("\r\n");
out.write(" </table>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr valign=\"middle\" bgcolor=\"#999999\">\r\n");
out.write(" <td height=\"16\"align=\"right\" bgcolor=\"#6666CC\"><a href=\"viewNewsTitle.jsp?type=1\" target=\"_blank\">更多 more>>> </a></td>\r\n");
out.write("\t<td align=\"right\" bgcolor=\"#6666CC\"><a href=\"viewNewsTitle.jsp?type=2\" target=\"_blank\">更多 more>>> </a></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr bgcolor=\"#CCCCCC\">\r\n");
out.write(" <td height=\"191\" align=\"center\" valign=\"top\">\r\n");
out.write("\t<table width=\"100%\" border=\"1\" bordercolorlight= #C1A4F4 borderColorDark=#ffffff cellPadding=0 cellSpacing=0>\r\n");
out.write(" <tr bgcolor=\"#999999\">\r\n");
out.write(" <th height=\"30\" colspan=\"2\" align=\"left\" scope=\"col\"><span class=\"style6\">校内新闻</span></th>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
//取得最新的校内新闻标题信息用于显示
if(aList3 != null && aList3.size() > 0){
NewsBean newsBean3 = null;
for(int i = 0;i < aList3.size(); i++){
newsBean3 = (NewsBean)aList3.get(i);
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"75%\" height=\"30\"><a href=\"viewNewsDetail.jsp?id=");
out.print(newsBean3.getId());
out.write("\" target=\"_blank\">");
out.print(newsBean3.getTitle());
out.write("</a></td>\r\n");
out.write(" <td width=\"25%\">");
out.print(newsBean3.getAddTime());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
}
out.write("\r\n");
out.write(" </table>\r\n");
out.write(" </td>\r\n");
out.write(" <td align=\"center\" valign=\"top\">\r\n");
out.write("\t<table width=\"100%\" border=\"1\" bordercolorlight= #C1A4F4 borderColorDark=#ffffff cellPadding=0 cellSpacing=0>\r\n");
out.write(" <tr bgcolor=\"#999999\">\r\n");
out.write(" <th height=\"30\" colspan=\"2\" align=\"left\" scope=\"col\"><span class=\"style6\">校外信息</span></th>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
//取得最新的校外信息标题信息用于显示
if(aList4 != null && aList4.size() > 0){
NewsBean newsBean4 = null;
for(int i = 0;i < aList4.size(); i++){
newsBean4 = (NewsBean)aList4.get(i);
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"75%\" height=\"30\"><a href=\"viewNewsDetail.jsp?id=");
out.print(newsBean4.getId());
out.write("\" target=\"_blank\">");
out.print(newsBean4.getTitle());
out.write("</a></td>\r\n");
out.write(" <td width=\"25%\">");
out.print(newsBean4.getAddTime());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
}
out.write("\r\n");
out.write(" </table>\r\n");
out.write("\t</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr valign=\"middle\" bgcolor=\"#999999\">\r\n");
out.write(" <td height=\"16\"align=\"right\" bgcolor=\"#6666CC\"><a href=\"viewNewsTitle.jsp?type=3\" target=\"_blank\">更多 more>>> </a></td>\r\n");
out.write("\t<td align=\"right\" bgcolor=\"#6666CC\"><a href=\"viewNewsTitle.jsp?type=4\" target=\"_blank\">更多 more>>> </a></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"17\" colspan=\"2\" bgcolor=\"#9999FF\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write("</table>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -