A developer chooses to avoid using singieThreadModel but wants to ensure that data If; updated in a thread safe manner.Which two can support this design goal? (Choose two)
You have a use in your web application that adds several session-scoped attributes. At the end of the use case, one of these objects, the manage attribute, is removed and then it needs to decide which of the other session-scoped attributes to remove.How can this goal be accomplished?
You want to create a filter for your web application and your filter will implement.servlet.Filter.Which two statements are true? (Choose two)
Given an HttpServletRequest request and an httpServletResponse response:41. HttpSession session = null;42. / / insert code here43. if (session = = null) {44. / / do something if session does not exist45. } else {46. / / do something if session exists47. }To implement the design intent, which statement must be inserted at line 42?
Users of your web application have requested that they should be able to set the duration of their sessions. So for example, one user might want a webapp to stay connected for an hour rather than the webapp's default of fifteen minutes; another user might want to stay connected for a whole day.Furthermore, you have a special login servlet that performs user authentication and retrieves the object from the database. You want to augment this code to set up the user's specified session duration.Which code snippet in the login servlet will accomplish this goal?
Which interface must a class implement so that instances of the class are notified after any object added to a session?