当前分类: SCWCD(310-083)
问题:单选题You are building a web application with a scheduling component. On the JSP, you need to show the currentdate, the date of the previous week, and the date of the next week. To help you present this information,you have created the following EL functions...
查看答案
问题:单选题You are building a dating service web site. Part of the form to submit a client’s profile is a groupIIof radio buttons for the person’s hobbies: 20.Hiking 21.Skiing 22.SCUBA Diving 23. After the user submits this form, a confirmation screen is displa...
问题:单选题Which statement is true if the doStartTag method returns EVAL_BODY_BUFFERED?()A The tag handler must implement BodyTag.B The doAfterBody method is NOT called.C The setBodyContent method is called once.D It is never legal to return EVAL_BODY_BUFFERED fr...
问题:单选题Given an HttpServletRequest request and HttpServletResponse response,which sets a cookie "username"with the value "joe" in a servlet?()A request.addCookie(username, joe)B request.setCookie(username, joe)C response.addCookie(username, joe)D request.addH...
问题:多选题Given a header in an HTTP request:X-Retries:4 Which two retrieve the value of the header from a given HttpServletRequest request?()ARequest.getHeader(X-Retries)BRequest.getIntHeader(X-Retries)CRequest.getRequestHeader(X-Retries)DRequest.getHeaders(X-Re...
问题:单选题After a merger with another small business, your company has inherited a legacy WAR file but the originalsource files were lost. After reading the documentation of that web application,you discover that the WARfile contains a useful tag library that yo...
问题:多选题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?()AIdBTypeCNameDClassEYscope...
问题:多选题Which two are valid and equivalent?()A%! int i; %B%= int i; %Cjsp:exprint i;/jsp:exprDjsp:scriptletint i;/jsp:scriptletEjsp:declarationint i;/jsp:declaration...
问题:多选题Which three are described in the standard web application deployment descriptor?()Asession configurationBMIME type mappingsCcontext root for the applicationDservlet instance pool configurationEweb container default port bindingsFServlet Context initial...
问题:多选题Given: http://com.example/myServlet.jsp?num=onenum=twonum=three. Which two produce the output"one, two and three"?()A${param.num[0],[1] and [2]}B${paramValues[0],[1] and [2]}C${param.num[0]}, ${param.num[1]} and ${param.num[2]}D${paramValues.num[0]}, $...
问题:单选题Servlet A forwarded a request to servlet B using the forward method of RequestDispatcher. What attributein B’s request object contains the URI of the original request received by servlet A?()A REQUEST_URIB javax.servlet.forward.request_uriC javax.servl...
问题:多选题You are designing an n-tier Java EE application. You have already decided that some of your JSPs willneed to get data from a Customer entity bean. You are trying to decide whether to use a Customer stubobject or a Transfer Object. Which two statements ...
问题:单选题Assume the custom tag my:errorProne always throws a java.lang.RuntimeException with the message "Filenot found." An error page has been configured for this JSP page. Which option prevents the exceptionthrown by my:errorProne from invoking the error pag...
问题:单选题You have a use case in your web application that adds several session-scoped attributes. At the end of theuse case, one of these objects, the manager attribute, is removed and then it needs to decide which of theother session-scoped attributes to remov...
问题:多选题A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called sort.jspexists in the web application and contains only this JSP code: 1. 3. The sort.jsp page is requested. Which two are true?()ATag files can only be acc...
问题:多选题You are creating a servlet that generates stock market graphs. You want to provide the web browser withprecise information about the amount of data being sent in the response stream. Which twoHttpServletResponse methods will you use to provide this in...
问题:单选题To take advantage of the capabilities of modern browsers that use web standards, such as XHTML andCSS, your web application is being converted from simple JSP pages to JSP Document format. However,one of your JSPs, /scripts/screenFunctions.jsp, generat...
问题:单选题A developer is designing a web application which extensively uses EJBs and JMS. The developer finds thatthere is a lot of duplicated code to build the JNDI contexts to access the beans and queues. Further,because of the complexity, there are numerous e...
问题:多选题Which two are characteristics of the Service Locator pattern?()AIt encapsulates component lookup procedures.BIt increases source code duplication and decreases reuse.CIt improves client performance by caching context and factory objects.DIt degrades ne...
问题:多选题Given an HttpServletRequest request: 22.String id = request.getParameter("jsessionid"); 23.// insert code here 24.String name = (String) session.getAttribute("name"); Which three can be placed at line 23 to retrieve anexisting HttpSession object?()AHtt...