최신Oracle Java Enterprise Edition 5 Web Component Developer Certified Professional - 1Z0-858무료샘플문제
문제1
Which two actions protect a resource file from direct HTTP access within a web application? (Choose two.)
Which two actions protect a resource file from direct HTTP access within a web application? (Choose two.)
정답: A,D
문제2
Which interface must a session attribute implement if it needs to be notified when a web container persists a session?
Which interface must a session attribute implement if it needs to be notified when a web container persists a session?
정답: C
문제3
Which method must be used to encode a URL passed as an argument to HttpServletResponse.sendRedirect when using URL rewriting for session tracking?
Which method must be used to encode a URL passed as an argument to HttpServletResponse.sendRedirect when using URL rewriting for session tracking?
정답: D
문제4
Which three are valid URL mappings to a servlet in a web deployment descriptor? (Choose three.)
Which three are valid URL mappings to a servlet in a web deployment descriptor? (Choose three.)
정답: A,C,D
문제5
Which JSTL code snippet can be used to import content from another web resource?
Which JSTL code snippet can be used to import content from another web resource?
정답: C
문제6
Which two statements are true about the security-related tags in a valid Java EE deployment descriptor? (Choose two.)
Which two statements are true about the security-related tags in a valid Java EE deployment descriptor? (Choose two.)
정답: B,E
문제7
Assume that a news tag library contains the tags lookup and item:
lookup Retrieves the latest news headlines and executes the tag body once for each headline. Exposes a NESTED page-scoped attribute called headline of type com.example.Headline containing details for that headline.
item Outputs the HTML for a single news headline. Accepts an attribute info of type com.example.Headline containing details for the headline to be rendered.Which snippet of JSP code returns the latest news headlines in an HTML table, one per row?
Assume that a news tag library contains the tags lookup and item:
lookup Retrieves the latest news headlines and executes the tag body once for each headline. Exposes a NESTED page-scoped attribute called headline of type com.example.Headline containing details for that headline.
item Outputs the HTML for a single news headline. Accepts an attribute info of type com.example.Headline containing details for the headline to be rendered.Which snippet of JSP code returns the latest news headlines in an HTML table, one per row?
정답: D
문제8
Which two from the web application deployment descriptor are valid? (Choose two.)
Which two from the web application deployment descriptor are valid? (Choose two.)
정답: C,E
문제9
DRAG DROP
Click the Task button.
Place the appropriate element names on the left on the web application deployment descriptor on the right so that files ending in ".mpg" are associated with the MIME type "video/mpeg."

DRAG DROP
Click the Task button.
Place the appropriate element names on the left on the web application deployment descriptor on the right so that files ending in ".mpg" are associated with the MIME type "video/mpeg."

정답:

문제10
If you want to use the Java EE platform's built-in type of authentication that uses a custom HTML page for authentication, which two statements are true? (Choose two.)
If you want to use the Java EE platform's built-in type of authentication that uses a custom HTML page for authentication, which two statements are true? (Choose two.)
정답: C,E
문제11
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 hashmap 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?
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 hashmap 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?
정답: C
문제12
Which statement is true about web container session management?
Which statement is true about web container session management?
정답: A
문제13
Click the Exhibit button. Given the web application deployment descriptor elements:
11.
<filter>
12.
<filter-name>ParamAdder</filter-name>
13.
<filter-class>com.example.ParamAdder</filter-class>
14.
</filter> ...
31.
<filter-mapping>
32.
<filter-name>ParamAdder</filter-name>
33.
<servlet-name>Destination</servlet-name>
34.
</filter-mapping> ...
55.
<servlet-mapping>
56.
<servlet-name>Destination</servlet-name>
57.
<url-pattern>/dest/Destination</url-pattern>
58.
</servlet-mapping>
What is the result of a client request of the Source servlet with no query string?

Click the Exhibit button. Given the web application deployment descriptor elements:
11.
<filter>
12.
<filter-name>ParamAdder</filter-name>
13.
<filter-class>com.example.ParamAdder</filter-class>
14.
</filter> ...
31.
<filter-mapping>
32.
<filter-name>ParamAdder</filter-name>
33.
<servlet-name>Destination</servlet-name>
34.
</filter-mapping> ...
55.
<servlet-mapping>
56.
<servlet-name>Destination</servlet-name>
57.
<url-pattern>/dest/Destination</url-pattern>
58.
</servlet-mapping>
What is the result of a client request of the Source servlet with no query string?

정답: D
문제14
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?
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?
정답: A