热门标签 | HotTags
当前位置:  开发笔记 > 前端 > 正文

jsp在线考试系统-htm文件_MySQL

一个在线考试系统,测试你的jsp知识,代码不是特别多,所以不加注释了(jspbbs.yeah.net)index.jspTABLEBORDER0CELLPADDING0CELLSPACING0TRTDVALIGNTOPFONTFACEVerdana,Arial,Helvetica,sans-serifDIVALIGNRIGHTFONTSIZE-1AHREFdevelo
  一个在线考试系统,测试你的jsp知识,代码不是特别多,所以不加注释了(http://jspbbs.yeah.net)

index.jsp







JSP Professional, Chapter 12
Quiz


by Dan Malks






Duke

The HREF="/developer/Books/jsp/index.html">JSP Professional: Chapter 12, JSP
Archictecture
Test your knowledge on the differences between servlets
and JSP, Factor Forward-Factor Back, page-centric verses the dispatcher
approach, and more.











  1. Choose the statement
    that best describes the relationship between JavaServer
    PagesTM (JSPTM)
    and servlets:












    TYPE="RADIO" VALUE="A">  A.
    Servlets are built on JSP semantics and all servlets are compiled to JSP
    pages for runtime usage
    TYPE="RADIO" VALUE="B">  B. JSP and servlets are
    unrelated technologies
    TYPE="RADIO" VALUE="C">  C.Servlets and JSP are
    competing technologies for handling web requests. Servlets are being superceded
    by JSP, which is preferred. The two technologies are not useful in combination.
    TYPE="RADIO" VALUE="D">  D. JSPs are built on
    servlet semantics and all JSPs are compiled to servlets for runtime usage




  2. What is a benefit of
    using JavaBeansTM to separate business logic
    from presentation markup within the JSP environment?












    TYPE="RADIO" VALUE="A">  A.
    It allows the JSP to
    access middleware
    TYPE="RADIO" VALUE="B">  B.It creates a cleaner
    role separation between the web-production team and the software development
    team, so that the web-production team can focus on presentation markup, while
    the software team can focus on building reusable software components for helping
    to generate dynamic displays
    TYPE="RADIO" VALUE="C">  C.It provides a dynamic
    markup environment, such that JavaBeans are integrated seamlessly with the
    template presentation content, in order to create the dynamic display for the
    client
    TYPE="RADIO" VALUE="D">  D.It provides the
    developer with full access to the JavaTM 2
    Platform Enterprise Edition (J2EETM),
    which is unavailable from outside the JavaBean environment




  3. Why use the
    RequestDispatcher to forward a request to another resource,
    instead of doing a sendRedirect?












    TYPE="RADIO" VALUE="A">  A. Redirects are no
    longer supported in the current servlet API
    TYPE="RADIO" VALUE="B">  B. Redirects are not a
    cross-platform portable mechanism
    TYPE="RADIO" VALUE="C">  C. The RequestDispatcher
    does not use the reflection API
    TYPE="RADIO" VALUE="D">  D. The
    RequestDispatcher does not require a round trip to the client, and
    thus is more efficient and allows the server to maintain request
    state





  4. What alternatives exist
    to embedding Java code directly within the HTML markup of your JSP page?












    TYPE="RADIO" VALUE="A">  A. Moving the code into
    your session manager
    TYPE="RADIO" VALUE="B">  B. Moving the code into
    sciptlets
    TYPE="RADIO" VALUE="C">  C. Moving the code into
    JavaBeans and servlets
    TYPE="RADIO" VALUE="D">  D. Moving the code into a
    transaction manager




  5. What type of scriptlet
    code is better-suited to being factored forward into a servlet?












    TYPE="RADIO" VALUE="A">  A.Code that deals
    with logic that is common across requests
    TYPE="RADIO" VALUE="B">  B.Code that deals
    with logic that is vendor specific
    TYPE="RADIO" VALUE="C">  C.Code that deals
    with logic that relates to database access
    TYPE="RADIO" VALUE="D">  D.Code that deals
    with logic that relates to client scope





  6. Choose the statement that
    best describes how to connect JSP pages and EJBs












    TYPE="RADIO" VALUE="A">  A.Lookup the EJBs from
    within a JSP, but use the EJBs from within a basic JavaBean
    TYPE="RADIO" VALUE="B">  B.Lookup and use the EJBs
    from a separate business delegate. The JavaBeans that work with JSP pages are
    clients to these business delegates and know nothing about EJB
    specifics
    TYPE="RADIO" VALUE="C">  C. Lookup and use the
    EJBs from within a JSP page, but only as remote references
    TYPE="RADIO" VALUE="D">  D.Lookup the EJBs from
    within a servlet, delegating usage to specific JSP pages





  7. Are custom tags
    available in JSP 1.0? If not, how else might you implement iteration from
    within a JSP?












    TYPE="RADIO" VALUE="A">  A. Yes, but the only tags
    available relate to database access
    TYPE="RADIO" VALUE="B">  B. No. To iterate over a
    collection of values, one must use scriptlet code
    TYPE="RADIO" VALUE="C">  C. No, but there is a
    standard tag that may be used
    TYPE="RADIO" VALUE="D">  D. Yes, but custom tags
    will not help developers create tags for use in iterating over a
    collection





  8. What is the initial
    contact point for handling a web request in a Page-Centric architecture?












    TYPE="RADIO" VALUE= "A">  A. A JSP
    page
    TYPE="RADIO" VALUE= "B">  B. A
    JavaBean
    TYPE="RADIO" VALUE= "C">  C. A
    servlet
    TYPE="RADIO" VALUE= "D">  D. A session
    manager





  9. What is the difference
    between doing an include or a forward with a
    RequestDispatcher?












    TYPE="RADIO" VALUE="A">  A. The forward method
    transfers control to the designated resource, while the include method invokes
    the designated resource, substitutes its output dynamically in the display, and
    returns control to the calling page.
    TYPE="RADIO" VALUE="B">  B. The two methods
    provide the same functionality, but with different levels of
    persistence
    TYPE="RADIO" VALUE="C">  C. The forward method is
    deprecated as of JSP 1.1 and the include method should be used in order to
    substitue portions of a dynamic display at runtime
    TYPE="RADIO" VALUE="D">  D. The include method
    transfers control to a dynamic resource, while the forward method allows for
    dynamic substitution of another JPS pages output, returning control to the
    calling resource




  10. What line of code below
    might be combined in the same JSP page with a validation guard (for
    example, <% bean.validationGuard(); %> ), in order to create
    an alternate flow of control for scenarios in which exceptions arise. The
    validationGaurd method might throw an exception, which should cause
    the flow of control to continue in another user-defined page (assume JSP
    1.0)












    TYPE="RADIO" VALUE="A">  A. page="errorPage.jsp" guard="true" />
    TYPE="RADIO" VALUE="B">  B. <%@ page
    language="java" buffer="8k" %>

    TYPE="RADIO" VALUE="C">  C. id="bean" class="examples.Bean" scope="request" />
    TYPE="RADIO" VALUE="D">  D. <%@ page
    language="java" errorPage="errorPage.jsp" buffer="8k"
    %>















推荐阅读
  • Monkey《大话移动——Android与iOS应用测试指南》的预购信息发布啦!
    Monkey《大话移动——Android与iOS应用测试指南》的预购信息已经发布,可以在京东和当当网进行预购。感谢几位大牛给出的书评,并呼吁大家的支持。明天京东的链接也将发布。 ... [详细]
  • 基于layUI的图片上传前预览功能的2种实现方式
    本文介绍了基于layUI的图片上传前预览功能的两种实现方式:一种是使用blob+FileReader,另一种是使用layUI自带的参数。通过选择文件后点击文件名,在页面中间弹窗内预览图片。其中,layUI自带的参数实现了图片预览功能。该功能依赖于layUI的上传模块,并使用了blob和FileReader来读取本地文件并获取图像的base64编码。点击文件名时会执行See()函数。摘要长度为169字。 ... [详细]
  • HDU 2372 El Dorado(DP)的最长上升子序列长度求解方法
    本文介绍了解决HDU 2372 El Dorado问题的一种动态规划方法,通过循环k的方式求解最长上升子序列的长度。具体实现过程包括初始化dp数组、读取数列、计算最长上升子序列长度等步骤。 ... [详细]
  • 本文讨论了Alink回归预测的不完善问题,指出目前主要针对Python做案例,对其他语言支持不足。同时介绍了pom.xml文件的基本结构和使用方法,以及Maven的相关知识。最后,对Alink回归预测的未来发展提出了期待。 ... [详细]
  • 本文讨论了如何优化解决hdu 1003 java题目的动态规划方法,通过分析加法规则和最大和的性质,提出了一种优化的思路。具体方法是,当从1加到n为负时,即sum(1,n)sum(n,s),可以继续加法计算。同时,还考虑了两种特殊情况:都是负数的情况和有0的情况。最后,通过使用Scanner类来获取输入数据。 ... [详细]
  • 本文介绍了九度OnlineJudge中的1002题目“Grading”的解决方法。该题目要求设计一个公平的评分过程,将每个考题分配给3个独立的专家,如果他们的评分不一致,则需要请一位裁判做出最终决定。文章详细描述了评分规则,并给出了解决该问题的程序。 ... [详细]
  • 本文介绍了OC学习笔记中的@property和@synthesize,包括属性的定义和合成的使用方法。通过示例代码详细讲解了@property和@synthesize的作用和用法。 ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • Mac OS 升级到11.2.2 Eclipse打不开了,报错Failed to create the Java Virtual Machine
    本文介绍了在Mac OS升级到11.2.2版本后,使用Eclipse打开时出现报错Failed to create the Java Virtual Machine的问题,并提供了解决方法。 ... [详细]
  • 本文讲述了作者通过点火测试男友的性格和承受能力,以考验婚姻问题。作者故意不安慰男友并再次点火,观察他的反应。这个行为是善意的玩人,旨在了解男友的性格和避免婚姻问题。 ... [详细]
  • 本文介绍了P1651题目的描述和要求,以及计算能搭建的塔的最大高度的方法。通过动态规划和状压技术,将问题转化为求解差值的问题,并定义了相应的状态。最终得出了计算最大高度的解法。 ... [详细]
  • 本文介绍了如何找到并终止在8080端口上运行的进程的方法,通过使用终端命令lsof -i :8080可以获取在该端口上运行的所有进程的输出,并使用kill命令终止指定进程的运行。 ... [详细]
  • 本文介绍了C++中省略号类型和参数个数不确定函数参数的使用方法,并提供了一个范例。通过宏定义的方式,可以方便地处理不定参数的情况。文章中给出了具体的代码实现,并对代码进行了解释和说明。这对于需要处理不定参数的情况的程序员来说,是一个很有用的参考资料。 ... [详细]
  • 本文讨论了使用差分约束系统求解House Man跳跃问题的思路与方法。给定一组不同高度,要求从最低点跳跃到最高点,每次跳跃的距离不超过D,并且不能改变给定的顺序。通过建立差分约束系统,将问题转化为图的建立和查询距离的问题。文章详细介绍了建立约束条件的方法,并使用SPFA算法判环并输出结果。同时还讨论了建边方向和跳跃顺序的关系。 ... [详细]
  • 本文介绍了MyBioSource转甲状腺素蛋白定量检测ELISA试剂盒的应用方法及特点。ELISA法作为一项新技术在免疫诊断中的应用范围不断扩大,不仅适用于多种病原微生物引起的传染病、非传染病的免疫诊断,也可用于大/小分子抗原的定量检测。ELISA法具有灵敏、特异、简单、快速、稳定及易于自动化操作等特点,是一种早期诊断的良好方法,也可用于血清流行病学调查。MyBioSource转甲状腺素蛋白定量检测ELISA试剂盒使用方法包括对血清和血浆的操作要求。 ... [详细]
author-avatar
ZZ张朝_288
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有