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

正文內(nèi)容

javaweb應(yīng)用開發(fā)實用教程練習(xí)答案-資料下載頁

2025-06-22 12:53本頁面
  

【正文】 ing(((RdName)) .getBytes(iso88591), gb2312)。 % % String str2 = new String(((PhName)) .getBytes(iso88591), gb2312)。 % 您輸入的信息為:br 姓名: %=str1%br 密碼: %=str2%br /body/html。 上機(jī)練習(xí)(1)運行結(jié)果1. 單選題(1) 有關(guān)表達(dá)式語言,下面說法不正確的是( )。A. B. 使用表達(dá)式語言可以以標(biāo)記格式方便地訪問JSP 的隱含對象和JavaBeans 組件C. 表達(dá)式語言是一種通用的程序語言D. 表達(dá)式語言可以自動進(jìn)行類型轉(zhuǎn)換答案:C(2) 要在頁面上輸出2+3=${2+3},則對應(yīng)的程序代碼應(yīng)為( )。A. 2+3=\${2+3}B. 2+3=${2+3} C. 2+3=/${2+3} D. 以上都不對 答案:A(3) 以下不屬于條件求值的是( )。A. ${3=8?true:false}B. ${69?true:false}C. ${69?6:9}D. ${69}答案:D(4) 下面有關(guān)EL中“.“和“[ ]“兩種存取運算符的說法不正確的是( )A. 兩者在某些情況下是等效的B. “[ ]“運算符主要用來訪問數(shù)組、列表或其他集合C. 如果要動態(tài)取值時,兩者都可以實現(xiàn)D. 當(dāng)要存取的屬性名稱中包含一些特殊字符,?等并非字母或數(shù)字的符號,就一定要使用“[ ]“ 答案:C2. 上機(jī)練習(xí) (1)編寫程序。 程序輸出結(jié)果 答案::%@ page contentType=text/html。 charset=gb2312%html head title運算符舉例/title /head body center table border=1 align=center tr th colspan=2 算術(shù)和比較運算符 /th th colspan=2 條件運算符 /th /tr tr th 表達(dá)式 /th th 結(jié)果 /th th 表達(dá)式 /th th 結(jié)果 /th /tr tr align=center td \${5*7} /td td ${5*7} /td td \${95?true:false} /td td ${95?true:false} /td /tr tr align=center td \${60=20} /td td ${60=20} /td td \${39。a39。39。A39。?39。a39。:39。A39。} /td td ${39。a39。39。A39。?39。a39。:39。A39。} /td /tr /table /center /body/html(2)編寫一個簡單的JavaBean,通過EL的存取運算符訪問其屬性。答案:,包含姓名、密碼和電子郵件3個屬性,其代碼如下:package bean。public class userLogin { private String userName。 private String password。 private String 。 public userLogin() { userName = 李平。 password = 123。 = liping@。 } public void setuserName(String userName) { = userName。 } public String getuserName() { return 。 } public void setpassword(String password) { = password。 } public String getpassword() { return 。 } public void set(String ) { = 。 } public String get() { return 。 }},其代碼如下:%@ page contentType=text/html。 charset=gb2312%%@ page import=%jsp:useBean id=user class= scope=session/jsp:useBeanhtml head title使用存取運算符訪問JavaBean的屬性/title /head body !通過EL存取運算符訪問JavaBean的屬性 用戶名:${} br 密碼:${} br 電子郵箱:${} br /body/html。 上機(jī)練習(xí)(2)運行結(jié)果 1. 單選題(1) 以下有關(guān)JSTL的說法不正確的是( )A. JSTL就是一個JSP標(biāo)簽庫B. 核心標(biāo)簽庫為日常任務(wù)提供通用支持C. 國際化標(biāo)簽庫支持多語種的應(yīng)用程序D. 函數(shù)標(biāo)簽庫提供了許多用于XML處理的標(biāo)準(zhǔn)EL函數(shù)答案:D(2) 要使用JSTL的核心標(biāo)簽庫,需要在JSP源文件的首部加入如下聲明語句( )A. %@ taglib prefix=c uri= %B. %@ taglib prefix=”x” uri=””%C. %@ taglib prefix=”fmt” uri=””%D. %@ taglib prefix=”sql” uri=””%答案:A(3) 以下( )標(biāo)簽用于實現(xiàn)循環(huán)功能,類似與Java語句中的for循環(huán)。A. c:set B. c:forEach C. c:Tokens D. c:import 答案:B(4) 以下( )標(biāo)簽用來解析XML文件。A. x:set B. x:otherwise C. x:parse D. x:transform答案:C(5) 以下( )標(biāo)簽用于格式化日期和時間并按照設(shè)定的格式給予輸出。A. fmt:formatDate B. fmt:setLocale C. fmt:param D. fmt:setTimeZone答案:A2. 上機(jī)練習(xí) (1)用c:if標(biāo)簽來實現(xiàn)判斷一個整數(shù)是否大于100,并輸出判斷結(jié)果。答案:文件exIfTag代碼如下:%@ page contentType=text/html。charset=GB2312%%@ taglib prefix=c uri=%html head titlec:if使用示例/title /head body c:set value=50 var=testInt / c:if test=${testInt100} var=intCheck 整數(shù)c:out value=${testInt} /小于100 /c:if c:if test=${testInt=100} var=intCheck 整數(shù)c:out value=${testInt} /大于等于100 /c:if /body/html 上機(jī)練習(xí)(1)運行結(jié)果(2)制作用戶登錄界面,根據(jù)用戶輸入的用戶名和密碼是否正確,分別用c:redirect標(biāo)簽轉(zhuǎn)向登錄成功頁面和登錄失敗頁面。答案:,其代碼如下:html head title登錄頁面/title /head body form name=form1 action= method=post 用戶名 input type=text name=userName br 密amp。nbsp。 碼 input type=password name=password br label amp。nbsp。amp。nbsp。amp。nbsp。amp。nbsp。amp。nbsp。amp。nbsp。amp。nbsp。 input type=submit name=Submit value=提交 /label label amp。nbsp。amp。nbsp。amp。nbsp。 input type=reset name=Submit2 value=重置 /label /form /body/html。 上機(jī)練習(xí)(2)登錄界面。,并根據(jù)用戶輸入轉(zhuǎn)向不同的頁面。其代碼如下:%@ page contentType=text/html。 charset=gb2312%%@ taglib prefix=c uri=%html head title接受用戶輸入信息并轉(zhuǎn)向不同頁面/title /head body % (gb2312)。 String userName = (userName)。 String password = (password)。 if ((李平) amp。amp。 (123)) { % c:redirect url= / % } if (!(李平) || !(123)) { % c:redirect url= / % } % /body/html,其代碼如下:%@ page contentType=text/html。 charset=gb2312%html head title登錄成功/title /head body 您已成功登錄! /body/html,其代碼如下:%@ page contentType=text/html。 charset=gb2312%html head title登錄失敗/title /head body 對不起,您輸入的用戶名或密碼錯誤! /body/html。 登錄成功和失敗頁面(3)分別用不同國家的貨幣符號和貨幣輸出格式輸出一個貨幣值。答案::%@ page contentType=text/html。charset=GB2312%%@ taglib prefix=fmt uri=%%@ taglib prefix=c uri=%html head title不同格式輸出貨幣值/title /head body center 用不同格式輸出貨幣值 /center hr c:set var=number value=1000 / 人民幣格式為: fmt:formatNumber value=${number} type=currency currencySymbol=¥ groupingUsed=true / br 美元格式為: fmt:formatNumber value=${number} type=currency currencySymbol=$ groupingUsed=true / br 港幣格式為: fmt:formatNumber value=${number} type=currency currencySymbol=HK$ groupingUsed=true / br /body/html。 上機(jī)練習(xí)(3)運行結(jié)果
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1