单选题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?()A ${userName}B ${cookie.userName}C ${cookie.user.name}D ${cookies.userName[0]}

题目
单选题
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?()
A

${userName}

B

${cookie.userName}

C

${cookie.user.name}

D

${cookies.userName[0]}

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

billhasanauthornamesfieldnamedalleditorsthatcalculatesalistofpossibleeditorsofthedocbasedonvaluesusershasenteredintoanotherfield.Thelistonlycontainsusers’firstandlastnames,andonlyshouldbedisplayedtouserswhocaneditdoc.Whichofthefollowinghide-whenformulasshouldbillusetocontrolthedisplayofthefield?()

A.@isnotmember(alleditors,@username)

B.@isnotmember(@name([cn]);@username)

C.@isnotmember(alleditors;@name([cn];@username))

D.if(@isnotmember(alleditors;@name([cn];@username);@true;@false))


参考答案:C

第2题:

Which three statistics does the Executive report summarize?() (Choose three.)

  • A、latency and loss
  • B、compression results
  • C、traffic (by application)
  • D、CRC and alignment errors
  • E、user access (by username)

正确答案:A,B,C

第3题:

You create a Web site that is for members only. The Web site allows members to create lists of users that have access to information about member profiles. The name of the list is stored in the listName variable. The user name of the user to whom access is given is stored in the username variable.You need to enable members to manage their lists of users.Which code segment should you use?()

A.

B.

C.

D.


参考答案:B

第4题:

关于点操作符和“[ ]”,以下说法不正确的是()。

  • A、 ${user. username}等价于${user. [username]}
  • B、 ${user. username}等价于${user. [“username”]}
  • C、 如果user是一个List, 则${user[0]}的写法是正确的
  • D、 如果user是一个数组, 则${user[0]}的写法是正确的

正确答案:A

第5题:

You would like to configure your PC's IP  address of 10.10.0.156 as an FTP host with a username of user and a password of mypass.Which configuration command accomplishes this goal?()

  • A、host user pc 10.10.0.156 ftp user mypass
  • B、host user pc 10.10.0.156 tftp user mypass
  • C、host name user pc 10.10.0.156 ftp user mypass
  • D、host name user pc 10.10.0.156 tftp user mypass

正确答案:A

第6题:

Given an HttpServlet Request request and Http Servlet Response response, which sets a cookie “username” with the value “joe” in a servlet.?()

  • A、 request.add Cookie (“username”. “joe”)
  • B、 request.set Cookie (“username, “joe”)
  • C、 response.add Cookie (username”, “joe”))
  • D、 request.add Header (new Cookie (“username”, “joe”))
  • E、 request.add Cookie (new Cookie (“username”, “joe”))
  • F、 response.add Cookie (new Cookie (“username”, “joe”))
  • G、 response.add Header (new Cookie (“username”, “joe”))

正确答案:F

第7题:

A web application uses the HttpSession mechanism to determine if a user is “logged in”. When a user supplies a valid user name and password, an HttpSession is created for that user.  The user has access to the application for only 15 minutes after logging in. The code must determine how long the user has been logged in, and if this time is greater than 15 minutes, must destroy the HttpSession.  Which method in HttpSession is used to accomplish this?()

  • A、 getCreationTime
  • B、 invalidateAfter
  • C、 getLastAccessedTime
  • D、 getMaxInactiveInterval

正确答案:A

第8题:

GivenawebapplicationinwhichthecookieuserNameisexpectedtocontainthenameoftheuser.Which ELexpressionevaluatestothatusername?()

A.${userName}

B.${cookie.userName}

C.${cookie.user.name}

D.${cookies.userName[0]}


参考答案:B

第9题:

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?()

  • A、${userName}
  • B、${cookie.userName}
  • C、${cookie.user.name}
  • D、${cookies.userName[0]}

正确答案:B

第10题:

以下EL表达式的语法结构中正确的是()。 

  • A、 $[user. userName]
  • B、 #[user. userName]
  • C、 ${user. username}
  • D、 #{user. username}

正确答案:C

更多相关问题