⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comments.jsp

📁 仿校内网站
💻 JSP
字号:
<%@page contentType="text/html"%>
<%@page pageEncoding="utf-8"%>
<%@page import="java.sql.*" %>

<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
--%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
   
<jsp:useBean id="db" class="ArticleSharing.DBTools" scope="session"/>

<html>
    <head>
        <style>a{TEXT-DECORATION:none}</style>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title></title>
    <style type="text/css">
<!--
body {
	background-image: url(picture.jpg);
}
.STYLE1 {font-size: 36px}
-->
    </style></head>
    <body>

     <table width="764" border="0" align="center">
       <tr>
         <td><img src="5clogo.jpg" width="757" height="121"><span class="STYLE1"></span></td>
       </tr>
     </table>
     <table width="200" border="0" align="center">
        <tr>
          <td><a href="articlelist.jsp"><img border="0" src="tubiao6.jpg" width="52" height="52"></a></td>
        </tr>
        <tr>
          <td>
        <%
	String article_id = request.getParameter("id");
	ResultSet rs = db.excuteQuery("select * from responses where post_id='" + article_id + "'");
	String comment = null;
	String author = null;
	Date date = null;
        int id = 0;
	while (rs.next()) {
                id = rs.getInt("response_id");
		comment = rs.getString("response_content");
		author = rs.getString("responser_name");
		date = rs.getDate("response_date");
	%>
              <table width="849" height="50" border="0" align="center">
                  <tr>
                      <td width="140" valign="top" bgcolor="#00FFFF"><%=author%></td>
                      <td width="656" valign="top" bgcolor="#00FFFF"><p>Time: <%=date.toString()%></p>
                      </td>
                  </tr>
                  <tr>
                      <td colspan="2" bgcolor="#99FF66"><%=comment%></td>
                  </tr>
              </table>
          <% 
            }
          %>
          </td>
        </tr>
    </table>
      <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
        <!-- Let's welcome the user ${param.name} -->
        Hello ${param.name}!
    </c:if>
    --%>
    
    </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -