SUN Sun Certified Web Component Developer for J2EE 5 Sample Questions:
1. The tl:taskList and tl:task tags output a set of tasks to the response and are used as follows:
1 1. <tl:taskList>
1 2. <tl:task name="Mow the lawn" />
1 3. <tl:task name="Feed the dog" />
1 4. <tl:task name="Do the laundry" />
1 5. </tl:taskList>
The tl:task tag supplies information about a single task while the tl:taskList tag does the final output. The tag handler for tl:taskList is TaskListTag. The tag handler for tl:task is
TaskTag. Both tag handlers extend BodyTagSupport.
Which allows the tl:taskList tag to get the task names from its nested tl:task children?
A) Create an addTaskName method in TaskListTag. Have the TaskListTag.doStartTag method, return BodyTag.EVAL_BODY_BUFFERE In the TaskTag.doStartTag method, call super.getParent(), cast it to a TaskListTag, and call addTaskName().
B) In the TaskListTag.doStartTag method, call getChildTags() on the PageContext and iterate through the results. Cast each result to a TaskTag and call getName().
C) Create an addTaskName method in TaskListTag. Have the TaskListTag.doStartTag method, return BodyTag.EVAL_BODY_BUFFERED. In the TaskTag.doStartTag method, call findAncestorWithClass() on the PageContext, passing TaskListTag as the class to find.
Cast the result to TaskListTag and call addTaskName().
D) It is impossible for a tag handler that extends BodyTagSupport to communicate with its parent and child tags.
E) In the TaskListTag.doStartTag method, call super.getChildTags() and iterate through the results. Cast each result to a TaskTag and call getName().
2. Click the Exhibit button.
The h:highlight tag renders its body, highlighting an arbitrary number of words, each of which is passed as an attribute (word1, word2, ...). For example, a JSP page can invoke the h:highlight tag as follows:
1 1. <h:highlight color="yellow" word1="high" word2="low">
1 2. high medium low
1 3. </h:highlight>
Given that HighlightTag extends SimpleTagSupport, which three steps are necessary to implement the tag handler for the highlight tag? (Choose three).
A) add a getter and setter for the word1 and word2 attributes
B) add a doStartTag method
C) add a getter and setter for the color attribute
D) add a doTag method
E) implement the DynamicAttributes interface
F) create and implement a TagExtraInfo class
3. Which interface must a class implement so that instances of the class are notified after any object is added to a session?
A) javax.servlet.http.HttpSessionBindingListener
B) javax.servlet.http.HttpSessionListener
C) javax.servlet.http.HttpSessionValueListener
D) javax.servlet.http.HttpSessionAttributeListener
4. Which two statements are true about the security-related tags in a valid Java EE deployment descriptor? (Choose two.)
A) A given <web-resource-collection> tag can contain from zero to many <url-pattern> tags.
B) A <security-constraint> tag can have many <web-resource-collection> tags.
C) A given <auth-constraint> tag can apply to only one <web-resource-collection> tag.
D) Every <security-constraint> tag must have at least one <http-method> tag.
E) It is possible to construct a valid <security-constraint> tag such that, for a given resource, no user roles can access that resource.
5. Given:
1 . <% int[] nums = {42,420,4200};
2 . request.setAttribute("foo", nums); %>
3 . ${5 + 3 lt 6}
4 . ${requestScope['foo'][0] ne 10 div 0}
5 . ${10 div 0}
What is the result?
A) false true 0
B) false true Infinity
C) An exception is thrown.
D) true true Infinity
E) true true
F) Compilation or translation fails.
G) false true
Solutions:
| Question # 1 Answer: A | Question # 2 Answer: C,D,E | Question # 3 Answer: D | Question # 4 Answer: B,E | Question # 5 Answer: B |


PDF Version Demo






We are confident about the products and aim to help you pass with ease. In case of failure, we will provide a no hassle full money back guarantee for the purchasing fee.
899 Customer Reviews
Quality and ValueITbraindumps Practice Exams are written to the highest standards of technical accuracy, using only certified subject matter experts and published authors for development - no all study materials.
Tested and ApprovedWe are committed to the process of vendor and third party approvals. We believe professionals and executives alike deserve the confidence of quality coverage these authorizations provide.
Easy to PassIf you prepare for the exams using our ITbraindumps testing engine, It is easy to succeed for all certifications in the first attempt. You don't have to deal with all dumps or any free torrent / rapidshare all stuff.
Try Before BuyITbraindumps offers free demo of each product. You can check out the interface, question quality and usability of our practice exams before you decide to buy.