Which of the following elements are the subelements of the mime-mapping element in a deployment
descriptor file?
Each correct answer represents a complete solution. Choose all that apply.
A. exception-type
B. error-code
C. extension
D. mime-type
E. servlet-class
Which of the following statements about programmatic security are true? Each correct answer represents a complete solution. Choose all that apply.
A. The bean provider is responsible for writing code for programmatic security.
B. It is also called as instance level security.
C. It is implemented using methods of the EJBContext interface.
D. It is implemented using the methods of the UserTransaction interface.
Mark writes a class Practice.java. This class needs to access the com.bar.Test class that is stored in the Test.jar file in the directory /practice. How would you compile your code?
A. javac -classpath /practice/Test.jar Practice.java
B. javac -classpath /practice/ Practice.java
C. javac -classpath /practice/Test.jar/com/bar Practice.java
D. javac -classpath /practice Practice.java
Which of the following statements is true?
A. All UTF characters are eight bits long.
B. All UTF characters are all sixteen bits long.
C. All UTF characters are twenty four bits long.
D. All bytecode characters are sixteen bits long.
E. All unicode characters are sixteen bits long.
Which of the following statements about a JAR file are true? Each correct answer represents a complete solution. Choose all that apply.
A. It cannot be accessed through a class path, nor they can be used by java and javac.
B. It is used to compress and archive data.
C. It can be moved from one computer to another.
D. It is created by using the jar command.
Which of the following
A.
B.
C.
D.
You work as a Software Developer for UcTech Inc. You build an online book shop, so that users can purchase books using their credit cards. You want to ensure that only the administrator can access the credit card information sent by users. Which security mechanism will you use to accomplish the task?
A. Confidentiality
B. Authorization
C. Authentication
D. Data integrity
Which of the following circumstances can prevent the execution of code in a finally block? Each correct answer represents a complete solution. Choose two.
A. An exception arising in the try block that precedes the finally block.
B. An exception arising in the finally block itself.
C. No exception condition arising in the try block that precedes the finally block.
D. The use of the System.exit(0); statement in the finally block.
Roger works as a Software Developer for Tech Mart Inc. He creates an application using Enterprise
JavaBeans. In the bean class, he writes a code snippet as follows.
Boolean b = ctx.isCallerInRole("Administrator");
The application assembler named Bob declares the following entries within the
deployment descriptor.
1.
2.
The HR-Manager will have permission to access all the methods.
3.
4.
5.
Bob wants to ensure that HR-Manager declared in the deployment descriptor should have all the privileges
of an administrator. Which of the following elements should Bob declare in line 4 while deploying the
bean?
A.
B.
C.
D.
You work as a Software Developer for NewTech Inc. You write a bean class called EmployeeBean. The class contains two methods, EmpSal() and EmpAttendance(). Both these methods can be accessed by the ADMIN role. The EmpSal() method can be accessed only by the HR role, while the EmpAttendance () method can be accessed only by the DBA role. You want the EmpAttendance() method to be accessed by the HR role also. However, no other roles in the class except ADMIN, DBA, and HR should be able to access the EmpAttendance() method. Which of the following steps will you take to accomplish the task? Each correct answer represents a complete solution. Choose all that apply.
A. Use the
B. Use the @RunAs("ADMIN") annotation to allow the HR the privileges as ADMIN.
C. Use the @RunAs("DBA") annotation to allow the HR the privileges as DBA.
D. Use the
E. Use the @PermitAll annotation with the EmpAttendance() method to allow the HR to access the EmpAttendance() method.
Which of the following TextField constraints hides the input while a user is entering the data in the text box?
A. ANY
B. NUMERIC
C. PASSWORD
D. CONSTRAINT_MASK
Which of the following exceptions is thrown if a class uses the clone() method but does not implement the Cloneable interface?
A. CloneDoesNotExistException
B. ClassNotFoundException
C. CloneNotSupportedException
D. NullPointerException
Identify whether the given statement is true or false. "A try statement can be placed inside the code block that follows another try statement."
A. True
B. False
Which of the following methods evaluates the global policy for the permissions granted to the ProtectionDomain and tests whether the permission is granted?
A. implies
B. getPolicy
C. isPolicy
D. getType
Which of the following fields must be present in the login page when using the form-based authentication?
Each correct answer represents a part of the solution. Choose two.
A. j_login
B. j_password
C. get_pw
D. j_pw
E. j_username
F. user_pw