jsp在线考试系统-jsp文件_MySQL
answer.jsp
JSP Professional, Chapter 12 Quiz
|
1. |
, leaving HTML to be easily --%> D |
is correct! is incorrect! Blank X
|
|
Every JavaServer PagesTM (JSP)TMsource page is compiled into a servlet before it is executed at runtime. 2. |
B |
is correct! incorrect Blank X
|
When large amounts of Java scriptlet code are mixed with HTML markup within a JSP page, not only do readability and reuse suffer, but often bugs are introduced as web-production team members, who may not be familiar with Java programming, need to modify the accompanying markup. Additionally, dependencies now exist among various teams competing for the same file, making the development process less efficient. 3. |
D |
is correct! incorrect Blank X |
Doing an HTTP redirect requires a round-trip to the client. If this is not required, and the only desire is to forward the request to another resource, then this can be much more efficiently accomplished with the RequestDispatcher . Additionally, when using the dispatcher the state of the request object is maintained between resources, which will not be the case with the HTTP redirect. 4. |
C |
is correct! incorrect Blank X
|
Business logic is better contained in a JavaBeanTM or a servlet, which is owned by a software developer. When lots of Java code is embedded directly within the JSP page as scriptlets, the "cut-and-paste" mentality tends to prevail when it comes to code reuse. 5. |
|
A is correct! incorrect Blank X
|
Since the servlet is the initial contact point for each request, it is well-suited to handle logic that is common across multiple requests. A good example of this type of logic is an authentication check. 6. |
|
B is correct! incorrect Blank X
|
Using a business delegate reduces coupling between the presentation and business tiers. The presentation tier has no knowledge of the EJB implementation details, such as Java Naming and Directory InterfaceTM lookup. 7. |
|
B is correct! incorrect Blank X |
Using Java scriptlets is the accepted method of doing iteration in JSPTM 1.0. In JSPTM 1.1, a custom tag may be used, which will hide the implementation details of the iteration code. 8. |
|
A is correct! incorrect Blank |
X
|
The term Page-Centric is used to describe an architecture where the initial contact point for the request is a JSP page. An example is shown visually below: 9. |
|
A is correct! incorrect Blank X
|
When the forward method is used, the invoking resource does not regain control. Multiple include invocations can be made from the same resource, while the invoking resource maintains execution control. 10. |
D is correct! |
incorrect Blank X Error pages are invoked when there is an uncaught exception from within a particular page. In this case, we mention that the validationGaurd() method might throw an exception. If this exception is not caught within the page, then we vector control to the errorPage , as stipulated in the attribute of the given page directive. int missed = 10 - score; double grade = (double)score/10*100; %> | You missed Source CodeThis quiz used the Page-View with Bean Approach, detailed in HREF="/developer/Books/javaserverpages/">Chapter 12, JSP Archeticure. The first |
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。
相关文章
相关视频
专题推荐
-
独孤九贱-php全栈开发教程
全栈 170W+
主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门
-
玉女心经-web前端开发教程
入门 80W+
主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门
-
天龙八部-实战开发教程
实战 120W+
主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习
推荐阅读
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论