a base-64 encoded user name and password
a form that POSTs to the j_security_check URL
an applet that requests the user name and password from the user
a hidden field that supplies the login-constraint used by the application
第1题:
下列关于HTML标记的说法,正确的是( )。
A.URLgetDocumentBase( )返回Applet主类的URL
B.URLgetCOdeBase( )返回包含Applet的HTML文件的URL
C.在HTML中不说明String getParameter(string name)的参数,该方法将返回”0”
D.HTML标记方法用于获取HTML文件中关于Applet的信息
第2题:
创建一个滚动菜单的HTML代码是?()
第3题:
下列关于HTML标记的说法,正确的是( )。
A.URL getDocumentBase()返回Applet主类的URL
B.URL getCOdeBase()返回包含Applet 的HTML 文件的URL
C.在HTML 中不说明String getParameter(string name)的参数,该方法将返回“0”
D.HTML 标记方法用于获取HTML 文件中关于Applet 的信息
第4题:
In form-based authentication, what must be included in the HTML returned from the URL specified by the
第5题:
Given a web application in which the cookie userName is expected to contain the name of the user. Which EL expression evaluates to that user name?()
第6题:
某留言系统采用ASP+Access开发,其后台管理登录页面如图4-1所示。
图4-1
【问题1】(9分)
以下是该后台管理登录页面login.asp的部分代码,请仔细阅读该段代码,根据图4-1 将(1)~(9)的空缺代码补齐。
<!--include file=“conn.asp”-->
<!--include file=“md5.asp”-->
<!--include file=“bbb.asp”-->
<%
If request.Form(“submit”)=“管理登录”Then
user_name = request.Form(“ (1) ”)
password = request.Form(“ (2) ”)
verifycode = request.Form(“ (3) ”)
If user name =“” Then
Callinfoback(“用户名不能为空!”)
End If
......
Set (4) = server. CreateObject(“adodb.recordset”)
sql = “select * from administrator (5) user_name = “&user_name&”and
password = “&md5(password)””
rs.Open (6) ,conn,1,1
If (7) rs.EOF Then
session(“user_name”)= user_name
response.redirect“information.asp”
Else
Call infoback(“用户名或密码错误!”)
End If
End If
%>
<html >
......
<body>
<form. method=“post”action=“login.asp”id=“login”>
<hl>管理员登录</hl>
<label for=“user_name”>用户名:
<input name=“user_name” type=“text” class=“user_name” id=“uname” size=“25”/>
</label>
<label for=“password“>密码:
<input name=“password”type=“password”id=“pword” size=“25”/>
</label>
<label for=“verifycode”>验证码:
<input name=“verifycode” type=“text” class=“verifycode” id=“vcode” size=“10”
maxlength=“4”/>
<img src=“code.asp” nclick=“javascript.:this.src=‘code.asp?tm=’+Math.random()”
style=“cursos:pointer” alt=“点击更换” title=“点击更换”/></label>
<p class=“center”>
<input name=“reset”type=“ (8) ” class=“submit” value=“清除数据”/>
<input type=“ (9) ” name=“submit” class=“submit”value=“管理登录”/>
</p>
</form>
</body>
</html>
(1)~(9)备选答案如下:
A.pword B.where C.uname D.vcode E.reset
F.submit G.rs H.sql I. Not
request.form方法:获取客户端表单信息(通常是POST方法提交的表单)。
user_name、password、varifycode为变量,分别用三个文本字段表单元素的ID结合request.form方法进行赋值。
语句Set rs = server. CreateObject(“adodb.recordset”)为建立数据记录集实例。
语句sql = “select * from administrator where user_name = “&user_name&”andpassword = “&md5(password)””为定义一条带条件查询的SQL语句(用sql引用)。
语句rs.Open sql,conn,1,1 为定义以只读方式打开数据集记录。一般情况下,执行rs.open sql .conn是查询数据库中是否有符合该SQL语句的记录,如果记录存在那么rs.Eof=false,如果不存在那么rs.eof=true,if not rs.eof就是如果记录集指针没有到达最后一条记录之前,指针继续下移。
【问题1】(9分,每空1分)
(1)C或uname
(2)A或pword
(3)D或vcode
(4)G或rs
(5)B或where
(6)H或sql
(7)I或Not
(8)E或reset
(9)F或submit
第7题:
A developer wants to make a name attribute available to all servlets associated with a particular user,across multiple requests from that user, from the same browser instance. Which two provide this capability from within a tag handler?()
第8题:
Your Web site uses custom Themes. Your Web site must support additional Themes based on the user‘s company name. The company name is set when a user logs on to the Web site. The company‘s Theme name is stored in a variable named ThemeName. You need to use this variable to dynamically set the Web site‘s Theme.What should you do?()
A.
B.
C.
D.
第9题:
在struts框架中,以下()语句可以输出Userbean(Bean对象名称为user)中name属性的值。
第10题:
When adding a