單項選擇題

You are building a dating web site. The client’s date of birth is collected along with lots of other information.You have created an EL function with the signature:
calcAge(java.util.Date):int and it is assigned to the name, age, in the namespace, funct. In one of your JSPsyou need to print a special message to clients who are younger than 25. 
Which EL code snippet will returntrue for this condition?()

A.${calcAge(client.birthDate) < 25}
B.${calcAge[client.birthDate] < 25}
C.${funct:age(client.birthDate) < 25}
D.${funct:age[client.birthDate] < 25}
E.${funct:calcAge(client.birthDate) < 25}


您可能感興趣的試卷

你可能感興趣的試題

3.多項選擇題

Given:
6.<% int[] nums = {42, 420, 4200};
7.request.setAttribute("foo", nums); %>
Which two successfully translate and result in a value of true?()

A.${true or false}
B.${requestScope[foo][0] > 500}
C.${requestScope[’foo’][1] = 420}
D.${(requestScope[’foo’][0] lt 50) && (3 gt 2)}

4.單項選擇題

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.getSession(false) == null ) {// special processing} %>
B.<% if ( request.getHttpSession(false) == null ) {// special processing} %>
C.<% if ( requestObject.getSession(false) == null ) { // special processing} %>
D.<% if ( requestObject.getHttpSession(false) == null ) { // special processing} %>

5.單項選擇題

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[<%= i %>] = ’<%= serverArray[i] %>’;} %>
B.MY_ARRAY = new Array();. <% for ( int i = 0; i < serverArray.length; i++ ) { . MY_ARRAY[${i}] = ’${serverArray[i]}’;. } %>
C.MY_ARRAY = new Array();. <% for ( int i = 0; i < serverArray.length; i++ ) { %> . MY_ARRAY[<%= i %>] = ’<%= serverArray[i] %>’;. <% } %>
D.MY_ARRAY = new Array();<% for ( int i = 0; i < serverArray.length; i++ ) { %> . MY_ARRAY[${i}] = ’${serverArray[i]}’;. <% } %>

最新試題

Click the 'Select and Place' button.Place the events in the order they occur.

題型:問答題

Which is true about the web container request processing model?()

題型:單項選擇題

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.<input type=’radio’ name=’hobbyEnum’ value=’HIKING’>Hiking <br>21.<input type=’radio’ name=’hobbyEnum’ value=’SKIING’>Skiing <br>22.<input type=’radio’ name=’hobbyEnum’ value=’SCUBA’>SCUBA Diving23.<!-- and more options -->After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume thatan application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the displayname.Which EL code snippet will display Nth element of the user’s selected hobbies?()

題型:單項選擇題

Click the ’Select and Place’ button.Place the events in the order they occur.

題型:問答題

Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()

題型:單項選擇題

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?()

題型:單項選擇題

In which three directories, relative to a web application’s root, may a tag library descriptor file reside whendeployed directly into a web application?()

題型:多項選擇題

Click the ’Select and Place’ button.Place the events in the order they occur.

題型:問答題

Click the 'Select and Place' button.Place the events in the order they occur.

題型:問答題

All of your JSPs need to have a link that permits users to email the web master. This web application islicensed to many small businesses, each of which have a different email address for the web master. Youhave decided to use a context parameter that you specify in the deployment descriptor, like this:42.<context-param>43.<param-name>webmasterEmail</param-name>44.<param-value>master@example.com</param-value>45.</context-param>Which JSP code snippet creates this email link?()

題型:單項選擇題