- 相關推薦
JSP基本語法與簡單表單的處理
JSP基本語法與簡單表單處理,setAttribute(String,Object)把變量的值保存在application中;
jsp語法
jsp指令元素
(1)include:導入其它文件夾
(2)page:
language:用什么語言,只能為JAVA
contentType:MIME類型
import:導入java包
(3)taglib:自定義標簽庫
jsp常用標準元素
(1)jsp:forward:跳轉到其它頁面
(2)jsp:include:插入其它文件 eg:
(3)jsp:plugin:插入applet小程序
(4)jsp:param:參數傳值
jsp內置對象
(1)request:常用方法
getParameter():提取表單元素的值
getRemoteAddr():獲取客戶端IP值
(2)response:
sendRedirect():重定向到其它網頁
setcontentType();設置MIME值
(3)out:向網頁輸出
(4)application
setAttribute(String,Object)把變量的值保存在application中;
getAttribute(String)獲取保存在applicaion中的值
removeAttribute(String)刪除保存在application中的值
(5)session
setAttribute(String,Object)把變量的值保存在session中;
getAttribute(String)獲取保存在session中的值
removeAttribute(String)刪除保存在
jsp語法
jsp指令元素
(1)include:導入其它文件夾
(2)page:
language:用什么語言,只能為JAVA
contentType:MIME類型
import:導入java包
(3)taglib:自定義標簽庫
jsp常用標準元素
(1)jsp:forward:跳轉到其它頁面
(2)jsp:include:插入其它文件 eg:
(3)jsp:plugin:插入applet小程序
(4)jsp:param:參數傳值
jsp內置對象
(1)request:常用方法
getParameter():提取表單元素的值
getRemoteAddr():獲取客戶端IP值
(2)response:
sendRedirect():重定向到其它網頁
setcontentType();設置MIME值
(3)out:向網頁輸出
(4)application
setAttribute(String,Object)把變量的值保存在application中;
getAttribute(String)獲取保存在applicaion中的值
removeAttribute(String)刪除保存在application中的值
(5)session
setAttribute(String,Object)把變量的值保存在session中;
getAttribute(String)獲取保存在session中的值
removeAttribute(String)刪除保存在session中的值
getID:獲取session編號
【JSP基本語法與簡單表單的處理】相關文章:
jQuery簡單的表單應用07-14
css的基本語法07-17
英語基本語法盤點10-26
英語基本語法總結06-28
日語基本語法句型08-03
PHP的基本語法的介紹10-08
HTML表單標記簡單教程06-17
德語基本語法知識講解10-01
ASP基本的語法規則08-24
JavaScript基本語法分析10-04