多选题Given in a single JSP page:   Which two are true?()AThe prefix ’java’ is reserved.BThe URI ’myTags’ must be properly mapped to a TLD file by the web container.CA translation error occurs because the prefix is considered identical by the web container.DFor the tag usage , the tag1 must be unique in the union of tag names in ’myTags’ and’moreTags’.

多选题
Given in a single JSP page:   Which two are true?()
A

The prefix ’java’ is reserved.

B

The URI ’myTags’ must be properly mapped to a TLD file by the web container.

C

A translation error occurs because the prefix is considered identical by the web container.

D

For the tag usage , the tag1 must be unique in the union of tag names in ’myTags’ and’moreTags’.


参考解析

解析: 暂无解析

相关考题:

在J2EE中,在my.jsp中使用标记扩展,下列选项正确的是()A、%@ taglib URL=”/hello”  prefix=”examples”% B、%@ taglib URI=”/hello”  prefix=”examples”% C、%@ taglib url=”/hello”  prefix=”examples”% D、%@ taglib uri=”/hello”  prefix=”examples”%

A JSP page contains a taglib directive whose uri attribute has the value dbtags. Which XML element withinthe web application deployment descriptor defines the associated TLD?()A、tlduridbtags/urilocation/WEB-INF/tlds/dbtags.tld/location/tldB、tagliburidbtags/urilocation/WEB-INF/tlds/dbtags.tld/location. /taglibC、tld. tld-uridbtags/tld-uri. tld-location/WEB-INF/tlds/dbtags.tld/tld-location . /tldD、taglibtaglib-uridbtags/taglib-uritaglib-location/WEB-INF/tlds/dbtags.tld. /taglib-location. /taglib

A developer wants a web application to be notified when the application is about to be shut down. Which two actions are necessary to accomplish this goal?()A、Include a listener directive in a JSP pageB、configure a listener in the TLD file using the  elementC、Include a  element in the web application deployment descriptorD、configure a listener in the application deployment descriptor, using the  elementE、Include a class implementing ServletContextListener as part of the web application deploymen

To take advantage of the capabilities of modern browsers that use web standards, such as XHTML andCSS, your web application is being converted from simple JSP pages to JSP Document format. However,one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in severalweb forms to create screen-specific validation functions and are included in these pages with the followingstatement: 10. 11.  14. 15. Which JSP code snippet declares that this JSP Document is a JavaScript file?()A、%@ page contentType=’application/javascript’ %B、jsp:page contentType='application/javascript' /C、jsp:document contentType='application/javascript' /D、jsp:directive.page contentType='application/javascript' /E、No declaration is needed because the web form XHTML page already declares the MIME type of the /scripts/screenFunctions.jsp file in the script tag. tag.

下面哪个方法不属于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 developing several tag libraries that will be sold for development of third-party web applications.You are about to publish the first three libraries as JAR files: container-tags.jar,advanced-html-form-tags.jar, and basic-html-form-tags.jar. Which two techniques are appropriate for packaging the TLD files forthese tag libraries?()A、The TLD must be located within the WEB-INF directory of the JAR file.B、The TLD must be located within the META-INF directory of the JAR file.C、The TLD must be located within the META-INF/tld/ directory of the JAR file.D、The TLD must be located within a subdirectory of WEB-INF directory of the JAR file.E、The TLD must be located within a subdirectory of META-INF directory of the JAR file.

在JSP中,若要在JSP正确使用标签:,在jsp中声明的taglib指令为:%@tagliburi=“/WEB-INF/myTags.tld”prefix=“()”%。A、xB、getKingC、myTagsD、king

在java程序中的my.jsp中要使用标记扩展,下列选项正确的是()。A、%@taglib URL=“/hello”prefix=“examples”%B、%taglib URI=“/hello”prefix=“examples”%C、%@taglib url=“/hello”prefix=“examples”%D、%@taglib uri=“/hello”prefix=“examples”%

要使用JSTL的核心标签库,需要在JSP源文件的首部加入如下什么声明语句?()A、〈%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %〉B、〈%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %〉C、〈%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %〉D、〈%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %〉

A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called sort.jspexists in the web application and contains only this JSP code: 1.%@ taglib prefix="x" 2.tagdir="/WEB-INF/tags/alpha" % 3. The sort.jsp page is requested. Which two are true?()A、Tag files can only be accessed using a tagdir attribute.B、The sort.jsp page translates successfully and invokes the tag defined by beta.tag.C、The sort.jsp page produces a translation error because a taglib directive must always have a uriattribute.D、Tag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB- INF/tags.E、The tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is createdand added to the web application.

Given in a single JSP page: %@ taglib prefix=’java’ uri=’myTags’ % %@ taglib prefix=’JAVA’ uri=’moreTags’ %  Which two are true?()A、The prefix ’java’ is reserved.B、The URI ’myTags’ must be properly mapped to a TLD file by the web container.C、A translation error occurs because the prefix is considered identical by the web container.D、For the tag usage , the tag1 must be unique in the union of tag names in ’myTags’ and’moreTags’.

A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()A、prefix:myTag a="foo" b="bar" c="baz" /B、prefix:myTag attributes={"foo","bar","baz"} /C、prefix:myTag jsp:attribute a="foo" b="bar" c="baz" /D、prefix:myTagjsp:attribute name="a"foo/jsp:attributejsp:attribute name="b"bar/jsp:attributejsp:attribute name="c"baz/jsp:attribute. /prefix:myTag

Given an EL function declared with:11.  12.spin 13.com.example.Spinner 14. 15.java.lang.String spinIt() 16. 17. Which two are true?()A、The function method must have the signature: public String spin().B、The method must be mapped to the logical name "spin" in the web.xml file.C、The function method must have the signature: public String spinIt().D、The function method must have the signature public static String spin().E、The function method must have the signature: public static String spinIt().F、The function class must be named Spinner, and must be in the package com.example.

多选题Which the two about WAR files are true?()AWAR files must be located in the web application library directory.BWAR files must contain the web application deployment descriptor.CWAR files must be created by using archive tools to designed specifically for that purpose.DThe web container must serve the content of any META-INF directory located in a WAR file.EThe web container must allow access to resources in JARs in the web application library directory

多选题You are developing several tag libraries that will be sold for development of third-party web applications.You are about to publish the first three libraries as JAR files: container-tags.jar,advanced-html-form-tags.jar, and basic-html-form-tags.jar. Which two techniques are appropriate for packaging the TLD files forthese tag libraries?()AThe TLD must be located within the WEB-INF directory of the JAR file.BThe TLD must be located within the META-INF directory of the JAR file.CThe TLD must be located within the META-INF/tld/ directory of the JAR file.DThe TLD must be located within a subdirectory of WEB-INF directory of the JAR file.EThe TLD must be located within a subdirectory of META-INF directory of the JAR file.

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

单选题要使用JSTL的核心标签库,需要在JSP源文件的首部加入如下什么声明语句?()A〈%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core %〉B〈%@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml %〉C〈%@ taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt %〉D〈%@ taglib prefix=sql uri=http://java.sun.com/jsp/jstl/sql %〉

多选题A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called sort.jspexists in the web application and contains only this JSP code: 1. 3. The sort.jsp page is requested. Which two are true?()ATag files can only be accessed using a tagdir attribute.BThe sort.jsp page translates successfully and invokes the tag defined by beta.tag.CThe sort.jsp page produces a translation error because a taglib directive must always have a uriattribute.DTag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB- INF/tags.EThe tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is createdand added to the web application.

单选题A JSP page contains a taglib directive whose uri attribute has the value dbtags. Which XML element withinthe web application deployment descriptor defines the associated TLD?()Atlduridbtags/urilocation/WEB-INF/tlds/dbtags.tld/location/tldBtagliburidbtags/urilocation/WEB-INF/tlds/dbtags.tld/location. /taglibCtld. tld-uridbtags/tld-uri. tld-location/WEB-INF/tlds/dbtags.tld/tld-location . /tldDtaglibtaglib-uridbtags/taglib-uritaglib-location/WEB-INF/tlds/dbtags.tld. /taglib-location. /taglib

多选题Given an EL function declared with:11.  12.spin 13.com.example.Spinner 14. 15.java.lang.String spinIt() 16. 17. Which two are true?()AThe function method must have the signature: public String spin().BThe method must be mapped to the logical name spin in the web.xml file.CThe function method must have the signature: public String spinIt().DThe function method must have the signature public static String spin().EThe function method must have the signature: public static String spinIt().FThe function class must be named Spinner, and must be in the package com.example.

单选题Given the element from the web application deployment descriptor: /main/page1.jsp true and given that /main/page1.jsp contains:   What is the result?()Ab/bBb12/bCThe JSP fails to execute.D% int i = 12 %b%= i %/b

多选题Given: String value = getServletContext().getInitParameter("foo"); in an HttpServlet and a web applicationdeployment descriptor that contains: foo frodo Which two are true?()AThe foo initialization parameter CANNOT be set programmatically.BCompilation fails because getInitParameter returns type Object.CThe foo initialization parameter is NOT a servlet initialization parameter.DCompilation fails because ServletContext does NOT have a getInitParameter method.EThe foo parameter must be defined within the  element of the deployment descriptor.

单选题在java程序中的my.jsp中要使用标记扩展,下列选项正确的是()。A%@taglib URL=“/hello”prefix=“examples”%B%taglib URI=“/hello”prefix=“examples”%C%@taglib url=“/hello”prefix=“examples”%D%@taglib uri=“/hello”prefix=“examples”%

单选题To take advantage of the capabilities of modern browsers that use web standards, such as XHTML andCSS, your web application is being converted from simple JSP pages to JSP Document format. However,one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in severalweb forms to create screen-specific validation functions and are included in these pages with the followingstatement: 10. 11.  14. 15. Which JSP code snippet declares that this JSP Document is a JavaScript file?()A%@ page contentType=’application/javascript’ %Bjsp:page contentType='application/javascript' /Cjsp:document contentType='application/javascript' /Djsp:directive.page contentType='application/javascript' /ENo declaration is needed because the web form XHTML page already declares the MIME type of the /scripts/screenFunctions.jsp file in the script tag. tag.

单选题Given this fragment from a Java EE deployment descriptor: 341. 342.java.lang.Throwable  343./mainError.jsp 344. 345. 346.java.lang.ClassCastException  347./castError.jsp 348. If the web application associated with the fragment above throws a ClassCastException.Which statement is true?()AThe deployment descriptor is invalid.BThe container invokes mainError.jsp.CThe container invokes castError.jsp.DNeither mainError.jsp nor castError.jsp is invoked.

单选题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?()Ajsp:insert page=’/WEB-INF/jsp/header.jsp’. ${pageTitle=’Welcome Page’}. /jsp:insertBjsp:include page=’/WEB-INF/jsp/header.jsp’. ${pageTitle=’Welcome Page’}. /jsp:includeCjsp:include file=’/WEB-INF/jsp/header.jsp’. ${pageTitle=’Welcome Page’}. /jsp:includeDjsp:insert page=’/WEB-INF/jsp/header.jsp’. jsp:param name=’pageTitle’ value=’Welcome Page’ / . /jsp:insertEjsp:include page=’/WEB-INF/jsp/header.jsp’. jsp:param name=’pageTitle’ value=’Welcome Page’ / . /jsp:include

多选题A developer wants a web application to be notified when the application is about to be shut down. Which two actions are necessary to accomplish this goal?()AInclude a listener directive in a JSP pageBconfigure a listener in the TLD file using the  elementCInclude a  element in the web application deployment descriptorDconfigure a listener in the application deployment descriptor, using the  elementEInclude a class implementing ServletContextListener as part of the web application deploymen