0% found this document useful (0 votes)
101 views8 pages

Sun Certified Web Component Developer For J2EE 5

This free version contains 10 full length questions selected from our full version products which have more than 200 questions each. It is designed to help you learn the concepts behind the questions rather than be a strict memorization tool. Go through the entire document at least twice so that you make sure that you are not missing anything.

Uploaded by

Oindrila Ghosh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views8 pages

Sun Certified Web Component Developer For J2EE 5

This free version contains 10 full length questions selected from our full version products which have more than 200 questions each. It is designed to help you learn the concepts behind the questions rather than be a strict memorization tool. Go through the entire document at least twice so that you make sure that you are not missing anything.

Uploaded by

Oindrila Ghosh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

310-083

Sun Certified Web Component Developer for J2EE 5

Q&A

DEMO Version

Copyright (c) 2007 Chinatag LLC. All rights reserved.


Important Note
Please Read Carefully

For demonstration purpose only, this free version Chinatag study guide contains 10 full length questions selected
from our full version products which have more than 200 questions each.

This Study guide has been carefully written and compiled by Chinatag certification experts. It is designed to help you
learn the concepts behind the questions rather than be a strict memorization tool. Repeated readings will increase
your comprehension.

For promotion purposes, all PDF files are not encrypted. Feel free to distribute copies among your friends and let
them know Chinatag website.

Study Tips
This product will provide you questions and answers along with detailed explanations carefully compiled and written
by our experts. Try to understand the concepts behind the questions instead of cramming the questions. Go through
the entire document at least twice so that you make sure that you are not missing anything.

Latest Version
We are constantly reviewing our products. New material is added and old material is revised. Free updates are
available for 90 days after the purchase. You should check the products page on the http://www.chinatag.com
website for an update 3-4 days before the scheduled exam date.

Please tell us what you think of our products. We appreciate both positive and critical comments as your feedback
helps us improve future versions. Feedback on specific questions should be send to feedback@chinatag.com.

Thanks for purchasing our products and look forward to supplying you with all your Certification training needs.

Good studying!

Technical and Support Team


Chinatag LLC.

Leading the way in IT testing and certification tools, www.chinatag.com

-2-
310-083

Question: 1
To take advantage of the capabilities of modern browsers that use web standards, such as
XHTML and CSS, your web application is being converted from simple JSP pages to JSP
Document format. However, one of your JSPs, /scripts/screenFunctions.jsp, generates a
JavaScript file. This file is included in several web forms to create screen-specific validation
functions and are included in these pages with the following statement:
10. <head>
11. <script src='/scripts/screenFunctions.jsp'
12. language='javascript'
13. type='application/javascript'> </script>
14. </head>
15. <!-- body of the web form -->
Which JSP code snippet declares that this JSP Document is a JavaScript file?
A. <%@ page contentType='application/javascript' %>
B. <jsp:page contentType='application/javascript' />
C. <jsp:document contentType='application/javascript' />
D. <jsp:directive.page contentType='application/javascript' />
E. No declaration is needed because the web form XHTML page already declares the
MIME type of the /scripts/screenFunctions.jsp file in the <script> tag.

Answer: D

Question: 2
Given the JSP code:

1. <html>
2. <body>
3. <jsp:useBean id='customer' class='com.example.Customer' />
4. Hello, ${customer.title} ${customer.lastName}, welcome
5. to Squeaky Beans, Inc.
6. </body>
7. </html>

Which three types of JSP code are used? (Choose three.)

A. Java code
B. template text
C. scripting code
D. standard action
E. expression language

Answer: B, D, E

Question: 3
You have built a collection of custom tags for your web application. The TLD file is located in the
file: /WEB-INF/myTags.xml. You refer to these tags in your JSPs using the symbolic name:
myTags. Which deployment descriptor element must you use to make this link between the
symbolic name and the TLD file name?

A. <taglib> <name>myTags</name>
<location>/WEB-INF/myTags.xml</location> </taglib>

3
310-083

B. <tags> <name>myTags</name>
<location>/WEB-INF/myTags.xml</location> </tags>
C. <tags> <tags-uri>myTags</taglib-uri>
<tags-location>/WEB-INF/myTags.xml</tags-location> </tags>
D. <taglib> <taglib-uri>myTags</taglib-uri>
<taglib-location>/WEB-INF/myTags.xml</taglib-location> </taglib>

Answer: D

Question: 4
Which implicit object is used in a JSP page to retrieve values associated with <context-param>
entries in the deployment descriptor?

A. config
B. request
C. session
D. application

Answer: D

Question: 5
Click the Task button.

Answer:

4
310-083

Question: 6
Click the Task button. Place the code snippets in the proper order to construct the JSP code to
import static content into

Answer:

5
310-083

Question: 7

You have created a JSP that includes instance variables and a great deal of scriptlet code.
Unfortunately, after extensive load testing, you have discovered several race conditions in your
JSP scriptlet code. To fix these problems would require significant recoding, but you are already
behind schedule. Which JSP code snippet can you use to resolve these concurrency problems?
A. <%@ page isThreadSafe='false' %>
B. <%@ implements SingleThreadModel %>
C. <%! implements SingleThreadModel %>
D. <%@ page useSingleThreadModel='true' %>
E. <%@ page implements='SingleThreadModel' %>

Answer: A

Question: 8

Click the Exhibit button. The attribute "name" has a


value of "Foo," What is the result if this tag handler's
tag is invoked?

6
310-083

A. Foo
B. done
C. Foodone
D. An exception is thrown at runtime.
E. No output is produced from this code.
F. Compilation fails because of an error in this code.

Answer: A

Question: 9
You are building a web application that will be used throughout the European Union; therefore, it
has significant internationalization requirements. You have been tasked to create a custom tag
that generates a message using the java.text.MessageFormat class. The tag will take the
resourceKey attribute and a variable number of argument attributes with the format, arg<N>. Here
is an example use of this tag and its output: <t:message resourceKey='diskFileMsg'
arg0='MyDisk' arg1='1247' /> generates: The disk "MyDisk" contains 1247 file(s). Which Simple
tag class definition accomplishes this goal of handling a variable number of tag attributes?

A. public class MessageTag extends SimpleTagSupport


implements VariableAttributes { private Map attributes
= new HashMap(); public void
setVariableAttribute(String uri, String name, Object
value) { this.attributes.put(name, value); }
// more tag handler methods }

7
310-083

B. The Simple tag model does NOT support a variable number of attributes.
C. public class MessageTag extends SimpleTagSupport
implements DynamicAttributes { private Map attributes
= new HashMap(); public void putAttribute(String name
Object value) { this.attributes.put(name, value); } //
more tag handler methods }
D. public class MessageTag extends SimpleTagSupport
implements VariableAttributes { private Map attributes
= new HashMap(); public void putAttribute(String name
Object value) { this.attributes.put(name, value); } //
more tag handler methods }
E. public class MessageTag extends SimpleTagSupport
implements DynamicAttributes { private Map
attributes = new HashMap(); public void
setDynamicAttribute(String uri, String name, Object
value) { this.attributes.put(name, value); } // more tag
handler methods }

Answer: E

Question: 10
Given the JSP code: <%
request.setAttribute("foo", "bar"); %> and
the Classic tag handler code:
1. public int doStartTag() throws JspException {
2. // insert code here
3. // return int
4. } Assume there are no other "foo" attributes in the web application. Which invocation on
the pageContext object, inserted at line 6, assigns "bar" to the variable x?

A. String x = (String) pageContext.getAttribute("foo");


B. String x = (String) pageContext.getRequestScope("foo");
C. It is NOT possible to access the pageContext object from within doStartTag.
D. String x = (String) pageContext.getRequest().getAttribute("foo");
E. String x = (String) pageContext.getAttribute("foo", PageContext.ANY_SCOPE);

Answer: D

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy