---2.question :
the "acme inc" plans to design a web application with an enjoyable user experience,for all kinds of
Internet browsers.to do this,there is a need to read the "user-agent" header and determind the flow of
action accordingly.identify the EL fragment that can be used to identify the same.select two choices.
a. ${headerValues['user-agent'][0]}
b. ${header['user-agent']}
c. ${headerValues.user-agent.[0]}
d. ${header.user-agent}
i think b,d
---3 question:
A web site stores loged on user's name in the session variable "name".which of the following core JSTL
fragmetns will print "welcome xxx" when a user xxx is logged on and "welcome guest" otherwise.select three
choices.
a. welcome <c
ut value="${sessionScope.name}" default="guest"/>
b. <c
ut value="welcome &{sessionScope.name}" default="guest"/>
c. welcome <c
ut value= "${sessionScope.name}">guest</c
ut>
d. welcome <c
ut value = "${sessionScope.name}" default="guest">guest</c
ut>
e. welcome <c
ut value= "${sessionScope.name}" default="guest" escapeXml="true"/>
which is right answer
i think a,c,e
---4 question:
Identify the true statements about the sendRedirect(STring url) method of the HttpServletResponse interface
.select two choices.
a. rediects to a different URL with the existing headers and content body.
b. sets appropriate headers and content body to redirect the client to a different URL.
c. accepts relative URL path or the context path.Container will translate it to valid URL.
d. this method should be called only after committing the response to the client.redirection before
committing causes IllegalStateException.
i think a,c