單項選擇題Which EL expression evaluates to the request URI?()

A.${requestURI}
B.${request.URI}
C.${request.getURI}
D.${request.requestURI}
E.${requestScope.requestURI}
F.${pageContext.request.requestURI}


您可能感興趣的試卷

你可能感興趣的試題

1.單項選擇題

Given this fragment from a Java EE deployment descriptor:
124. <welcome-file>beta.html</welcome-file>
125. <welcome-file>alpha.html</welcome-file> And this request from a browser:http://www.sun.com/SCWCDtestApp/register
Which statement is correct,when the container receives this request?()

A.This deployment descriptor is NOT valid.
B.The container first looks in the register directory for beta.html.
C.The container first looks in the register directory for alpha.html.
D.The container first looks for a servlet mapping in the deployment descriptor.

2.多項選擇題Which two about WAR files are true?()

A.WAR files must be located in the web application library directory.
B.WAR files must contain the web application deployment descriptor.
C.WAR files must be created by using archive tools designed specifically for that purpose.
D.The web container must serve the content of any META-INF directory located in a WAR file.
E.The web container must allow access to resources in JARs in the web application library directory.

3.多項選擇題

Given that www.example.com/SCWCDtestApp is a validly deployed Java EE web application and that all ofthe JSP files specified in the requests below exist in the locations specified.
Which two requests,issuedfrom a browser,will return an HTTP 404 error?()

A.http://www.example.com/SCWCDtestApp/test.jsp
B.http://www.example.com/SCWCDtestApp/WEB-INF/test.jsp
C.http://www.example.com/SCWCDtestApp/WEB-WAR/test.jsp
D.http://www.example.com/SCWCDtestApp/Customer/test.jsp
E.http://www.example.com/SCWCDtestApp/META-INF/test.jsp
F.http://www.example.com/SCWCDtestApp/Customer/Update/test.jsp

4.多項選擇題Which two actions protect a resource file from direct HTTP access within a web application?()

A.Placing it in the /secure directory
B.Placing it in the /WEB-INF directory
C.Placing it in the /META-INF/secure directory
D.Creating a  element within the deployment descriptor

5.單項選擇題

After a merger with another small business, your company has inherited a legacy WAR file but the originalsource files were lost. After reading the documentation of that web application,you discover that the WARfile contains a useful tag library that you want to reuse in your own webapp packaged as a WAR file.
What do you need to do to reuse this tag library?()

A.Simply rename the legacy WAR file as a JAR file and place it in your webapp’s library directory.
B.Unpack the legacy WAR file, move the TLD file to the META-INF directory, repackage the whole thingas a JAR file, and place that JAR file in your webapp’s library directory.
C.Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to thetop-level directory, repackage the whole thing as a JAR file, and place that JAR file in your webapp’slibrary directory.
D.Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to thetop-level directory, repackage the WAR, and place that WAR file in your webapp’s WEB-INF directory.

最新試題

You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35.Which two EL code snippets will return true for this condition? ()

題型:多項選擇題

Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()

題型:單項選擇題

Click the ’Select and Place’ button.Place the events in the order they occur.

題型:問答題

Given a web application in which the request parameter productID contains a product identifier.Which twoEL expressions evaluate the value of the productID?()

題型:多項選擇題

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 <title> tag that requires the page name tobe specified dynamically when the header is imported.Which JSP code snippet performs the import of theheader content?() 

題型:單項選擇題

Given a Filter class definition with this method:21.public void doFilter(ServletRequest request,22.ServletResponse response,23.FilterChain chain)24.throws ServletException, IOException {25.// insert code here26.}Which should you insert at line 25 to properly invoke the next filter in the chain, or the target servlet if thereare no more filters?()

題型:單項選擇題

Click the 'Select and Place' button.Place the events in the order they occur.

題型:問答題

Given tutorial.jsp:2.EL Tutorial3.Example 14.5.Dear ${my:nickname(user)}6.Which, when added to the web application deployment descriptor,ensures that line 5 is included verbatimin the JSP output?()

題型:單項選擇題

You are building a web application with a scheduling component. On the JSP, you need to show the currentdate, the date of the previous week, and the date of the next week. To help you present this information,you have created the following EL functions in the ’d’ namespace: name: curDate; signature: java.util.DatecurrentDate() name: addWeek; signature: java.util.Date addWeek(java.util.Date, int) name: dateString;signature:java.util.String getDateString(java.util.Date)Which EL code snippet will generate the string for the previousweek?

題型:單項選擇題

A web application allows the HTML title banner to be set using a servlet context initialization parametercalled titleStr.Which two properly set the title in this scenario?()

題型:多項選擇題