單項選擇題Which JSTL code snippet can be used to perform URL rewriting?()

A.<a href=’<c:url url="foo.jsp"/>’ />
B.<a href=’<c:link url="foo.jsp"/>’ />
C.<a href=’<c:url value="foo.jsp"/>’ />
D.<a href=’<c:link value="foo.jsp"/>’ />


您可能感興趣的試卷

你可能感興趣的試題

3.單項選擇題Which statement is true about web container session management?()

A.Access to session-scoped attributes is guaranteed to be thread-safe by the web container.
B.To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.
C.If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.
D.The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.

4.單項選擇題

Your web application requires the adding and deleting of many session attributes during a complex usecase. A bug report has come in that indicates that an important session attribute is being deleted too soonand a NullPointerException is being thrown several interactions after the fact. You have decided to create asession event listener that will log when attributes are being deleted so you can track down when theattribute is erroneously being deleted.
Which listener class will accomplish this debugging goal?()

A.Create an HttpSessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getName method on the event object.
B.Create an HttpSessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getName method on the event object.
C.Create an SessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getAttributeName method on the event object.
D.Create an SessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getAttributeName method on the event object.

5.多項選擇題

You need to store a Java long primitive attribute, called customerOID, into the session scope.
Which two code snippets allow you to insert this value into the session?()

A.long customerOID = 47L;session.setAttribute("customerOID", new Long(customerOID));
B.long customerOID = 47L;session.setLongAttribute("customerOID", new Long(customerOID));
C.long customerOID = 47L;session.setAttribute("customerOID", customerOID);
D.long customerOID = 47L;session.setNumericAttribute("customerOID", new Long(customerOID));

最新試題

All of your JSPs need to have a link that permits users to email the web master. This web application islicensed to many small businesses, each of which have a different email address for the web master. Youhave decided to use a context parameter that you specify in the deployment descriptor, like this:42.<context-param>43.<param-name>webmasterEmail</param-name>44.<param-value>master@example.com</param-value>45.</context-param>Which JSP code snippet creates this email link?()

題型:單項選擇題

Your company has a corporate policy that prohibits storing a customer’s credit card number in anycorporate database. However, users have complained that they do NOT want to re- enter their credit cardnumber for each transaction. Your management has decided to use client-side cookies to record the user’scredit card number for 120 days. Furthermore, they also want to protect this information during transit fromthe web browser to the web container; so the cookie must only be transmitted over HTTPS.Which codesnippet creates the "creditCard" cookie and adds it to the out going response to be stored on the user’s webbrowser?()

題型:單項選擇題

Which is true about the web container request processing model?()

題型:單項選擇題

Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface:public interface ApplicationController {public String invoke(HttpServletRequest request)}The return value of this method indicates a symbolic name of the next view. From this name, the FrontController servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or apath relative to the current request. Next, the Front Controller servlet must send the request to this JSP togenerate the view. Assume that the servlet variable request is assigned the current HttpServletRequestobject and the variable context is assigned the webapp’s ServletContext. Which code snippet of the FrontController servlet accomplishes this goal?()

題型:單項選擇題

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

題型:問答題

Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface:public interface ApplicationController {public String invoke(HttpServletRequest request)}The return value of this method indicates a symbolic name of the next view. From this name, the FrontController servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or apath relative to the current request. Next, the Front Controller servlet must send the request to this JSP togenerate the view. Assume that the servlet variable request is assigned the current HttpServletRequestobject and the variable context is assigned the webapp’s ServletContext.Which code snippet of the FrontController servlet accomplishes this goal?()

題型:單項選擇題

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

題型:問答題

In which three directories, relative to a web application’s root, may a tag library descriptor file reside whendeployed directly into a web application?()

題型:多項選擇題

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?

題型:單項選擇題

Which is a benefit of precompiling a JSP page?()

題型:單項選擇題