A.Tag
B.Page
C.Taglib
D.Include
E.Variable
您可能感興趣的試卷
你可能感興趣的試題
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 from doStartTag.
Assume the tag handler for a st:simple tag extends Simple Tag Support.
In what way can scriptlet code beused in the body of st:simple?()
A.Set the body content type to JSP in the TLD
B.Scriptlet code is NOT legal in the body of st:simple.
C.Add scripting-enabled="true" to the start tag for the st:simple element
D.Add a pass-through Classic tag with a body content type of JSP to the body of st:simple, and place the scriptlet code in the body of that tag
Given:
11.<% java.util.Map map = new java.util.HashMap();
12.request.setAttribute("map", map);
13.map.put("a", "b");
14.map.put("b", "c");
15.map.put("c", "d"); %>
16.<%-- insert code here --%>
Which three EL expressions, inserted at line 16, are valid and evaluate to "d"?()
A.${map.c}
B.${map[c]}
C.${map["c"]}
D.${map.map.b}
E.${map[map.b]}
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}
最新試題
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.
Click the ’Select and Place’ button.Place the events in the order they occur.
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 25 to properly invoke the next filter in the chain, or the target servlet if thereare no more filters?()
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?()
Given tutorial.jsp:2.EL Tutorial3.Example 14.5.Dear ${my:nickname(user)}6.Which, when added to the web application deployment descriptor,ensures that line 5 is included verbatimin the JSP output?()
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?()
Click the ’Select and Place’ button.Place the events in the order they occur.
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 in the ’d’ namespace: name: curDate; signature: java.util.DatecurrentDate() name: addWeek; signature: java.util.Date addWeek(java.util.Date, int) name: dateString;signature:java.util.String getDateString(java.util.Date)Which EL code snippet will generate the string for the previousweek?
Click the ’Select and Place’ button.Place the events in the order they occur.