zoukankan      html  css  js  c++  java
  • 4-1:编写一个简单的留言簿,写入留言提交后显示留言内容。

    login.jsp

    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
        
        <title>My JSP 'login.jsp' starting page</title>
        
        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">    
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="This is my page">
        <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        -->
    
      </head>
      
      <body>
       <form id="form1" name="form1" meghod="post" action="login_deal.jsp">
        留言簿:<br>
        <textarea name="re" id="re" cols="45" rows="5"></textarea><br>
        <input type="submit" name="submit" value="提交" />
         
        </form> 
         
      </body>
    <ml>

    login_deal.jsp

     
    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
        
        <title>My JSP 'login_deal.jsp' starting page</title>
        
        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">    
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="This is my page">
        <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        -->
    
      </head>
      
      <body>
      <%
       String re=request.getParameter("re");
       out.println("您的留言为:"+re);
       %>
      </body>
    <ml>
     
  • 相关阅读:
    distribution cleanup job & Agent History Clean Up
    在域环境下建立镜像
    查看发布服务器信息
    Publisherfailoverparnter
    查看/修改分发复制代理的各个属性
    一个分发复制+mirror的bug
    SQLIO.exe
    安装SQL2008 提示 创建usersettings/microsoft.sqlserver.configuration.landingpage.properties.se
    XOOM MZ606 刷机
    NYOJ242计算球体积
  • 原文地址:https://www.cnblogs.com/cancangood/p/4451488.html
Copyright © 2011-2022 走看看