Oracle Java Enterprise Edition 5 Web Component Developer Certified Professional 認定 1Z0-858 試験問題:
1. Which two are true concerning the objects available to developers creating tag files? (Choose two.)
A) The JspContext for the tag file is available through the implicit jspContext object.
B) The servlet context is available through the implicit servletContext object.
C) The output stream is available through the implicit outStream object.
D) The request and response objects are available implicitly.
E) The session object must be declared explicitly.
2. You have built a web application that you license to small businesses. The webapp uses a context parameter, called licenseExtension, which enables certain advanced features based on your client's license package. When a client pays for a specific service, you provide them with a license extension key that they insert into the <context-param> of the deployment descriptor. Not every client will have this context parameter so you need to create a context listener to set up a default value in the licenseExtension parameter. Which code snippet will accomplish this goal?
A) String ext = context.getInitParameter('licenseExtension');
if ( ext == null ) {
context.resetInitParameter('licenseExtension', DEFAULT);
}
B) You cannot do this because context parameters CANNOT be altered programmatically.
C) String ext = context.getAttribute('licenseExtension');
if ( ext == null ) {
context.setAttribute('licenseExtension', DEFAULT);
}
D) String ext = context.getInitParameter('licenseExtension');
if ( ext == null ) { context.setInitParameter('licenseExtension', DEFAULT); }
E) String ext = context.getParameter('licenseExtension');
if ( ext == null ) {
context.setParameter('licenseExtension', DEFAULT);
}
3. Click the Exhibit button.
The resource requested by the RequestDispatcher is available and implemented by the DestinationServlet.
What is the result?
A) Both "hello from source" and "hello from dest" appear in the response output stream.
B) An exception is thrown at runtime by SourceServlet.
C) Only "hello from dest" appears in the response output stream.
D) An exception is thrown at runtime by DestinationServlet.
4. Given that a web application consists of two HttpServlet classes, ServletA and ServletB, and the ServletA.service method:
20.
String key = "com.example.data";
21.
session.setAttribute(key, "Hello");
22.
Object value = session.getAttribute(key);
23.
Assume session is an HttpSession, and is not referenced anywhere else in ServletA.
Which two changes, taken together, ensure that value is equal to "Hello" on line 23? (Choose two.)
A) ensure that ServletB synchronizes on the session object when setting session attributes
B) ensure that the ServletA.service method is synchronized
C) enclose lines 21-22 in a synchronized block:
synchronized(session) {
session.setAttribute(key, "Hello");
value = session.getAttribute(key);
}
D) ensure that the ServletB.service method is synchronized
E) enclose lines 21-22 in a synchronized block:
synchronized(this) {
session.setAttribute(key, "Hello");
value = session.getAttribute(key);
}
5. Which two prevent a servlet from handling requests? (Choose two.)
A) The servlet's init method returns a non-zero status.
B) The servlet's init method throws a ServletException.
C) The servlet's init method sets the ServletResponse's content length to 0.
D) The servlet's init method does NOT return within a time period defined by the servlet container.
E) The servlet's init method sets the ServletResponse's content type to null.
質問と回答:
| 質問 # 1 正解: A、D | 質問 # 2 正解: B | 質問 # 3 正解: B | 質問 # 4 正解: A、C | 質問 # 5 正解: B、D |














1027 お客様のコメント
品質保証JPexamはIT認定試験のシラバスに従って、試験問題の範囲を正確に絞って、的中率が99%の最新問題集を捧げます。
1年間の無料更新サービスJPexamは1年以内に問題集の無料更新サービスを提供し、お客様がいつでも最新版の問題集を持つことを保証いたします。もし試験の内容が変更されたら、弊社は直ちにお客様にお知らせします。それに、弊社の問題集が更新されたら、早速メールで最新バージョンを送付いたします。
全額返金JPexamの問題集を利用すると、短時間で勉強しても試験に合格できるのを保証いたします。試験に不合格になってしまった場合、弊社は全額返金いたします。(
ご購入前のお試しJPexamは問題集のサンプルを無料で提供いたします。ご購入前にサンプルを試用して製品の品質を確認することができます。ご遠慮なく利用してください。
