Your company has a corporate policy that prohibits storing a customer's credit card number in any corporate database. However, users have complained that they
do NOT want to re-enter their credit card number for each transaction. Your management has decided to use client-side cookies to record the user's credit card
number for 120 days. Furthermore, they also want to protect this information during transit from the web browser to the web container; so the cookie must only be
transmitted over HTTPS. Which code snippet creates the "creditCard" cookie and adds it to the out going response to be stored on the user's web browser?
Given an HttpSession session, a ServletRequest request, and a ServletContext context, which retrieves a URL to /WEB-INF/myconfig.xml within a web application?
The tl:taskList and tl:task tags output a set of tasks to the response and are used as follows:
The tl:task tag supplies information about a single task while the tl:taskList tag does the final output. The tag handler for tl:taskList is TaskListTag. The tag handler
for tl:task is TaskTag. Both tag handlers extend BodyTagSupport.Which allows the tl:taskList tag to get the task names from its nested tl:task children?
The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows:
The tag handler for sl:shoppingList is ShoppingListTag and the tag handler for sl:item is ItemSimpleTag.ShoppingListTag extends BodyTagSupport and
ItemSimpleTag extends SimpleTagSupport. Which is true?
Given a JSP page:
The tag handler for n:recurse extends SimpleTagSupport.Assuming an n:recurse tag can either contain an empty body or another n:recurse tag, which strategy
allows the tag handler for n:recurse to output the nesting depth of the deepest n:recurse tag?
You are creating a content management system (CMS) with a web application front-end. The JSP that displays a given document in the CMS has the following
general structure:
The citation tag must store information in the document tag for the document tag to generate a reference section at the end of the generated web page.The
document tag handler follows the Classic tag model and the citation tag handler follows the Simple tag model. Furthermore, the citation tag could also be embedded
in other custom tags that could have either the Classic or Simple tag handler model. Which tag handler method allows the citation tag to access the document tag?
You web application uses a lot of Java enumerated types in the domain model of the application. Built into each enum type is a method, getDisplay(), which returns
a localized, user-oriented string. There are many uses for presenting enums within the web application, so your manager has asked you to create a custom tag that
iterates over the set of enum values and processes the body of the tag once for each value; setting the value into a pagescoped attribute called, enumValue. Here is
an example of how this tag is used:
You have decided to use the Simple tag model to create this tag handler. Which tag handler method will accomplish this goal?