📄 messegedetail_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.*;
import java.text.*;
public final class messegeDetail_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");
MessegeDetailBean msgDetailBean = (MessegeDetailBean)request.getAttribute("messegeDetailBean");
AnswerBean answerBean = null;
answerBean = msgDetailBean.getAnswerBean();
String avrScore = "0";
int scoreNum = msgDetailBean.getScoreNum();
float totalScore = msgDetailBean.getTotalScore()*10;
if(scoreNum != 0){
DecimalFormat format = new DecimalFormat("##.#");
avrScore = format.format(totalScore/scoreNum);
}
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>查看留言板信息</title>\r\n");
out.write("<link href=\"css/style.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"><style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write("body {\r\n");
out.write("\tbackground-color: #CCCCCC;\r\n");
out.write("}\r\n");
out.write("-->\r\n");
out.write("</style></head>\r\n");
out.write("<body>\r\n");
out.write("<table width=\"100%\" border=\"0\" align=\"center\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"399\" align=\"center\" valign=\"top\"><table width=\"100%\" border=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"9%\" height=\"85\" align=\"right\" bgcolor=\"#999999\"><div align=\"center\"><strong>留言信息</strong></div></td>\r\n");
out.write(" <td width=\"91%\"><table width=\"100%\" border=\"0\">\r\n");
out.write(" <tr bgcolor=\"#999999\">\r\n");
out.write(" <td width=\"10%\" height=\"21\" align=\"right\">主题:</td>\r\n");
out.write(" <td width=\"42%\" style=\"word-break:break-all\">");
out.print(msgDetailBean.getTopic());
out.write("</td>\r\n");
out.write(" <td width=\"21%\">加入时间:");
out.print(msgDetailBean.getAddTime());
out.write("</td>\r\n");
out.write(" <td width=\"13%\">作者:");
out.print(msgDetailBean.getAuthor());
out.write("</td>\r\n");
out.write(" <td width=\"14%\">浏览次数:");
out.print(msgDetailBean.getBrowseNum());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr bgcolor=\"#CCCCFF\">\r\n");
out.write(" <td height=\"56\" align=\"right\"><h5>内容:</h5></td>\r\n");
out.write(" <td colspan=\"4\" style=\"word-break:break-all\">");
out.print(msgDetailBean.getContent());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td align=\"right\" bgcolor=\"#999999\"><div align=\"center\"><strong>回复信息</strong></div></td>\r\n");
out.write(" <td><table width=\"100%\" border=\"0\">\r\n");
out.write(" <tr bgcolor=\"#999999\">\r\n");
out.write(" <td width=\"10%\" height=\"21\" align=\"right\">回复时间:</td>\r\n");
out.write(" <td width=\"21%\">");
out.print(answerBean.getAddTime()==null?"":answerBean.getAddTime());
out.write("</td>\r\n");
out.write(" <td width=\"7%\" align=\"right\">部门:</td>\r\n");
out.write(" <td width=\"62%\">");
out.print(answerBean.getTreatDepartment()==null?"":answerBean.getTreatDepartment());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr bgcolor=\"#CCCCFF\">\r\n");
out.write(" <td height=\"55\" align=\"right\"><h5>内容:</h5></td>\r\n");
out.write(" <td colspan=\"3\" style=\"word-break:break-all\">");
out.print(answerBean.getContent()==null?"":answerBean.getContent());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td align=\"right\" valign=\"middle\" bgcolor=\"#999999\"><div align=\"center\"><strong>评论信息</strong></div></td>\r\n");
out.write(" <td valign=\"top\">");
CommentBean commentBean = null;
ArrayList aList = null;
aList = msgDetailBean.getCommentList();
int commentNum = 0;
if(aList != null && aList.size() > 0){
commentNum = aList.size();
}
out.write("\r\n");
out.write(" <table width=\"100%\" border=\"0\">\r\n");
out.write(" <tr bgcolor=\"#999999\">\r\n");
out.write(" <td width=\"75%\">最新评论共");
out.print(String.valueOf(commentNum));
out.write("条</td>\r\n");
out.write(" <td width=\"13%\" align=\"center\">作者</td>\r\n");
out.write(" <td width=\"12%\" align=\"center\">发表时间</td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
if(commentNum > 0){
for(int i = 0 ;i< commentNum ;i++){
commentBean = (CommentBean)aList.get(i);
out.write("\r\n");
out.write(" <tr bgcolor=\"#CCCCFF\">\r\n");
out.write(" <td style=\"word-break:break-all\">");
out.print(commentBean.getContent()==null?"":commentBean.getContent());
out.write("</td>\r\n");
out.write(" <td align=\"center\">");
out.print(commentBean.getAuthor()==null?"":commentBean.getAuthor());
out.write("</td>\r\n");
out.write(" <td align=\"center\">");
out.print(commentBean.getAddTime()==null?"":commentBean.getAddTime());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
}
out.write("\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"151\" align=\"right\" valign=\"middle\" bgcolor=\"#999999\"><div align=\"center\"><strong>参加评论</strong></div></td>\r\n");
out.write(" <td bgcolor=\"#CCCCCC\"><form name=\"form1\" method=\"post\" action=\"addcommentservlet\">\r\n");
out.write(" <input type=\"hidden\" name=\"messegeId\" value=\"");
out.print(msgDetailBean.getMessegeId());
out.write("\">\r\n");
out.write(" <table width=\"100%\" border=\"1\" bordercolorlight= #C1A4F4 bordercolordark=#ffffff cellpadding=0 cellspacing=0>\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"43%\" height=\"130\"><table width=\"95%\" border=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"10%\" height=\"25\"><strong>差</strong></td>\r\n");
out.write(" <td width=\"8%\" align=\"center\">1</td>\r\n");
out.write(" <td width=\"8%\" align=\"center\">2</td>\r\n");
out.write(" <td width=\"8%\" align=\"center\">3</td>\r\n");
out.write(" <td width=\"8%\" align=\"center\">4</td>\r\n");
out.write(" <td width=\"8%\" align=\"center\">5</td>\r\n");
out.write(" <td width=\"8%\" align=\"center\">6</td>\r\n");
out.write(" <td width=\"8%\" align=\"center\">7</td>\r\n");
out.write(" <td width=\"8%\" align=\"center\">8</td>\r\n");
out.write(" <td width=\"8%\" align=\"center\">9</td>\r\n");
out.write(" <td width=\"8%\" align=\"center\">10</td>\r\n");
out.write(" <td width=\"10%\"><strong>好</strong></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"27\"> </td>\r\n");
out.write(" <td><input type=\"radio\" name=\"RadioGroup1\" value=\"1\"></td>\r\n");
out.write(" <td><input type=\"radio\" name=\"RadioGroup1\" value=\"2\"></td>\r\n");
out.write(" <td><input type=\"radio\" name=\"RadioGroup1\" value=\"3\"></td>\r\n");
out.write(" <td><input type=\"radio\" name=\"RadioGroup1\" value=\"4\"></td>\r\n");
out.write(" <td><input type=\"radio\" name=\"RadioGroup1\" value=\"5\"></td>\r\n");
out.write(" <td><input type=\"radio\" name=\"RadioGroup1\" value=\"6\"></td>\r\n");
out.write(" <td><input type=\"radio\" name=\"RadioGroup1\" value=\"7\"></td>\r\n");
out.write(" <td><input type=\"radio\" name=\"RadioGroup1\" value=\"8\"></td>\r\n");
out.write(" <td><input type=\"radio\" name=\"RadioGroup1\" value=\"9\"></td>\r\n");
out.write(" <td><input type=\"radio\" name=\"RadioGroup1\" value=\"10\"></td>\r\n");
out.write(" <td> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"23\" colspan=\"10\">共有");
out.print(String.valueOf(msgDetailBean.getScoreNum()));
out.write("人评分,得分为:");
out.print(avrScore);
out.write("</td>\r\n");
out.write(" <td colspan=\"2\"><input name=\"scoreButton\" type=\"submit\" class=\"button1\" id=\"scoreButton\" value=\"评分\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" <td width=\"57%\"><table width=\"100%\" border=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"19%\" height=\"51\" align=\"right\" bgcolor=\"#999999\"><strong>评论:</strong></td>\r\n");
out.write(" <td width=\"81%\"><textarea name=\"comment\" cols=\"48\" rows=\"4\" id=\"comment\" ></textarea></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"25\" align=\"right\" bgcolor=\"#999999\"><strong>作者:</strong></td>\r\n");
out.write(" <td><input name=\"author\" type=\"text\" class=\"text1\" id=\"author\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"25\" bgcolor=\"#999999\"> </td>\r\n");
out.write(" <td><input name=\"addComment\" type=\"submit\" class=\"button1\" id=\"addComment\" value=\"添加\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" </form></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></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 + -