Free Oracle 1Z0-858 Practice Test & Real Exam Questions

  • Exam Code/Number: 1Z0-858
  • Exam Name/Title: Java Enterprise Edition 5 Web Component Developer Certified Professional Exam
  • Certification Provider: Oracle
  • Corresponding Certification: Java Technology
  • Exam Questions: 276
  • Updated On: Aug 26, 2026
Which activity supports the data integrity requirements of an application?
Correct Answer: B Vote an answer
Click the Exhibit button.
Assume the product attribute does NOT yet exist in any scope.
Which two create an instance of com.example.Product and initialize the name and price
properties to the name and price request parameters? (Choose two.)
Correct Answer: A,C Vote an answer
Given:
11.
<servlet>
12.
<servlet-name>catalog</servlet-name>
13.
<jsp-file>/catalogTemplate.jsp</jsp-file>
14.
<load-on-startup>10</load-on-startup>
15.
</servlet>
Which two are true? (Choose two.)
Correct Answer: A,D Vote an answer
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.)
Correct Answer: A,F Vote an answer
Given that a scoped attribute cart exists only in a user's session, which two, taken independently, ensure the scoped attribute cart no longer exists? (Choose two.)
Correct Answer: C,G Vote an answer
Which two actions protect a resource file from direct HTTP access within a web application? (Choose two.)
Correct Answer: B,E Vote an answer
After a merger with another small business, your company has inherited a legacy WAR file but the original source files were lost. After reading the documentation of that web
application, you discover that the WAR file contains a useful tag library that you want to reuse in your own webapp packaged as a WAR file.
What do you need to do to reuse this tag library?
Correct Answer: D Vote an answer
Your company has a corporate policy that prohibits storing a customer's credit card number in any corporate database. However, users have complained that they do NOT want to reenter their credit card number for each transaction. Your management has decided to use client-side cookies to record the user's credit card number for 120 days. Furthermore, they also want to protect this information during transit from the web browser to the web container; so the cookie must only be transmitted over HTTPS.
Which code snippet creates the "creditCard" cookie and adds it to the out going response to be stored on the user's web browser?
Correct Answer: A Vote an answer
You want to create a filter for your web application and your filter will implement javax.servlet.Filter.
Which two statements are true? (Choose two.)
Correct Answer: C,D Vote an answer
Click the Exhibit button.
Assuming the tag library in the exhibit is imported with the prefix stock, which custom tag invocation outputs the contents of the variable exposed by the quote tag?
Correct Answer: B Vote an answer
You are building a dating service web site. Part of the form to submit a client's profile is a group of radio buttons for the person's hobbies:
20.
<input type='radio' name='hobbyEnum' value='HIKING'>Hiking <br>
21.
<input type='radio' name='hobbyEnum' value='SKIING'>Skiing <br>
22.
<input type='radio' name='hobbyEnum' value='SCUBA'>SCUBA Diving
23.
<!-- and more options -->
After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume that an application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the display name.
Which EL code snippet will display Nth element of the user's selected hobbies?
Correct Answer: E Vote an answer
Given tutorial.jsp:
2.<h1>EL Tutorial</h1>
3.<h2>Example 1</h2>
4.<p>
5.Dear ${my:nickname(user)}
6.</p>
Which, when added to the web application deployment descriptor, ensures that line 5 is included verbatim in the JSP output?
Correct Answer: C Vote an answer