1Z1-899 試験問題を無料オンラインアクセス
| 試験コード: | 1Z1-899 |
| 試験名称: | Java EE 6 Web Component Developer Certified Expert Exam |
| 認定資格: | Oracle |
| 無料問題数: | 132 |
| 更新日: | 2026-08-22 |
You want to create a filter for your web application and your filter will implement
.servlet.Filter.
Which two statements are true? (Choose two)
As a convenience feature, your web pages include an Ajax request every five minutes to a special servlet that monitors the age of the user's session. The client-side JavaScript that handles the Ajax callback displays a message on the screen as the session ages. The Ajax call does NOT pass any cookies, but it passes the session ID in a request parameter called sessionID. In addition, assume that your webapp keeps a hasmap of session objects by the ID. Here is a partial implementation of this servlet:
10. public class SessionAgeServlet extends HttpServlet {
11. public void service(HttpServletRequest request, HttpServletResponse) throws IOException {
12. String sessionID = request.getParameter("sessionID");
13. HttpSession session = getSession(sessionID);
14. long age = // your code here
15. response.getWriter().print(age);
16. }
... // more code here
47. }
Which code snippet on line 14, will determine the age of the session?
Given:
1. <% int[] nums = {42,420,4200};
2. request.setAttribute("foo", nums); %>
3. ${5 + 3 It 6}
4. S(requestScope['foo'][0] ne 10 div0>
5. ${10 div 0}
What is the result?