SUN Sun Certified Web Component Developer for J2EE 5 認定 310-083 試験問題:
1. Your web application requires the adding and deleting of many session attributes during a complex use case. A bug report has come in that indicates that an important session attribute is being deleted too soon and a NullPointerException is being thrown several interactions after the fact. You have decided to create a session event listener that will log when attributes are being deleted so you can track down when the attribute is erroneously being deleted.
Which listener class will accomplish this debugging goal?
A) Create an HttpSessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getName method on the event object.
B) Create an HttpSessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getName method on the event object.
C) Create an SessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getAttributeName method on the event object.
D) Create an SessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getAttributeName method on the event object.
2. Given:
1 1. <% java.util.Map map = new java.util.HashMap();
1 2. request.setAttribute("map", map);
13. map.put("a", "true");
14. map.put("b", "false");
15. map.put("c", "42"); %>
Which three EL expressions are valid and evaluate to true? (Choose three.)
A) ${map.a and map.b or map.a}
B) ${map.false or map.true}
C) ${map['true'] or map['false']}
D) ${map.a and map.d}
E) ${map.d or map.a}
F) ${not map.c}
3. Click the Exhibit button.
The Appliance class is a Singleton that loads a set of properties into a Map from an external data source. Assume:
An instance of the Appliance class exists in the application-scoped attribute, appl
The appliance object includes the name property that maps to the value Cobia
The request-scoped attribute, prop, has the value name.
Which two EL code snippets will display the string Cobia? (Choose two.)
A) ${appl.properties[prop]}
B) ${appl.getProperties().get(prop)}
C) ${appl.getProperties().get('name')}
D) ${appl.properties.name}
E) ${appl.properties[name]}
F) ${appl.properties.prop}
4. The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows:
1 1. <sl:shoppingList>
1 2. <sl:item name="Bread" />
1 3. <sl:item name="Milk" />
1 4. <sl:item name="Eggs" />
15. </sl:shoppingList>
The tag handler for sl:shoppingList is ShoppingListTag and the tag handler for sl:item is
ItemSimpleTag.
ShoppingListTag extends BodyTagSupport and ItemSimpleTag extends
SimpleTagSupport.
Which is true?
A) ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling getParent() and casting the result to ShoppingListTag.
B) ShoppingListTag can find the child instances of ItemSimpleTag by calling super.getChildren() and casting each to an ItemSimpleTag.
C) ShoppingListTag can find the child instances of ItemSimpleTag by calling getChildren() on the PageContext and casting each to an ItemSimpleTag.
D) ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling findAncestorWithClass() on the PageContext and casting the result to ShoppingListTag.
E) It is impossible for ItemSimpleTag and ShoppingListTag to find each other in a tag hierarchy because one is a Simple tag and the other is a Classic tag.
5. Given an EL function foo, in namespace func, that requires a long as a parameter and returns a Map, which two are valid invocations of function foo? (Choose two.)
A) ${func(1)}
B) ${func:foo("easy")}
C) ${foo(5):func}
D) ${func:foo("3").name}
E) ${foo:func(4)}
F) ${func:foo(2)}
質問と回答:
| 質問 # 1 正解: A | 質問 # 2 正解: A、E、F | 質問 # 3 正解: A、D | 質問 # 4 正解: A | 質問 # 5 正解: D、F |














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