您现在的位置: 军旅同心-旅游自驾-军旅文学 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 正文
jsp在线考试系统-htm文件
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005-9-10 14:27:39
一个在线考试系统,测试你的jsp知识,代码不是特别多,所以不加注释了(http://jspbbs.yeah.net)

index.jsp

<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD VALIGN="TOP"><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<DIV ALIGN="RIGHT">
<FONT SIZE="-1"><A HREF="/developer/Quizzes/index.html">Quizzes
Index</A></FONT></DIV>
<H2 ALIGN="RIGHT"><FONT COLOR="#FFFFFFF">JSP Professional, Chapter 12
Quiz</FONT></H2>
<H4 ALIGN="RIGHT"><EM>by Dan Malks</EM></H4>

<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR><TD>
<IMG SRC="penduke.gif" WIDTH="164" HEIGHT="115" ALIGN=left ALT="Duke">
</TD><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
The <I><A
HREF="/developer/Books/jsp/index.html">JSP Professional: Chapter 12, JSP
Archictecture</A></I> Test your knowledge on the differences between servlets
and JSP, Factor Forward-Factor Back, page-centric verses the dispatcher
approach, and more.
</FONT></TD></TR>
</TABLE>

<HR>

<!-- Form calls the answer.jsp, which invokes the QuizResponses bean -->
<FORM METHOD="POST" ACTION="answer.jsp">

<OL>
<!-- Question 1 -->

<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">Choose the statement
that best describes the relationship between JavaServer
Pages<SUP><FONT SIZE="-2">TM</FONT></SUP> (JSP<SUP><FONT SIZE="-2">TM</FONT></SUP>)
and servlets: </FONT>
<BR>
<TABLE BORDER="0" CELLPADDING="5" CELLSPACING="0">
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="one"
TYPE="RADIO" VALUE="A"> &nbsp;A.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
Servlets are built on JSP semantics and all servlets are compiled to JSP
pages for runtime usage<BR></FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="one"
TYPE="RADIO" VALUE="B"> &nbsp;B.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"> JSP and servlets are
unrelated technologies</FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="one"
TYPE="RADIO" VALUE="C"> &nbsp;C.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif">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.
</FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="one"
TYPE="RADIO" VALUE="D"> &nbsp;D.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"> JSPs are built on
servlet semantics and all JSPs are compiled to servlets for runtime usage
</FONT></TD></TR>
</TABLE>

<P>
<!-- Question 2 -->
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">What is a benefit of
using JavaBeans<SUP><FONT SIZE="-2">TM</FONT></SUP> to separate business logic
from presentation markup within the JSP environment? </FONT>
<BR>
<TABLE BORDER="0" CELLPADDING="5" CELLSPACING="0">
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="two"
TYPE="RADIO" VALUE="A"> &nbsp;A.</FONT></TD>
<TD>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif"> It allows the JSP to
access middleware </FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="two"
TYPE="RADIO" VALUE="B"> &nbsp;B.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif">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 </FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="two"
TYPE="RADIO" VALUE="C"> &nbsp;C.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif">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
</FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="two"
TYPE="RADIO" VALUE="D"> &nbsp;D.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif">It provides the
developer with full access to the Java<SUP><FONT SIZE="-2">TM</FONT></SUP> 2
Platform Enterprise Edition (J2EE<SUP><FONT SIZE="-2">TM</FONT></SUP>),
which is unavailable from outside the JavaBean environment </FONT></TD></TR>
</TABLE>
<P>
<!-- Question 3 -->

<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">Why use the
<CODE>RequestDispatcher</CODE> to forward a request to another resource,
instead of doing a <CODE>sendRedirect</CODE>? </FONT>
<BR>
<TABLE BORDER="0" CELLPADDING="5" CELLSPACING="0">
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="three"
TYPE="RADIO" VALUE="A"> &nbsp;A.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"> Redirects are no
longer supported in the current servlet API</FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="three"
TYPE="RADIO" VALUE="B"> &nbsp;B.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"> Redirects are not a
cross-platform portable mechanism</FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="three"
TYPE="RADIO" VALUE="C"> &nbsp;C.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"> The <CODE>RequestDispatcher</CODE>
does not use the reflection API</FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="three"
TYPE="RADIO" VALUE="D"> &nbsp;D.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"> The
<CODE>RequestDispatcher</CODE> does not require a round trip to the client, and
thus is more efficient and allows the server to maintain request
state</FONT></TD></TR>
</TABLE>

<P>
<!-- Question 4 -->

<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">What alternatives exist
to embedding Java code directly within the HTML markup of your JSP page?</FONT>
<BR>
<TABLE BORDER="0" CELLPADDING="5" CELLSPACING="0">
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="four"
TYPE="RADIO" VALUE="A"> &nbsp;A.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"> Moving the code into
your session manager</FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="four"
TYPE="RADIO" VALUE="B"> &nbsp;B.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"> Moving the code into
sciptlets</FONT></TD></TR>
<TR><TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT NAME="four"
TYPE="RADIO" VALUE="C"> &nbsp;C.</FONT></TD>
<TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif"> Moving the code into
JavaBeans and servlets</FONT>

[1] [2] [3] 下一页


更多
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 网站地图 | 版权申明 | 网站公告 | 管理登录 |