ExamGecko
Home Home / ECCouncil / 312-96

ECCouncil 312-96 Practice Test - Questions Answers, Page 4

Question list
Search
Search

List of questions

Search

Related questions











A developer to handle global exception should use _________ annotation along with @ExceptionHandler method annotation for any class

A.
@Advice
A.
@Advice
Answers
B.
@ControllerAdvice
B.
@ControllerAdvice
Answers
C.
@globalControllerAdvice
C.
@globalControllerAdvice
Answers
D.
@GlobalAdvice
D.
@GlobalAdvice
Answers
Suggested answer: B

Which of the following relationship is used to describe abuse case scenarios?

A.
Include Relationship
A.
Include Relationship
Answers
B.
Threatens Relationship
B.
Threatens Relationship
Answers
C.
Extend Relationship
C.
Extend Relationship
Answers
D.
Mitigates Relationship
D.
Mitigates Relationship
Answers
Suggested answer: B

To enable the struts validator on an application, which configuration setting should be applied in the struts validator configuration file?

A.
valid ate-'true'
A.
valid ate-'true'
Answers
B.
lsNotvalidate='disabled'
B.
lsNotvalidate='disabled'
Answers
C.
lsNotvalidate='false'
C.
lsNotvalidate='false'
Answers
D.
validate='enabled'
D.
validate='enabled'
Answers
Suggested answer: A

Suppose there is a productList.jsp page, which displays the list of products from the database for the requested product category. The product category comes as a request parameter value. Which of the following line of code will you use to strictly validate request parameter value before processing it for execution?

A.
public boolean validateUserName() {String CategoryId= request.getParameter('CatId');}
A.
public boolean validateUserName() {String CategoryId= request.getParameter('CatId');}
Answers
B.
public boolean validateUserName() { Pattern p = Pattern.compile('[a-zA-Z0-9]*$'); Matcher m = p.matcher(request.getParameter(CatId')); boolean result = m.matches(); return result;}
B.
public boolean validateUserName() { Pattern p = Pattern.compile('[a-zA-Z0-9]*$'); Matcher m = p.matcher(request.getParameter(CatId')); boolean result = m.matches(); return result;}
Answers
C.
public boolean validateUserName() { if(request.getParameter('CatId')!=null ) String CategoryId=request.getParameter('CatId');}
C.
public boolean validateUserName() { if(request.getParameter('CatId')!=null ) String CategoryId=request.getParameter('CatId');}
Answers
D.
public.boolean validateUserName() { if(!request.getParamcter('CatId').equals('null'))}Answer: B
D.
public.boolean validateUserName() { if(!request.getParamcter('CatId').equals('null'))}Answer: B
Answers
Suggested answer: B

A developer has written the following line of code to handle and maintain session in the application. What did he do in the below scenario?

A.
Maintained session by creating a Session variable user with value stored in uname variable.
A.
Maintained session by creating a Session variable user with value stored in uname variable.
Answers
B.
Maintained session by creating a HTTP variable user with value stored in uname variable.
B.
Maintained session by creating a HTTP variable user with value stored in uname variable.
Answers
C.
Maintained session by creating a Cookie user with value stored in uname variable.
C.
Maintained session by creating a Cookie user with value stored in uname variable.
Answers
D.
Maintained session by creating a hidden variable user with value stored in uname variable.
D.
Maintained session by creating a hidden variable user with value stored in uname variable.
Answers
Suggested answer: A

Which of the following configuration settings in server.xml will allow Tomcat server administrator to impose limit on uploading file based on their size?

A.
< connector... maxFileLimit='file size' / >
A.
< connector... maxFileLimit='file size' / >
Answers
B.
< connector... maxPostSize='0'/>
B.
< connector... maxPostSize='0'/>
Answers
C.
< connector... maxFileSize='file size' / >
C.
< connector... maxFileSize='file size' / >
Answers
D.
< connector... maxPostSize='file size' / >
D.
< connector... maxPostSize='file size' / >
Answers
Suggested answer: D

Identify the type of attack depicted in the following figure.

A.
Denial-of-service attack
A.
Denial-of-service attack
Answers
B.
SQL Injection attack
B.
SQL Injection attack
Answers
C.
Directory Traversal Attack
C.
Directory Traversal Attack
Answers
D.
Form Tampering Attack
D.
Form Tampering Attack
Answers
Suggested answer: C

Oliver is a web server admin and wants to configure the Tomcat server in such a way that it should not serve index pages in the absence of welcome files. Which of the following settings in CATALINA_HOME/conf/ in web.xml will solve his problem?

A.
< servlet > < servlet-name > default < /servlet-name > < servlet-class > org.apache.catalina.servlets.DefaultServlet < /servlet-class > < init-param > < param-name > debug < /param-name > < param-value > 0 < /param-value > < /init-param > < init-param > < param-name > listings < /param-name > < param-value > false < /param-value > < /init-param > < load-on-startup > 1 < /load-on-startup > < servlet >
A.
< servlet > < servlet-name > default < /servlet-name > < servlet-class > org.apache.catalina.servlets.DefaultServlet < /servlet-class > < init-param > < param-name > debug < /param-name > < param-value > 0 < /param-value > < /init-param > < init-param > < param-name > listings < /param-name > < param-value > false < /param-value > < /init-param > < load-on-startup > 1 < /load-on-startup > < servlet >
Answers
B.
< servlet > < servlet-name > default < /servlet-name > < servlet-class > org.apache.catalina.servlets.DefaultServlet < /servlet-class > < init-param > < param-name > debug < /param-name > < param-value > 0 < /param-value > < /init-param > < init-param > < param-name > listings < /param-name > < param-value > disable < /param-value> < /init-param > < load-on-startup > 1 < /load-on-startup> < /servlet >
B.
< servlet > < servlet-name > default < /servlet-name > < servlet-class > org.apache.catalina.servlets.DefaultServlet < /servlet-class > < init-param > < param-name > debug < /param-name > < param-value > 0 < /param-value > < /init-param > < init-param > < param-name > listings < /param-name > < param-value > disable < /param-value> < /init-param > < load-on-startup > 1 < /load-on-startup> < /servlet >
Answers
C.
< servlet > < servlet-name > default < /servlet-name > < servlet-class > org.apache.catalina.servlets.DefaultServlet < /servlet-class > < init-param > < param-name > debug < /param-name>< param-value> 0 < /param value>< /init-param > < init-param > < param-name> listings < /param-name > < param-value > enable < /param-value > < /init-param > < load-on-startup> 1 < /load-on-startup > < /servlet >
C.
< servlet > < servlet-name > default < /servlet-name > < servlet-class > org.apache.catalina.servlets.DefaultServlet < /servlet-class > < init-param > < param-name > debug < /param-name>< param-value> 0 < /param value>< /init-param > < init-param > < param-name> listings < /param-name > < param-value > enable < /param-value > < /init-param > < load-on-startup> 1 < /load-on-startup > < /servlet >
Answers
D.
< servlet > < servlet-name > default < servlet-name > < servlet-class > org.apache.catalina.servlets.DefaultServlet < /servlet-class > < init-param > < param-name > debug < /param-name> < param-value > 0 < /param-value > < /init-param > < init-param > < param-name > listings < /param-name > < param-value > true < /param-value > < /init-param > < load-on-startup > l < /load-on-startup > < /servlet >
D.
< servlet > < servlet-name > default < servlet-name > < servlet-class > org.apache.catalina.servlets.DefaultServlet < /servlet-class > < init-param > < param-name > debug < /param-name> < param-value > 0 < /param-value > < /init-param > < init-param > < param-name > listings < /param-name > < param-value > true < /param-value > < /init-param > < load-on-startup > l < /load-on-startup > < /servlet >
Answers
Suggested answer: B

The software developer has implemented encryption in the code as shown in the following screenshot.

However, using the DES algorithm for encryption is considered to be an insecure coding practice as DES is a weak encryption algorithm. Which of the following symmetric encryption algorithms will you suggest for strong encryption?

A.
MD5
A.
MD5
Answers
B.
SHA-1
B.
SHA-1
Answers
C.
Triple DES
C.
Triple DES
Answers
D.
AES
D.
AES
Answers
Suggested answer: D

James is a Java developer working INFR INC. He has written Java code to open a file, read it line by line and display its content in the text editor. He wants to ensure that any unhandled exception raised by the code should automatically close the opened file stream. Which of the following exception handling block should he use for the above purpose?

A.
Try-Catch-Finally block
A.
Try-Catch-Finally block
Answers
B.
Try-Catch block
B.
Try-Catch block
Answers
C.
Try-With-Resources block
C.
Try-With-Resources block
Answers
D.
Try-Catch-Resources block
D.
Try-Catch-Resources block
Answers
Suggested answer: C
Total 47 questions
Go to page: of 5