viewmessages_jsp.java

来自「Internet 开发技术分章节代码和自己完成的课程设计全代码(在zuoye文件」· Java 代码 · 共 101 行

JAVA
101
字号
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import message.MessageDataBean;
import java.util.*;

public final class viewMessages_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.List _jspx_dependants;

  public Object 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=GBK");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, 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");
      out.write("<HTML>\r\n");
      out.write("<HEAD><TITLE>显示留言</TITLE></HEAD><BODY>\r\n");
      out.write("<p align=\"center\">所有留言</p>\r\n");
      out.write(" <TABLE  align=\"center\" width=\"80%\" border=1 >\r\n");
      out.write(" ");
 
    int message_count=0;
    Collection messages=(Collection)request.getAttribute("messages");
    Iterator it=messages.iterator();
    while(it.hasNext())
     {  MessageDataBean mg=(MessageDataBean)it.next();  
 
      out.write("\r\n");
      out.write("   <tr>\r\n");
      out.write("\t\t<td width=\"20%\">留言人:</td>\r\n");
      out.write("\t\t<td width=\"23%\">");
      out.print(mg.getName());
      out.write("</td>\r\n");
      out.write("\t\t<td width=\"58%\" align=\"center\">");
 out.println("<a href=mailto:"+mg.getEmail()+">"+mg.getEmail()+"</a>");
      out.write("</td>\r\n");
      out.write("\t</tr>\r\n");
      out.write("\t<tr>\r\n");
      out.write("\t\t<td width=\"20%\">主题:</td>\r\n");
      out.write("\t\t<td colspan=\"3\">");
      out.print(mg.getTitle());
      out.write("</td>\r\n");
      out.write("\t</tr>\r\n");
      out.write("\t<tr>\r\n");
      out.write("\t\t<td width=\"20%\">内容:</td>\r\n");
      out.write("\t\t<td colspan=\"3\">");
      out.print(mg.getContent());
      out.write("</td>\r\n");
      out.write("\t</tr>\r\n");
      out.write("   ");
  message_count++;
  } 
   
      out.write("\r\n");
      out.write(" </Table>\r\n");
      out.write("<p align=\"center\"><a href=\"Messgages.html\">我要留言</a></p>\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 + =
减小字号Ctrl + -
显示快捷键?