A.JSP to Transfer Object
B.Service Locator to JNDI
C.Controller to request object
D.Transfer Object to Entity Bean
E.Controller to Business Delegate
您可能感興趣的試卷
你可能感興趣的試題
A developer is designing a web application that makes many fine-grained remote data requests for eachclient request. During testing, the developer discovers that the volume of remote requests significantlydegrades performance of the application.
Which design pattern provides a solution for this problem?()
A.Flyweight
B.Transfer Object
C.Service Locator
D.Dispatcher View
E.Business Delegate
F.Model-View-Controller
A.EL
B.JSP
C.Empty
D.Dynamic
E.Scriptless
F.Tagdependent
Given:
6.<myTag:foo bar=’42’>
7.<%="processing" %>
8.</myTag:foo> and a custom tag handler for foo which extends TagSupport.
Which two are true about thetag handler referenced by foo?()
A.The doStartTag method is called once.
B.The doAfterBody method is NOT called.
C.The EVAL_PAGE constant is a valid return value for the doEndTag method.
D.The SKIP_PAGE constant is a valid return value for the doStartTag method.
E.The EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.
Given:
5.public class MyTagHandler extends TagSupport {
6.public int doStartTag() throws JspException {
7.try {
8.// insert code here
9.} catch(Exception ex) { /* handle exception */ }
10.return super.doStartTag();
11.}...42. }
Which code snippet, inserted at line 8,causes the value foo to be output?()
A.JspWriter w = pageContext.getOut();
B.print("foo");
C.JspWriter w = pageContext.getWriter();
D.JspWriter w = new JspWriter(pageContext.getWriter()); . w.print("foo");
The h:highlight tag renders its body, highlighting an arbitrary number of words, each of which is passed asan attribute (word1, word2, ...). For example, a JSP page can invoke theh:highlight tag as follows: 11. 12. high medium low 13.
Given that HighlightTag extends SimpleTagSupport,which three steps are necessary to implement the taghandler for the highlight tag?()
A.Add a doTag method
B.Add a doStartTag method
C.Add a getter and setter for the color attribute
D.Create and implement a TagExtraInfo class
E.Implement the DynamicAttributes interface
F.Add a getter and setter for the word1 and word2 attributes
最新試題
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? ()
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.
A web browser need NOT always perform a complete request for a particular page that it suspects mightNOT have changed. The HTTP specification provides a mechanism for the browser to retrieve only a partialresponse from the web server; this response includes information, such as the Last-Modified date but NOTthe body of the page.Which HTTP method will the browser use to retrieve such a partial response?()
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?()
Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()
You need to create a JSP that generates some JavaScript code to populate an array of strings used on the client-side.Which JSP code snippet will create this array?()
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.
Which two are valid and equivalent?()