live chatMcAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Pass4Test 10%OFF Discount Code

Oracle Java EE 6 Web Component Developer Certified Expert - 1Z0-899 Exam Questions

QUESTION NO: 1
Your web application requires the ability to load and remove web files dynamically to the web container's file system? Which two HTTP methods are used to perform these actions? (Choose two)
Correct Answer: A,F
QUESTION NO: 2
Given the fragment from Java EE deployment descriptor:
341. <error-page>
342. <exception-type>java.lang.Throwable</exception-type>
343. <location>/mainError.jsp</location>
344. </error-page>
345. <error-page>
346. <exception-type>java.lang.ClassCastException</exception-type>
347. <location>/castError.jsp</location>
348. </error-page>
If the web application associated with the fragment above throws a ClassCastException.
Which statement is true?
Correct Answer: C
QUESTION NO: 3
A popular Ajax framework and its companion widget library contain several hundreds of files of different types (.js, .ess, .html). Your company has mandated that all its web applications use only specific versions of this framework approved by IT and repackaged internally as jar files. Furthermore, web applications should only include the entire jar, without subsetting or modification.
Where should the framework's files be placed inside a jar file to enable this kind of reuse?
Correct Answer: D
QUESTION NO: 4
You are creating a JSP page to display a collection of data. This data can be displayed in several different ways so the architect on your project decided to create a generic servlet that generates a comma delimited string so that various pages can render the data in different ways. This servlet takes on request parameter:
objoctID. Assume that this servlet is mapped to the URL pattern: /WEB-INF/data.
In the JSP you are creating, you need to split this string into its elements separated by commas and generate an HTML <ul> list from the data.
Which JSTL code snippet will accomplish this goal?
Correct Answer: C
QUESTION NO: 5
An application stores session data in a JavaBean object. The object is then stored in the HttpSession object.
Which is true?
Correct Answer: B
QUESTION NO: 6
Given a war file with the following structure

where wf.jar contains a valid web-fragment.xml and the class MyServlet.class.
The following is a snippet of web.xml

The following is a snippet of web-fragment.xml

The following is code snippet of MyServlet:

What is the value of x inside doGet method of MyServlet?
Correct Answer: A
QUESTION NO: 7
You are building a dating web site. The client's date of birth is collected along with lots of other information.
The Person class has a derived method, getAge() :int, which returns the person's age calculated from the date of birth and today's date. In one of your JSPs you need to print a special message to clients within the age group of 25 through 35.
Which two EL code snippets will return true for this condition? (Choose two.)
Correct Answer: C,D
QUESTION NO: 8
Given the portion of a valid Java EE web application's directory structure:

You want to know whether File1.html, File2.html, and/or File3.html is protected from direct access by your web client's browsers. What statement is true?
Correct Answer: G
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 9
Given the annotation for MyServlet:
@WebServlet{"/abc")
@ServletSecurity (value=@HttpConstraint)
public class Myservlet extends Httpservlet {
Which two are true? (Choose two)
Correct Answer: A,C
QUESTION NO: 10
Assume a JavaBean com.example.GradedTestBean exists and has two attributes. The attribute name of type java.lang.string and the attribute score is of type jave.lang.Integer.
An array of com.example.GradedTestBean objects is exposed to the page in a request-scoped attribute called results. Additionally, an empty java.util.HashMap called resultMap is placed in the page scope.
A JSP page needs to add the first entry in results to resultMap, storing the name attribute of the bean as the key and the score attribute of the bean as the value.
Which code snippet of JSTL code satisfies this requirement?
Correct Answer: E