You work as a Software Developer for UcTech Inc. You want to use form-based authentication as a
security mechanism in your application. Which of the following entries will you use in your login page to
accomplish the task?
Each correct answer represents a part of the solution. Choose all that apply.
A. j_pw
B. j_security_check
C. password
D. _jid
E. j_username
F. j_password
G. jid
H. j_un
Mark works as a Programmer for InfoTech Inc. He develops a program that defines a class named
Inventory that has an instance variable named NumOfItems. Which of the following properties will be
applied by NumOfItems?
Each correct answer represents a complete solution. Choose all that apply.
A. It will not be visible in Static methods if it passed as a parameter.
B. It will be visible in Static methods if it passed as a parameter.
C. It will be available for all the instance methods of the class.
D. It becomes available for garbage collection if it is no longer in scope.
Which of the following statements about serialization are true? Each correct answer represents a complete solution. Choose all that apply.
A. Transient variables cannot be serialized.
B. Externalizable is a marker interface and does not define any method.
C. Serializable is a marker interface and does not define any method.
D. Static variables cannot be serialized.
Mark works as a Programmer for InfoTech Inc. He develops the following code snippet. class Auto {public
static void main(String args[])
{Character iob ='d';float i=iob;System.out.println(iob);}} What will be the result when Mark tries to execute
the code snippet?
A. It will display d.
B. It will show a runtime error.
C. It will show a compile-time error.
D. It will display 0.00.
Mark works as a Programmer for InfoTech Inc. He develops an application named AccountServlet. He
wants to ensure that no body can access his application, i.e., he does not want any role to have access on
his application. He defines the following security constraint for his application.
//code
Which of the following options will be used to secure his application?
A.
B. Skip the
C.
D.
Which of the following exceptions will be thrown if the commit() method fails?
A. DestroyFailedException
B. NullPointerException
C. LoginException
D. SecurityException
Which of the following elements indicates which users in specified roles are permitted access to a resource collection?
A. auth-constraint
B. user-data-constraint
C. web-resource-collection
D. login-config constraint
Which of the following data type values is returned by the System.in.read() console input function?
A. String
B. Character
C. Float
D. Integer
Which of the following is a mandatory sub-element of the
A.
B.
C.
D.
Mark works as a Programmer for InfoTech Inc. He develops a Web application that takes input from users. Which of the following methods can be used by the client and server to validate the users input? Each correct answer represents a complete solution. Choose all that apply.
A. Validation through Servlets on the server side
B. Validation using JavaScript on the client side
C. Validation through Java Applets on the client side
D. Validation through XML on the server side