网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
JSP方法
参考答案
更多 “JSP方法” 相关考题
考题
在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是一种Java服务器端技术,其实质是一个Servlet。与Servlet的生命周期相同,JSP也有生命周期。在JSP的生命周期中,JSP引擎调用一系列的方法执行JSP,其中不包括( )A、jspInitB、jspActivateC、jspServiceD、jspDestroy
考题
Youarebuildingyourownlayoutmechanismbyincludingdynamiccontentforthepage’sheaderandfootersections.Thefooterisalwaysstatic,buttheheadergeneratesthetitletagthatrequiresthepagenametobespecifieddynamicallywhentheheaderisimported.WhichJSPcodesnippetperformstheimportoftheheadercontent?()A.jsp:includepage=’/WEB-INF/jsp/header.jsp’jsp:paramname=’pageName’value=’WelcomePage’//jsp:includeB.jsp:importpage=’/WEB-INF/jsp/header.jsp’jsp:paramname=’pageName’value=’WelcomePage’//jsp:importC.jsp:includepage=’/WEB-INF/jsp/header.jsp’jsp:attributename=’pageName’value=’WelcomePage’/./jsp:includeD.jsp:importpage=’/WEB-INF/jsp/header.jsp’.jsp:attributename=’pageName’value=’WelcomePage’/./jsp:import
考题
Whichtwoarevalidandequivalent?()
A.%!inti;%B.%=inti;%C.jsp:exprinti;/jsp:exprD.jsp:scriptletinti;/jsp:scriptletE.jsp:declarationinti;/jsp:declaration
考题
WhichJSPstandardactioncanbeusedtoimportcontentfromaresourcecalledfoo.jsp?()
A.jsp:importfile=’foo.jsp’/B.jsp:importpage=’foo.jsp’/C.jsp:includepage=’foo.jsp’/D.jsp:includefile=’foo.jsp’/
考题
有三个页面,a.jsp,b.jsp和c.jsp,流程是:a.jsp-b.jsp-c.jsp,其中a.jsp中提交的数据要在c.jsp中访问,用最简单的方法 怎么做?注意不能放在session里
考题
关于JSP生命周期的叙述,下列哪些为真?()
A.JSP会先解释成Servlet源文件,然后编译成Servlet类文件B.每当用户端运行JSP时,jspInit方法都会运行一次C.每当用户端运行JSP时,_jspService方法都会运行一次D.每当用户端运行JSP时,jspDestroy方法都会运行一次
考题
重定向可以使用()方法。A、forwardpage= “login.jsp”/B、jsp:forwardpage= “login.jsp”/C、request.sendRedirect(“login.jsp”);D、response.sendRedirect(“login.jsp”);
考题
关于JSP生命周期的叙述,下列哪些为真?()A、JSP会先解释成Servlet源文件,然后编译成Servlet类文件B、每当用户端运行JSP时,jspInit方法都会运行一次C、每当用户端运行JSP时,_jspService方法都会运行一次D、每当用户端运行JSP时,jspDestroy方法都会运行一次
考题
在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
考题
Which JSP standard action can be used to import content from a resource called foo.jsp?()A、jsp:import file=’foo.jsp’ /B、jsp:import page=’foo.jsp’ /C、jsp:include page=’foo.jsp’ /D、jsp:include file=’foo.jsp’ /
考题
下面的说法正确的是()A、带有页作用域的对象在一个web应用程序的每个JSP中都存在B、指令指定与一个特定的JSP 请求不相关的全局信息。C、当JSP容器遇到开始定制标签和结束定制标签时,分别调用doInitBody方法和doAfterBody方法。D、jsp:inclnde动作只在翻译时处理一次。
考题
下面哪个方法不属于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”%
考题
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
考题
关于JSP生命周期的叙述,下列哪些为真()。A、JSP会先解释成Servlet源文件,然后编译成Servlet类文件B、每当用户端运行JSP时,jsp init()方法都会运行一次C、每当用户端运行JSP时,jsp service()方法都会运行一次D、每当用户端运行JSP时,jsp destroy()方法都会运行一次
考题
多选题关于JSP生命周期的叙述,下列哪些为真?()AJSP会先解释成Servlet源文件,然后编译成Servlet类文件B每当用户端运行JSP时,jspInit方法都会运行一次C每当用户端运行JSP时,_jspService方法都会运行一次D每当用户端运行JSP时,jspDestroy方法都会运行一次
考题
单选题使用〈jsp:setProperty〉动作标记可以在JSP页面中设置Bean的属性,但必须保证Bean有对应的方法是()。A
SetXxx方法B
setXxx方法C
getXxx方法D
GetXxx方法
考题
多选题在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
考题
单选题重定向可以使用()方法。A
forwardpage= “login.jsp”/B
jsp:forwardpage= “login.jsp”/C
request.sendRedirect(“login.jsp”);D
response.sendRedirect(“login.jsp”);
热门标签
最新试卷