A.Tag B.Page C.Taglib D.Include E.Variable
单项选择题You are creating a library of custom tags that mimic the HTML form tags. When the user submits a formthat fails validation, the JSP form is forwarded back to the user. The<t:textField> tag must support the ability to re-populate the form field with the request parameters from theuser’s last request. For example, if the user entered Samantha in the text field called firstName, then theform is re-populated like this: <input type=’text’ name=’firstName’ value=’Samantha’ > Which tag handler method will accomplish thisgoal?()
A. B. C. D.
单项选择题WhichstatementistrueifthedoStartTagmethodreturnsEVAL_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 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}