JSP基本语法与简单表单的处理

时间:2020-09-30 09:11:12 JAVA认证 我要投稿

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基本语法与简单表单的处理】相关文章:

有关语法和表单的PHP教程10-18

jQuery简单的表单应用11-11

小升初英语基本语法与练习07-18

HTML表单标记简单教程11-10

css的基本语法11-13

小升初英语基本语法全面解析与习题08-10

日语基本语法句型11-03

PHP的基本语法的介绍11-17

ASP基本的语法规则10-16