최신 310-083 무료덤프 - SUN Sun Certified Web Component Developer for J2EE 5
Which defines the welcome files in a web application deployment descriptor?
정답: D
Given a portion of a valid Java EE web application's directory structure:
MyApp
|
|-- Directory1
| |-- File1.html
|
|-- META-INF
| |-- File2.html
|
|-- WEB-INF
|-- File3.html
You want to know whether File1.html, File2.html, and/or File3.html is protected from direct access by your web client's browsers.
What statement is true?
MyApp
|
|-- Directory1
| |-- File1.html
|
|-- META-INF
| |-- File2.html
|
|-- WEB-INF
|-- File3.html
You want to know whether File1.html, File2.html, and/or File3.html is protected from direct access by your web client's browsers.
What statement is true?
정답: E
Click the Exhibit button.
Assuming the tag library in the exhibit is imported with the prefix forum, which custom tag invocation produces a translation error in a JSP page?

Assuming the tag library in the exhibit is imported with the prefix forum, which custom tag invocation produces a translation error in a JSP page?

정답: C
You are building a Front Controller using a JSP page and you need to determine if the user's session has NOT been created yet and perform some special processing for this case. Which scriptlet code snippet will perform this test?
정답: 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
4 03 status is generated?
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
4 03 status is generated?
정답: B
You are creating a new JSP page and you need to execute some code that acts when the page is first executed, but only once. Which three are possible mechanisms for performing this initialization code? (Choose three.)
정답: B,D,E
In which two locations can library dependencies be defined for a web application? (Choose two.)
정답: A,D
Which path is required to be present within a WAR file?
정답: B
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? (Choose two.)
정답: C,E
Which two are characteristics of the Service Locator pattern? (Choose two.)
정답: A,B
Given the security constraint in a DD:
1 01. <security-constraint>
1 02. <web-resource-collection>
1 03. <web-resource-name>Foo</web-resource-name>
1 04. <url-pattern>/Bar/Baz/*</url-pattern>
1 05. <http-method>POST</http-method>
1 06. </web-resource-collection>
1 07. <auth-constraint>
1 08. <role-name>DEVELOPER</role-name>
1 09. </auth-constraint>
1 10. </security-constraint>
And given that "MANAGER" is a valid role-name, which four are true for this security constraint? (Choose four.)
1 01. <security-constraint>
1 02. <web-resource-collection>
1 03. <web-resource-name>Foo</web-resource-name>
1 04. <url-pattern>/Bar/Baz/*</url-pattern>
1 05. <http-method>POST</http-method>
1 06. </web-resource-collection>
1 07. <auth-constraint>
1 08. <role-name>DEVELOPER</role-name>
1 09. </auth-constraint>
1 10. </security-constraint>
And given that "MANAGER" is a valid role-name, which four are true for this security constraint? (Choose four.)
정답: C,D,E,F
Given:
1 1. public class MyServlet extends HttpServlet {
1 2. public void service(HttpServletRequest request,
1 3. HttpServletResponse response)
1 4. throws ServletException, IOException {
1 5. // insert code here
1 6. }
1 7. }
and this element in the web application's deployment descriptor:
< error-page>
< error-code>302</error-code>
< location>/html/error.html</location>
< /error-page>
Which, inserted at line 15, causes the container to redirect control to the error.html resource?
1 1. public class MyServlet extends HttpServlet {
1 2. public void service(HttpServletRequest request,
1 3. HttpServletResponse response)
1 4. throws ServletException, IOException {
1 5. // insert code here
1 6. }
1 7. }
and this element in the web application's deployment descriptor:
< error-page>
< error-code>302</error-code>
< location>/html/error.html</location>
< /error-page>
Which, inserted at line 15, causes the container to redirect control to the error.html resource?
정답: E