jsp题库(整理) 2026/4/24 16:19:05 C80.Login.jsp为登录页面,表单代码如下: Index.jsp中直接显示用户名,以下哪种代码正确()。(只选一项) a) ${requestScope.name} b) <%=name%> c) ${param.name} d) <%=param.name%> A81.在J2EE中,若要在JSP正确使用标签:,在jsp中声明的taglib指令为:<%@taglib uri = ―/WEB-INF/myTags.tld‖ prefix = ―_____‖>,下划线处应该是()。(选择一项) a) x b) getKing c) myTags d) king A82.JSP EL 表达式:${user.loginName}执行效果等同于( )。(选择一项) a) <% = user.getLoginName()%> b) <%user.getLoginName();%> c) <% = user.loginName%> d) <% user.loginName;%> AB83.在 J2EE中,使用 Servlet 过滤器,需要在 web.xml中配置()元素 a) b) c) d) A84.在J2EE中,标签库中文件(*.tld)存放在()目录下。 a) WEB—INF b) WEB—INF/tags c) WEB—INF/classes d) WEB—INF/lib A85.某JSP中有如下代码: <% pageContext .setAttribute(―a‖,‖page‖); request.setAttribute(―a‖,‖request‖); session.setAttribute(―a‖,‖session‖); application.setAttribute(―a‖,‖application‖); %> 结果:${a} 则显示结果为: a) page b) request c) session d) application D86.核心标签库中,用来实现循环功能的标签是() a) b) c) d) A87.以下代码执行效果为:() a) 1 2 3 4 5 b) i i i i i c) 15 d) 代码有错,无法显示 B88.某JSP中有如下代码,显示结果为() <% int a = 5; request.setAttribute(―a‖,‖123‖); session.setAttribute(―a‖,‖456‖); %> a) 5 b) 123 c) 456 d) null D89.以下哪个参数不属于标签: a) var b) begin c) end d) delims A90.以下哪个方法不是TagSupport类的方法:() a) doPost() b) doStartTag() c) doEndTag() d) doAfterBody() B91.在自定义标签中,HelloTag继承自TagSupport类,其中有如下代码: out.println(―HELLO‖); 该out对象声明方法为:() a) PrintWriter out = response.getOut(); b) JspWriter out = pageContext.getOut(); c) JspWriter out = pageContext.getWriter(); d) PrintWriter out = response.getWriter(); A92.自定义标签中,如果要声明标签参数为必须的,则需要进行哪种配置:() a) true b) true c) false d) false C93.如下代码,执行效果为() C94.以下哪个标签实现了switch功能 a) b) c) 与 d) B95.EL表达式,${10 mod 3},执行结果为: a) 10 mod 3 b) 1 c) 3 d) null B96.Jsp中有如下代码: <% Cookie c = new Cookie(―name‖ , ―admin‖); c.setMaxAge(10000); response.addCookie(c); %> ———————— 在横线处,以下哪句代码可以正确显示‖admin‖() a) ${cookie.name} b) ${cookie.name.value} c) ${ name} d) ${name.value} D97.以下代码执行效果为:() <% session.setAttribute(\%> a) a b) svse c) 2>1 d) Null B98.以下代码执行效果为(): a) b) c) d) 1 2 3 4 5 1 3 5 i i i 15 var = \ D99.以下哪句代码可以正确导入核心标签库:() a) <% page import = ―c‖%> b) <% page prefix = ―c‖ uri = ―/WEB-INF/c.tld‖%> c) <% taglib prefix = ―c‖ import = ―/WEB-INF/c.tld‖ %> d) <% taglib prefix = ―c‖ uri = ―/WEB-INF/c.tld‖%> C100.在WEB应用程序的目录结构中,在WEB-INF文件夹中的lib目录是放()文件的(只选一项) A..jsp文件 B..class文件 C..jar文件 D.web.xml文件 11 JSP在Web服务器上的运行结果:(A) A.可以在Web浏览器看到。 B. 只能在Web浏览器看到。 12 在JSP中使用A.不发生变化。 B.发生变化。 1234567 jsp题库(整理).doc 将本文的Word文档下载到电脑 下载这篇word文档