Click the Exhibit button.
The Appliance class is a Singleton that loads a set of properties into a Map from an external data source.Assume:
An instance of the Appliance class exists in the application-scoped attribute, appl The appliance object includes the name property that maps to the value Cobia The request- scoped attribute, prop,has the valuename.
Which two EL code snippets will display the string Cobia?()
A.${appl.properties.name}
B.${appl.properties.prop}
C.${appl.properties[prop]}
D.${appl.properties[name]}
E.${appl.getProperties().get(prop)}
F.${appl.getProperties().get(’name’)}
您可能感興趣的試卷
你可能感興趣的試題
A.${func(1)}
B.${foo:func(4)}
C.${func:foo(2)}
D.${foo(5):func}
E.${func:foo("easy")}
F.${func:foo("3").name}
You have created a web application that you license to real estate brokers. The webapp is highly customizable including the email address of the broker, which is placed on the footer of each page. This isconfigured as a context parameter in the deployment descriptor:
10.<context-param>
11.<param-name>footerEmail</param-name>
12.<param-value>joe@estates-r-us.biz</param-value>
13.</context-param>
Which EL code snippet will insert this context parameter into the footer?()
A.<a href=’mailto:${footerEmail}’>Contact me</a>
B.<a href=’mailto:${initParam@footerEmail}’>Contact me</a>
C.<a href=’mailto:${initParam.footerEmail}’>Contact me</a>
D.<a href=’mailto:${contextParam@footerEmail}’>Contact me</a>
E.<a href=’mailto:${contextParam.footerEmail}’>Contact me</a>
Given:
1.<% int[] nums = {42,420,4200};
2.request.setAttribute("foo", nums); %>
3.${5 + 3 lt 6}
4.${requestScope[’foo’][0] ne 10 div 0}
5. ${10 div 0}
What is the result?()
A.True true
B.False true
C.False true 0
D.True true Infinity
E.False true Infinity
A.${requestURI}
B.${request.URI}
C.${request.getURI}
D.${request.requestURI}
E.${requestScope.requestURI}
F.${pageContext.request.requestURI}
Given this fragment from a Java EE deployment descriptor:
124. <welcome-file>beta.html</welcome-file>
125. <welcome-file>alpha.html</welcome-file> And this request from a browser:http://www.sun.com/SCWCDtestApp/register
Which statement is correct,when the container receives this request?()
A.This deployment descriptor is NOT valid.
B.The container first looks in the register directory for beta.html.
C.The container first looks in the register directory for alpha.html.
D.The container first looks for a servlet mapping in the deployment descriptor.
最新試題
Which element of a web application deployment descriptor element is required?()
You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35.Which two EL code snippets will return true for this condition? ()
Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()
Click the ’Select and Place’ button.Place the events in the order they occur.
Which ensures that a JSP response is of type "text/plain"?()
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?()
Click the 'Select and Place' button.Place the events in the order they occur.
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 indicates a symbolic name of the next view. From this name, the FrontController servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or apath relative to the current request. Next, the Front Controller servlet must send the request to this JSP togenerate the view. Assume that the servlet variable request is assigned the current HttpServletRequestobject and the variable context is assigned the webapp’s ServletContext.Which code snippet of the FrontController servlet accomplishes this goal?()
A web application allows the HTML title banner to be set using a servlet context initialization parametercalled titleStr.Which two properly set the title in this scenario?()
Click the 'Select and Place' button.Place the events in the order they occur.