Which two are characteristics of the Intercepting Filter pattern? (Choose two.)
Show answer and explanation
Correct answers: D, E
1Z0-858 Real Exam Questions
276 questions available · Page 1 of 28
Updated Exam DumpsVerified AnswersPass Guarantee
Which two are characteristics of the Intercepting Filter pattern? (Choose two.)
Correct answers: D, E
Given:
5. public class MyTagHandler extends TagSupport {
6. public int doStartTag() throws JspException {
7. try {
8. // insert code here
9. } catch(Exception ex) { /* handle exception */ }
10. return super.doStartTag();
11. }
...
42. }
Which code snippet, inserted at line 8, causes the value foo to be output?
Correct answer: A
In your web application, you need to execute a block of code whenever the session object is first created.
Which design will accomplish this goal?
Correct answer: D
A JSP page needs to instantiate a JavaBean to be used by only that page.
Which two jsp:useBean attributes must be used to access this attribute in the JSP page? (Choose two.)
Correct answers: A, D
Given a web application in which the cookie userName is expected to contain the name of the user.
Which EL expression evaluates to that user name?
Correct answer: B
You have built a web application with tight security. Several directories of your webapp are used for internal purposes and you have overridden the default servlet to send an HTTP 403 status code for any request that maps to one of these directories. During testing, the Quality Assurance director decided that they did NOT like seeing the bare response page generated by Firefox and Internet Explorer. The director recommended that the webapp should return a more user-friendly web page that has the same look-and-feel as the webapp plus links to the webapp's search engine. You have created this JSP page in the / WEB-INF/jsps/error403.jsp file. You do NOT want to alter the complex logic of the default servlet.
How can you declare that the web container must send this JSP page whenever a 403 status is generated?
Correct answer: C
Click the Exhibit button.
The attribute "name" has a value of "Foo,"
What is the result if this tag handler's tag is invoked?

100% Real Q&As | 100% Real Pass
Correct answer: A
After a merger with another small business, your company has inherited a legacy WAR file but the original source files were lost. After reading the documentation of that web application, you discover that the WAR file 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?
Correct answer: C
To take advantage of the capabilities of modern browsers that use web standards, such as XHTML and CSS, your web application is being converted from simple JSP pages to JSP Document format. However, one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in several web forms to create screen-specific validation functions and are included in these pages with the following statement:
10. <head>
11. <script src='/scripts/screenFunctions.jsp'
12. language='javascript'
13. type='application/javascript'> </script>
14. </head>
15. <!-- body of the web form -->
Which JSP code snippet declares that this JSP Document is a JavaScript file?
Correct answer: D
Which method must be used to encode a URL passed as an argument to HttpServletResponse.sendRedirect when using URL rewriting for session tracking?
Correct answer: D