好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > JSP中param動作的實例詳解

JSP中param動作的實例詳解

熱門標簽:南通通訊外呼系統產品介紹 給地圖標注得傭金 自繪地圖標注數據 潤滑油銷售電銷機器人 海外圖書館地圖標注點 外呼系統使用方法 電銷機器人免培訓 如何看懂地圖標注點 電話機器人需要使用網絡嗎

JSP中param動作的實例詳解

一 語法

jsp:param name="參數名" value="參數值">

常常與jsp:forward>一起使用,作為其子標簽存在。 

二 代碼

1、login.jsp

%@ page language="java" import="java.util.*" contentType="text/html; charset=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%>" rel="external nofollow" rel="external nofollow" rel="external nofollow" >
  
  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" rel="external nofollow" rel="external nofollow" rel="external nofollow" >
    -->
 
 /head>
 
 body>
  h1>系統登錄/h1>
  hr>
  form name="loginForm" action="dologin.jsp" method="post">
   table>
    tr>
     td>用戶名:/td>
     td>input type="text" name="username"/>/td>
    /tr>
    tr>
     td>密碼:/td>
     td>input type="password" name="password"/>/td>
    /tr>
    tr>
     td colspan="2">input type="submit" value="登錄"/>/td>
    /tr>
   /table>
  /form>
 /body>
/html>

2、dologin.jsp

%@ page language="java" import="java.util.*" contentType="text/html; charset=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%>" rel="external nofollow" rel="external nofollow" rel="external nofollow" >
  
  title>My JSP 'dologin.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" rel="external nofollow" rel="external nofollow" rel="external nofollow" >
    -->
 
 /head>
 
 body>
  jsp:forward page="user.jsp">
   jsp:param value="admin@123.net" name="email"/>
   jsp:param value="888888" name="password"/>
  /jsp:forward>
 /body>
/html>

3、user.jsp

%@ page language="java" import="java.util.*" contentType="text/html; charset=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%>" rel="external nofollow" rel="external nofollow" rel="external nofollow" >
  
  title>My JSP 'user.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" rel="external nofollow" rel="external nofollow" rel="external nofollow" >
    -->
 
 /head>
 
 body>
  h1>用戶資料/h1>
  hr>
  %
    request.setCharacterEncoding("utf-8");
    String username = "";
    String password = "";
    String email = "";
    if(request.getParameter("username")!=null)
    {
     username = request.getParameter("username");
    }
    if(request.getParameter("password")!=null)
    {
     password = request.getParameter("password");
    }
    if(request.getParameter("email")!=null)
    {
     email = request.getParameter("email");
    }
   
  %>
    用戶名:%=username %>br>
    密碼:%=password %>br>
    電子郵箱:%=email %>br>
 /body>
/html>
 

三 運行結果

如有疑問請留言或者到本站社區交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

您可能感興趣的文章:
  • JSP中的編譯指令和動作指令的兩點區別
  • jsp的常用指令有哪些(編譯指令/動作指令整理)
  • 十三、JSP動作
  • 在JSP頁面中動態生成圖片驗證碼的方法實例
  • SpringBoot+jsp項目啟動出現404的解決方法
  • spring boot整合jsp及設置啟動頁面的方法
  • JSP頁面的靜態包含和動態包含使用方法
  • jsp-解決文件上傳后重啟Tomcat時文件自動刪除問題
  • JSP常用七大動作指令實例解析

標簽:樂山 內江 廣州 南京 大連 銅川 貸款邀約 黃石

巨人網絡通訊聲明:本文標題《JSP中param動作的實例詳解》,本文關鍵詞  JSP,中,param,動作,的,實例,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《JSP中param動作的實例詳解》相關的同類信息!
  • 本頁收集關于JSP中param動作的實例詳解的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 无码免费人妻A片AAA毛片西瓜| 国内精自线i品一区202| 女同国产系列在线观看| 亚洲日韩一区久久99第一页| 打开双腿让老乞丐玩| 男女男精品网站免费观看| 性爽久久久久久久久男女小说| 国产精品久久久久久99| 波多野结衣电影073| 亚洲人与日本人jjzz| 爱爱爱动态图| 欧美性色19p| JiZZJiZZJiZZ成熟丰满熟妇| 韩日电影在线| 老师帮我口| 国产污污视频| 欧美精品无码又粗又大又硬| 欧美日韩一二三| 经典黄色片| 青楼的特殊调教(H)| 女的被?到爽的羞羞动态图| 粗大从后面狠狠挺进| 容城县| bd**视频| 国产精品久久欠久久久久久九秃| 夜躁狠狠综合亚洲色噜噜狠狠| 我的诡异人生| 日本动漫电影艳母| 69xxxx日本hd4k| 国产chⅰneseHD╳XXX| 国产欧美久久久久一区二区三区 | 亚洲女同摔角catfight| 成人无码欧美一级95片视频| 精品一线二线三线区别在哪欧美| 香港三级绝色杨贵妃| 和馊子同居的日子日本电影| 国产精品久久久久精品综合紧润丹| 赤坂丽牙医未删减版HD| 扩张自虐露出异物扩张小说| 大女小娟二女小妍第二部分 | 久久久久久久久久一级|