You need to create a servlet filter that stores all request headers to a database for all requests to the webapplication’s home page "/index.jsp". Which HttpServletRequest method allows you to retrieve all of therequest headers?()
A.String[] getHeaderNames() B.String[] getRequestHeaders() C.java.util.Iterator getHeaderNames() D.java.util.Iterator getRequestHeaders() E.java.util.Enumeration getHeaderNames()
多项选择题ForanHttpServletResponseresponse,whichtwocreateacustomheader?()
A.response.setHeader("X-MyHeader", "34"); B.response.addHeader("X-MyHeader", "34"); C.response.setHeader(new HttpHeader("X-MyHeader", "34")); D.response.addHeader(new HttpHeader("X-MyHeader", "34")); E.response.addHeader(new ServletHeader("X-MyHeader", "34"));
单项选择题Click the Exhibit button. Given the HTML form: 1. 2. 3. 4.Name: 5.Price: 6. 7. 8. 9. Assume the product attribute does NOT yet exist in any scope. Which code snippet, in submit.jsp,instantiates an instance of com.example.Product that contains the results of the form submission?()
A. B. C. D.
多项选择题A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBeanattributes must be used to access this attribute in the JSP page?()
A.Id B.Type C.Name D.Class E.Yscope
单项选择题Your web application views all have the same header, which includes the <title> tag in the <head> elementof the rendered HTML. You have decided to remove this redundant HTML code from your JSPs and put itinto a single JSP called WEB-INF jsp header.jsp. However, the title of each page is unique, so you havedecided to use a variable called pageTitle to parameterize this in the header JSP, like this: 10.<title>${param.pageTitle}<title> Which JSP code snippet should you use in your main view JSPs to insert the header and pass thepageTitle variable?()
A.<jsp:insert page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:insert> B.<jsp:include page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include> C.<jsp:include file=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include> D.<jsp:insert page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:insert> E.<jsp:include page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:include>
多项选择题A JSP page needs to set the property of a given JavaBean to a value that is calculated with the JSP page. Which three jsp:setProperty attributes must be used to perform this initialization?()
A.Id B.Val C.Name D.Param E.Value F.Property