Oracle 1z0-899 Exam Practice Questions (P. 5)
- Full Access (108 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #21
You need to create a JavaBean object that is used only within the current ISP page. It must NOT be accessible to any other page including those that this page might import.
Which JSP standard action < .in accomplish this goal?
Which JSP standard action < .in accomplish this goal?
- A<jsp:useBean id = ‘pageBean’ type = ‘com.example.MyBean’ />
- B<jsp:useBean id = ‘pageBean’ class = ‘com.example.MyBean’ />
- C<jsp:makeBean id = ‘pageBean’ type = ‘com.example.MyBean’ />
- D<jsp:makeBean id = ‘pageBean’ class = ‘com.example.MyBean’ />
- E<jsp:useBean id = ‘pageBean’ class = ‘com.example.MyBean’ />
- F<jsp:makeBean id = ‘pageBean’ class = ‘com.example.MyBean’ />
Correct Answer:
B
B
send
light_mode
delete
Question #22
Given the JavaBean class:
public class MyBean {
private Boolean roasted = false;
public MyBean () {}
public Boolean isRoasted () { returned roasted }
public void setRoasted (Boolean roasted) { this.roasted = roasted; ]
}
Assume a controller has created an instance of this bean, called setRoasted (true), and inserted the bean into the application scope using the name "myBean".
A JSP contains these two tags:
<jsp: useBean id = "aBean" class = "MyBean" scope = "page" \ />
<jsp: getProprty name = "aBean" property = "roasted" \ />
Which is true?
public class MyBean {
private Boolean roasted = false;
public MyBean () {}
public Boolean isRoasted () { returned roasted }
public void setRoasted (Boolean roasted) { this.roasted = roasted; ]
}
Assume a controller has created an instance of this bean, called setRoasted (true), and inserted the bean into the application scope using the name "myBean".
A JSP contains these two tags:
<jsp: useBean id = "aBean" class = "MyBean" scope = "page" \ />
<jsp: getProprty name = "aBean" property = "roasted" \ />
Which is true?
- Athe page will include the output false
- Bthe page will include the output
- Cthe page will report that the property roasted does not exist
- Dthe page will report that the syntax of the useBean tag is incorrect
- Ethe page will report that the syntax of the getProperty tag ls incorrect
Correct Answer:
A
Reference:
http://www.emacao.gov.mo/documents/18/06/exam.pdf
(4th table from the top)
A
Reference:
http://www.emacao.gov.mo/documents/18/06/exam.pdf
(4th table from the top)
send
light_mode
delete
Question #23
A developer chooses to avoid using singieThreadModel but wants to ensure that data If; updated in a thread safe manner.
Which two can support this design goal? (Choose two)
Which two can support this design goal? (Choose two)
- AStore the data in a local variable.
- BStore the data in an instance variable.
- CStore the data in the Httpsession object.
- DStore the data in the sarvletContext object.
- EStore the data in the ServletRequest object.
Correct Answer:
AE
AE
send
light_mode
delete
Question #24
You have a use in your web application that adds several session-scoped attributes. At the end of the use case, one of these objects, the manage attribute, is removed and then it needs to decide which of the other session-scoped attributes to remove.
How can this goal be accomplished?
How can this goal be accomplished?
- AThe object of the manager attribute should implement the HttpSessionBindingListener and it should call the removeAttribute method on the appropriate session attributes.
- BThe object of the manager attribute should implement the HttpSessionListenar and it should call the removeAttribute method on the appropriate session attributes.
- CThe object of the manager attribute should implement the HttpSessionBindingListener rind it should call the deleteAttribute method on the appropriate session attributes.
- DThe object of the manager attribute should implement the HttpsessionListener and it should call the deleteAttribute method on the appropriate session
Correct Answer:
A
A
send
light_mode
delete
Question #25
The Squeaky Beans Inc. shopping application was initially developed for a non-distributed environment. The company recently purchased the Acme Application
Server, which supports distributed Httpsession objects. When deploying the application to the server, the doployer marks it as distributable in the web application deployment descriptor to take advantage of this feature.
Given this scenario, which two must be true? (Choose two)
Server, which supports distributed Httpsession objects. When deploying the application to the server, the doployer marks it as distributable in the web application deployment descriptor to take advantage of this feature.
Given this scenario, which two must be true? (Choose two)
- AThe J2EE web container must support migration of objects that implement serializable.
- BThe J2EE web container must use the native JVM Serialization mechanism for distributing HttpSesaion objects.
- CAs per the specification, the J2EE web container ensures that distributed Httpsassion objects will be stored in a database.
- DStoring references to Enterprise JavaBeans components in the HttpSession object might NOT supported by J2EE web contain.
Correct Answer:
AD
AD
send
light_mode
delete
All Pages