单选题What is the purpose of session management?()A To manage the user’s login and logout activities.B To store information on the client-side between HTTP requests.C To store information on the server-side between HTTP requests.D To tell the web container t...
Friday, October 6, 2023
单选题Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface: public interface ApplicationController {public String invoke(HttpServletRequest request)} The return value of this method ...
单选题A developer is designing the presentation tier for a web application that relies on a complex session bean.The session bean is still being developed and the APIs for it are NOT finalized. Any changes to the sessionbean API directly impacts the developm...
Tuesday, May 21, 2024
单选题Given this fragment from a Java EE deployment descriptor: 341. 342.java.lang.Throwable 343./mainError.jsp 344. 345. 346.java.lang.ClassCastException 347./castError.jsp 348. If the web application associated with the fragment above throws a ClassCastE...
Thursday, March 7, 2024
单选题You need to create a JSP that generates some JavaScript code to populate an array of strings used on theclient-side. Which JSP code snippet will create this array?()A MY_ARRAY = new Array();% for ( int i = 0; i serverArray.length; i++ ) { MY_ARRAY[%= ...
Saturday, February 24, 2024
单选题You are building a Front Controller using a JSP page and you need to determine if the user’s session hasNOT been created yet and perform some special processing for this case. Which scriptlet code snippet willperform this test?()A % if ( request.getSes...
Sunday, March 26, 2023
单选题Which basic authentication type is optional for a J2EE 1.4 compliant web container?()A HTTP Basic AuthenticationB Form Based AuthenticationC HTTP Digest AuthenticationD HTTPS Client Authentication...
Tuesday, August 29, 2023
单选题The JSP developer wants a comment to be visible in the final output to the browser. Which comment styleneeds to be used in a JSP page?()A !-- this is a comment --B % // this is a comment %C %-- this is a comment --%D % /** this is a comment **/ %...
Sunday, January 8, 2023
多选题Given: 11. 15. Which three EL expressions, inserted at line 15,are valid and evaluate to "3"?()A${vals.2}B${vals[2]}C${vals.index}D${vals[index]}E${vals}[index]F${vals[vals[index-1]]}...
单选题Which ensures that a JSP response is of type "text/plain"?()A %@ page mimeType=text/plain %B %@ page contentType=text/plain %C %@ page pageEncoding=text/plain %D %@ page contentEncoding=text/plain %E % response.setEncoding(text/plain); %...
单选题The Squeaky Bean company has decided to port their web application to a new J2EE 1.4 container. Whilereviewing the application, a developer realizes that in multiple places within the current application, nearlyduplicate code exists that finds enterpri...
Saturday, July 15, 2023
Given: 3.class MyServlet extends HttpServlet { 4.public void...
Wednesday, September 21, 2022
A web application allows the HTML title banner to be set usi...
多选题A session-scoped attribute is stored by a servlet, and then that servlet forwards to a JSP page. Which threejsp:useBean attributes must be used to access this attribute in the JSP page?()AidBnameCbeanDtypeEscope...
单选题You have a new IT manager that has mandated that all JSPs must be refactored to include no scritpletcode. The IT manager has asked you to enforce this. Which deployment descriptor element will satisfy thisconstraint?()A jsp-property-group. url-pattern*...
单选题Which EL expression evaluates to the request URI?()A ${requestURI}B ${request.URI}C ${request.getURI}D ${request.requestURI}E ${requestScope.requestURI}F ${pageContext.request.requestURI}...
单选题A developer has used this code within a servlet: 62.if(request.isUserInRole("vip")) { 63.// VIP-related logic here 64.} What else must the developer do to ensure that the intended security goal is achieved?()A Create a user called vip in the security r...
单选题Given a Filter class definition with this method: 21.public void doFilter(ServletRequest request, 22.ServletResponse response, 23.FilterChain chain) 24.throws ServletException, IOException { 25.// insert code here26. } Which should you insert at line 2...
Friday, April 26, 2024
单选题Your web application views all have the same header, which includes the tag in the 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, th...