freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

javaee概述和servlet基礎(編輯修改稿)

2025-04-18 09:21 本頁面
 

【文章內(nèi)容簡介】 \n)。 ( body\r\n)。 ( This is my JSP page. br\r\n)。 ( /body\r\n)。 (/html\r\n)。 %@ page contentType=text/html。charset=gbk % html head titleMyJsp/title /head body This is my JSP page. br /body /html ( .jsp轉譯后的 .java文件 ) JSP轉譯后的 .java文件與Servlet的處理方式一樣 Servlet是 JSP技術的基礎 演示示例 1: Tomcat下 26 如何創(chuàng)建 Servlet 前臺頁面的創(chuàng)建 ? FORM表單的編寫 后臺 Servlet的創(chuàng)建 ? 使用 MyEclipse的 Servlet向導創(chuàng)建 Servlet代碼模板 ? 根據(jù)表單提交方法,確定接收方法 ? 接收請求數(shù)據(jù)、處理數(shù)據(jù)、返回響應頁面 27 FORM表單的 method屬性 FORM表單提交的方法 ? Get和 Post html head titleMyJsp/title /head body This is my JSP page. br /body /html %@ page contentType=text/html。charset=gbk % html head titleMyJsp/title /head body form action=helloservlet method= ? name=form1“ ! 表單內(nèi)容 /form /body /html FORM的方法有哪些? Get | Post Get 與 Post有什么區(qū)別? Get、 Post提交數(shù)據(jù)與 Servlet有什么關系嗎? 28 使用向導創(chuàng)建 Servlet 在 MyEclipse下如何創(chuàng)建 Servlet ? 在 MyEclipse下如何創(chuàng)建 Servlet ? 首先在缺省包( src)下創(chuàng)建 包 ? 在上述包中使用向導創(chuàng)建 Servlet 演示示例 2: 創(chuàng)建 Servlet步驟 29 Servlet編程模式 Servlet編程基本模式 ? 處理 Get和 Post請求 import 。 import .*。 import .*。 public class HelloServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //doGet方法體內(nèi)容 } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //doPost方法體內(nèi)容 } } 使用 Get方法提交,觸發(fā) doGet()方法 使用 Post方法提交,觸發(fā) doPost()方法 30 Servlet編程模式 Servlet編程基本模式 ? Servlet如何接收數(shù)據(jù) import 。 import .*。 import .*。 public class HelloServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { //doPost方法體內(nèi)容 } } 參數(shù)為表單元素名稱 接收數(shù)據(jù)與 JSP相同 如果是使用 Get方法提交數(shù)據(jù) String userName = (userName)。 String userPass = (userPass)。 //doGet方法體內(nèi)容 如果是使用 Post方法提交數(shù)據(jù) doPost(request,response)。 31 Servlet編
點擊復制文檔內(nèi)容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1