网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

给定一个JSP程序源代码,如下: <jsp:forward page="result.jsp"> <jsp:param name="school" value="FAFU"/> </jsp:forward > 在result.jsp中,使用()代码片段可以输出参数school的值

A.<jsp:getParam name="school">

B.<jsp:getParameter name="school">

C.<%=request.getAttribute("school")%>

D.<%=request.getParameter("school")%>


参考答案和解析
D
更多 “给定一个JSP程序源代码,如下: <jsp:forward page="result.jsp"> <jsp:param name="school" value="FAFU"/> </jsp:forward > 在result.jsp中,使用()代码片段可以输出参数school的值A.<jsp:getParam name="school">B.<jsp:getParameter name="school">C.<%=request.getAttribute("school")%>D.<%=request.getParameter("school")%>” 相关考题
考题 在J2EE中,对于标记,描述正确的是()。 A.jsp:param是jsp:include、jsp:forward标记的子标记B.如果aa.jsp有代码:jsp:forwardpage=next.jspjsp:paramname=namevalue=jb-aptech//jsp:forward,则在next.jsp中可以使用request.getParameter(name);把属性name的值取出来C.如果aa.jsp有代码:jsp:forwardpage=next.jspjsp:paramname=namevalue=jb-aptech//jsp:forward,则在next.jsp中可以使用request.getAttribute(name);把属性name的值取出来D.如果jsp:param标记不放在jsp:forward标记内,也就是不作为jsp:forward标记的子标记,则使用浏览器查看时会显示错误页面

考题 在J2EE中,在aa.jsp中有行代码:%request.setAttribute(Co.,jb-aptech%request.setAttribute(Co.,jb-aptech);%在bb.jsp中有行代码:%out.println((String)request.getAttribute(Co.));%为了使得在bb.jsp中的如上代码可以显示jb-aptech”,可以使用()方法。A.在aa.jsp中使用formmethod=postaction=bb.jsp把请求提交到bb.jspB.在aa.jsp中使用jsp:forwardfile=bb.jsp/把页面重定向到bb.jspC.在aa.jsp中使用%response.sendRedirect(bb.jsp);%把页面重定向到bb.jspD.在aa.jsp中使用%@includefile=bb.jsp%包含页面bb.jspE.在aa.jsp中使用%config.getServletContext().getRequestDispatcher(/bb.jsp).forward(request,response);%把页面重定向到bb.jsp

考题 下列选项中能在JSP页面中实现转向的是() A.Response.forward(“/index.jsp”)B.Response.sendRedirect(“/index.jsp”)C.request.forward(“/index.jsp”)D.request.sendRedirect(“/index.jsp”)

考题 param标记不能独立使用,需作为jsp:include、jsp:forward等标记的子标记来使用。() 此题为判断题(对,错)。

考题 下面哪些jspaction中允许使用表达式(expression)?() A、jsp:setPropertyname=”name”value=%=expression%B、jsp:includepage=%=expresion%C、jsp:paranname=”name”value=%=expression%D、jsp:getPropertyname=%expression%

考题 在JSP页面中,正确引入JavaBean的是()  A、%jsp: useBean id =”myBean” scope =”page” class=”pkg.MyBean” %  B、jsp: useBean name=”myBean” scope =”page” class=”pkg.MyBean”   C、jsp: useBean id =”myBean” scope =”page” class=”pkg.MyBean” / D、jsp: useBean name=”myBean” scope =”page” class=”pkg.MyBean” /

考题 在J2EE中,在aa.jsp中有行代码:  %%  request.setAttribute("Co.","jb-aptech");  %  在bb.jsp中有行代码: %  out.println((String)request.getAttribute("Co."));  %    %   为了使得在bb.jsp中的如上代码可以显示“jb-aptech”,可以使用()方法。A、在aa.jsp中使用form method=post action="bb.jsp"把请求提交到bb.jsp B、在aa.jsp中使用jsp:forward file="bb.jsp" /把页面重定向到bb.jsp  C、在aa.jsp中使用%  response.sendRedirect("bb.jsp");  %把页面重定向到bb.jsp D、在aa.jsp中使用%@ include file="bb.jsp" %包含页面bb.jsp  E、在aa.jsp中使用% config.getServletContext().getRequestDispatcher("/bb.jsp").forward(request,response); %把页面重定向到bb.jsp

考题 在J2EE中,对于标记,描述正确的是()。     A、jsp:param是jsp:include、jsp:forward标记的子标记  B、如果aa.jsp有代码:jsp:forward page="next.jsp"jsp:param name="name" value="jb-aptech" //jsp:forward,则在next.jsp中可以使用request.getParameter("name");把属性name的值取出来 C、如果aa.jsp有代码:jsp:forward page="next.jsp"jsp:param name="name" value="jb-aptech" //jsp:forward,则在next.jsp中可以使用request.getAttribute("name");把属性name的值取出来 D、如果jsp:param标记不放在jsp:forward标记内,也就是不作为jsp:forward标记的子标记,则使用浏览器查看时会显示错误页面

考题 在J2EE中,关于JSP文件中的page指令在JSP文件中出现的位置和次数,正确的是()。 A、page指令可以在JSP中的任何地方,以任何顺序出现B、一个JSP文件可以有任意多个page指令C、一个JSP文件只能有一个page指令D、在整个JSP文件中,虽然可以有多个page指令,但是任何属性/值对只能出现一次

考题 下面哪个方法不属于JSP指令:()A、jsp:param name=”username” value=”liu”/B、%@include file=”head.jsp”%C、%@taglib uri=”/struts.tags” prefix=”s”%D、%@page contectType=”texthtml,charset=gb2312”%

考题 在JSP中需要将1.jsp的请求数据通过2.jsp转发给3.jsp,应该在2.jsp中采用()方式实现。A、〈%request.sendRedirect(“3.jsp”)%〉B、〈%response.sendRedirect(“3.jsp”)%〉C、〈%request.getRequestDispatcher(“3.jsp”).forward(request,response)%〉D、〈%response.sentRedirect(“32.jsp”).forward(request,response)%〉

考题 JSP标准动作不包括()。 A、jsp:forward / B、jsp:forEach / C、jsp:useBean / D、jsp:setProperry / 

考题 下面语句中,正确的是()A、public.class.AddAction.implements.Action{...extends.ActionB、mapping.findForward("/ch01/result.jsp");findForward(“name”),new.ActionForward(“/ch01/result.jsp”)C、form.method="get"action="add.do"D、action.name="addAction"path="/add"type="y2ssh.sg.web.action.AddAction"Name指form的名字

考题 用于获取bean属性的动作是()。A、〈jsp:uscBean〉B、〈jsp:getProperty〉C、〈jsp:setProperty〉D、〈jsp:forward〉

考题 jsp:param动作标记不能单独使用,必须作为jsp:include、jsp:forward标记等的子标记使用,并为它们提供参数。

考题 阅读下面代码片段: RequestDispatcher dispatcher=request.getRequestDispatcher("a.jsp"); dispatcher.forward(request,response); 关于该段代码的作用,下列叙述哪项是正确的?()A、页面重定向到a.jsp页面B、将请求转发到a.jsp页面C、从a.jsp定向到当前页面D、从a.jsp转发到当前页面

考题 在以下组件中,哪些组件与JavaBean有关?()A、〈jsp:param〉B、〈jsp:setProperty〉C、〈jsp:getProperty〉D、〈jsp:forward〉

考题 You are building your own layout mechanism by including dynamic content for the page’s header and footersections. The footer is always static, but the header generates the  tag that requires the page name tobe specified dynamically when the header is imported. Which JSP code snippet performs the import of theheader content?() titleA、jsp:include page=’/WEB-INF/jsp/header.jsp’jsp:param name=’pageName’ value=’Welcome Page’ / /jsp:includeB、jsp:import page=’/WEB-INF/jsp/header.jsp’jsp:param name=’pageName’ value=’Welcome Page’ / /jsp:importC、jsp:include page=’/WEB-INF/jsp/header.jsp’jsp:attribute name=’pageName’ value=’Welcome Page’ / . /jsp:includeD、jsp:import page=’/WEB-INF/jsp/header.jsp’. jsp:attribute name=’pageName’ value=’Welcome Page’ / . /jsp:import

考题 多选题在J2EE中,对于标记,描述正确的是()。Ajsp:param是jsp:include、jsp:forward标记的子标记B如果aa.jsp有代码:jsp:forward page=next.jspjsp:param name=name value=jb-aptech //jsp:forward,则在next.jsp中可以使用request.getParameter(name);把属性name的值取出来C如果aa.jsp有代码:jsp:forward page=next.jspjsp:param name=name value=jb-aptech //jsp:forward,则在next.jsp中可以使用request.getAttribute(name);把属性name的值取出来D如果jsp:param标记不放在jsp:forward标记内,也就是不作为jsp:forward标记的子标记,则使用浏览器查看时会显示错误页面

考题 单选题下列选项中能在JSP页面中实现转向的是()A  Response.forward(“/index.jsp”)B  Response.sendRedirect(“/index.jsp”)C  request.forward(“/index.jsp”)D  request. sendRedirect (“/index.jsp”)

考题 单选题在JSP中需要将1.jsp的请求数据通过2.jsp转发给3.jsp,应该在2.jsp中采用()方式实现。A 〈%request.sendRedirect(“3.jsp”)%〉B 〈%response.sendRedirect(“3.jsp”)%〉C 〈%request.getRequestDispatcher(“3.jsp”).forward(request,response)%〉D 〈%response.sentRedirect(“32.jsp”).forward(request,response)%〉

考题 判断题jsp:param动作标记不能单独使用,必须作为jsp:include、jsp:forward标记等的子标记使用,并为它们提供参数。A 对B 错

考题 单选题You are building your own layout mechanism by including dynamic content for the page’s header and footersections. The footer is always static, but the header generates the  tag that requires the page name tobe specified dynamically when the header is imported. Which JSP code snippet performs the import of theheader content?()A jsp:include page=’/WEB-INF/jsp/header.jsp’jsp:param name=’pageName’ value=’Welcome Page’ / /jsp:includeB jsp:import page=’/WEB-INF/jsp/header.jsp’jsp:param name=’pageName’ value=’Welcome Page’ / /jsp:importC jsp:include page=’/WEB-INF/jsp/header.jsp’jsp:attribute name=’pageName’ value=’Welcome Page’ / . /jsp:includeD jsp:import page=’/WEB-INF/jsp/header.jsp’. jsp:attribute name=’pageName’ value=’Welcome Page’ / . /jsp:import

考题 多选题在以下组件中,哪些组件与JavaBean有关?()A〈jsp:param〉B〈jsp:setProperty〉C〈jsp:getProperty〉D〈jsp:forward〉

考题 多选题在J2EE中,在aa.jsp中有行代码:   在bb.jsp中有行代码:        为了使得在bb.jsp中的如上代码可以显示“jb-aptech”,可以使用()方法。A在aa.jsp中使用form method=post action=bb.jsp把请求提交到bb.jspB在aa.jsp中使用jsp:forward file=bb.jsp /把页面重定向到bb.jspC在aa.jsp中使用%  response.sendRedirect(bb.jsp);  %把页面重定向到bb.jspD在aa.jsp中使用%@ include file=bb.jsp %包含页面bb.jspE在aa.jsp中使用% config.getServletContext().getRequestDispatcher(/bb.jsp).forward(request,response); %把页面重定向到bb.jsp

考题 单选题用于获取bean属性的动作是()。A 〈jsp:uscBean〉B 〈jsp:getProperty〉C 〈jsp:setProperty〉D 〈jsp:forward〉

考题 单选题Your web application views all have the same header, which includes the  tag in the  elementof the rendered HTML. You have decided to remove this redundant HTML code from your JSPs and put itinto a single JSP called /WEB-INF/jsp/header.jsp. However, the title of each page is unique, so you havedecided to use a variable called pageTitle to parameterize this in the header JSP, like this: 10.${param.pageTitle} Which JSP code snippet should you use in your main view JSPs to insert the header and pass thepageTitle variable?()A jsp:insert page=’/WEB-INF/jsp/header.jsp’. ${pageTitle=’Welcome Page’}. /jsp:insertB jsp:include page=’/WEB-INF/jsp/header.jsp’. ${pageTitle=’Welcome Page’}. /jsp:includeC jsp:include file=’/WEB-INF/jsp/header.jsp’. ${pageTitle=’Welcome Page’}. /jsp:includeD jsp:insert page=’/WEB-INF/jsp/header.jsp’. jsp:param name=’pageTitle’ value=’Welcome Page’ / . /jsp:insertE jsp:include page=’/WEB-INF/jsp/header.jsp’. jsp:param name=’pageTitle’ value=’Welcome Page’ / . /jsp:include

考题 单选题下面语句中,正确的是()A public.class.AddAction.implements.Action{...extends.ActionB mapping.findForward(/ch01/result.jsp);findForward(“name”),new.ActionForward(“/ch01/result.jsp”)C form.method=getaction=add.doD action.name=addActionpath=/addtype=y2ssh.sg.web.action.AddActionName指form的名字