0% found this document useful (0 votes)
34 views22 pages

Progress Test 1 - Attempt Review

The document summarizes the student's progress on Test 1 for the course SE1502. The student answered 45 out of 50 questions correctly, earning a grade of 9 out of 10 or 90%. It provides details on each question, showing whether the answer was correct or incorrect and the marks earned.

Uploaded by

Vĩnh Trung
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views22 pages

Progress Test 1 - Attempt Review

The document summarizes the student's progress on Test 1 for the course SE1502. The student answered 45 out of 50 questions correctly, earning a grade of 9 out of 10 or 90%. It provides details on each question, showing whether the answer was correct or incorrect and the marks earned.

Uploaded by

Vĩnh Trung
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

7/15/2021 Progress Test 1 - SE1502: Attempt review

Started on Thursday, 17 June 2021, 4:08 PM


State Finished
Completed on Thursday, 17 June 2021, 4:58 PM
Time taken 50 mins
Marks 45.00/50.00
Grade 9.00 out of 10.00 (90%)

Question 1
Correct

Mark 1.00 out of 1.00

Which components are required to use in JSP page after custom tag implemented?

a. Custom taglib class that extends from tagext, tags file, declaration in both web.xml and JSP files

b. Custom taglib class that extends from JSTL, tld file, declaration in context.xml file

c. None of the others

d. Custom taglib class that extends from tagext, tld file, declaration in web deployment descriptor 

The correct answer is: Custom taglib class that extends from tagext, tld file, declaration in web deployment descriptor

Question 2
Correct

Mark 1.00 out of 1.00

What does the FilterChain do?

a. FilterChain is a function of the web.xml file

b. It invokes the next filter in the chain, or if the calling filter is the last filter in the chain, it invokes the resource at the end of the 
chain.

c. It invokes the first filter in the chain.

d. It does nothing.

The correct answer is: It invokes the next filter in the chain, or if the calling filter is the last filter in the chain, it invokes the resource at the
end of the chain.

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 1/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 3
Correct

Mark 1.00 out of 1.00

In the request life cycle of Struts 2, which component invokes the Interceptors to apply the common functionalities?

a. ActionServlet

b. FilterDispatcher

c. ActionMapping

d. ActionInvocation 

The correct answer is: ActionInvocation

Question 4
Correct

Mark 1.00 out of 1.00

The class java.sql.Timestamp has its super class as

a. java.sql.Date

b. java.util.Time

c. java.util.Date 

d. java.sql.Time

The correct answer is: java.util.Date

Question 5
Correct

Mark 1.00 out of 1.00

FTP uses the services of ________?

a. TCP 

b. PPP

c. IP

d. UDP

The correct answer is: TCP

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 2/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 6
Correct

Mark 1.00 out of 1.00

Choose option is NOT types of filters in JSP

a. Data Compression Filters

b. Authentication Filters

c. Logging Filters

d. Time Controlling Filters 

The correct answer is: Time Controlling Filters

Question 7
Correct

Mark 1.00 out of 1.00

What is NOT true about MVC Model 2 Architecture?

a. It is applied for little applications only, not for substantial applications 

b. The controller transmits the request, and selects a view for presenting data to the user.

c. The model represents the application object or data.

d. The view represents the user interface component of the data model

The correct answer is: It is applied for little applications only, not for substantial applications

Question 8
Correct

Mark 1.00 out of 1.00

Which one is the correct order of phases in JSP life cycle?

a. Initialization, Cleanup, Compilation, Execution

b. Initialization, Compilation, Cleanup, Execution

c. Compilation, Initialization, Execution, Cleanup 

d. Cleanup, Compilation, Initialization, Execution

The correct answer is: Compilation, Initialization, Execution, Cleanup

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 3/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 9
Correct

Mark 1.00 out of 1.00

When we are sending data in URL in get method, how to separate path and parameter?

a. By Comma

b. By underscore

c. By Semicolon

d. By question mark 

The correct answer is: By question mark

Question 10
Correct

Mark 1.00 out of 1.00

Which method is used to perform DML statements in JDBC?

a. execute()

b. executeResult()

c. executeUpdate() 

d. executeQuery()

The correct answer is: executeUpdate()

Question 11
Correct

Mark 1.00 out of 1.00

_______ are small pieces of information that are deposited on the client by the server.

a. Cookie 

b. Directive

c. Scriptlet

d. Session

The correct answer is: Cookie

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 4/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 12
Correct

Mark 1.00 out of 1.00

When clicking a link or entering raw URL in browser address bar, if


a Servlet is listening on the URL in question, then its _______ method will be called?

a. doPost()

b. doOptions()

c. doInit()

d. doGet() 

The correct answer is: doGet()

Question 13
Incorrect

Mark 0.00 out of 1.00

When destroy method() of servlet called?

a. When the servlet is executed for the first time.

b. When you remove the application from server

c. When the servlet is executed, it runs for the last time. 

d. When you close the browser window

The correct answer is: When you remove the application from server

Question 14
Correct

Mark 1.00 out of 1.00

Which is the methods of generated Servlet??

a. _jspDestroy()

b. _jspService()

c. _jspBuild()

d. _jspInit() 

The correct answers are: _jspInit(), _jspService(), _jspDestroy()

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 5/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 15
Correct

Mark 1.00 out of 1.00

Fill in the blank to display the value of variable “number”

a. <c:out value="${number}"></c:out> 

b. <c:out value="number"></c:out>

c. <c: value="${number}"></c:>

d. <c:out "${number}"></c:out>

Your answer is correct.


The correct answer is:
<c:out value="${number}"></c:out>

Question 16
Correct

Mark 1.00 out of 1.00

Which of the following statement is not correct about HTTP method?

a. A GET request append data to the end of the URL.

b. HTTP OPTIONS request for communication options available on the request/response chain

c. A POST request append data to the end of the URL. 

d. HTTP DELETE method request for the Server to delete the resource

The correct answer is: A POST request append data to the end of the URL.

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 6/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 17
Correct

Mark 1.00 out of 1.00

Which is true about TLD files?

a. TLD files can declare both Simple and Classic tags, but TLD files are NOT used to declare Tag files.

b. TLD files may be placed in the META-INF directory of the WAR file.

c. TLD files are used to configure JSP environment attributes, such as scripting-invalid.

d. TLD files may be placed in any subdirectory of WEB-INF. 

The correct answer is: TLD files may be placed in any subdirectory of WEB-INF.

Question 18
Correct

Mark 1.00 out of 1.00

___________ interface with all methods for contacting a database?

a. Driver

b. Connection 

c. Statement

d. ResultSet

The correct answer is: Connection

Question 19
Correct

Mark 1.00 out of 1.00

What object will represent the output stream for the JSP page?

a. response

b. out 

c. dispatch

d. writer

The correct answer is: out

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 7/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 20
Correct

Mark 1.00 out of 1.00

Given a web application in which the request parameter productID contains a product identifier. Which two EL expressions evaluate the
value of the productID? (Choose two.)

a. ${params.productID}

b. ${productID}

c. ${param.productID} 

d. ${paramValues.productID[0]} 

e. ${paramValues.productID}

f. ${params.productID[1]}

Your answer is correct.


The correct answers are:
${param.productID},

${paramValues.productID[0]}

Question 21
Correct

Mark 1.00 out of 1.00

What is NOT true about RequestDispatcher in Servlet?

a. Uses include method, the control retains with the current Servlet and it just includes the processing done by the calling of Servlet or
the JSP

b. provides the facility of dispatching the request to another resource it may be html, servlet or jsp

c. Uses getRequestDispatcher() method to return the forward/include object 

d. uses forward method, the control is transferred to the next Servlet or JSP the application is calling

The correct answer is: Uses getRequestDispatcher() method to return the forward/include object

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 8/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 22
Correct

Mark 1.00 out of 1.00

A ________has a name, a single value, and optional attributes such as a comment, path and domain qualifiers, a maximum age, and a version
number

a. cookie 

b. session

c. response

d. request

The correct answer is: cookie

Question 23
Correct

Mark 1.00 out of 1.00

How can you open a link in a new browser window?

a. <a href = "url" target ="open">

b. <a href = "url" target= "_blank"> 

c. <a href = "url".new>

d. <a href = "url" target = "new">

Your answer is correct.


The correct answer is:
<a href = "url" target= "_blank">

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 9/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 24
Incorrect

Mark 0.00 out of 1.00

Choose the correct way to use the JSTL Function Tags

a. <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

b. <%@ taglib uri="http://java.sun.com/jsp/jstl/JSTLFunctionTags prefix="fn" %>

c. <%@ taglib uri="http://java.sun.com/jsp prefix="c" %>

d. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 

Your answer is incorrect.

The correct answer is:


<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

Question 25
Correct

Mark 1.00 out of 1.00

Verification of a login name and password is known as?

a. accessibility

b. authentication 

c. configuration

d. logging in

The correct answer is: authentication

Question 26
Correct

Mark 1.00 out of 1.00

Which type of Statement can execute parameterized queries?

a. PreparedStatement. 

b. ParameterizedStatement and CallableStatement.

c. ParameterizedStatement.

d. Which implement a sub interface of Statement.

The correct answer is: PreparedStatement.

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 10/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 27
Correct

Mark 1.00 out of 1.00

Which interface is chosen to be extended by many tag handlers to create a custom tag?

a. BodyTagSupport

b. Tag 

c. TagSupport

d. IterationTag

e. BodyTag

The correct answer is: Tag

Question 28
Correct

Mark 1.00 out of 1.00

Which implicit object is supported in jsp page to access pageScope, requestScope, sessionScope, applicationScope?

a. pageContext object 

b. context object

c. scope object

d. application object

The correct answer is: pageContext object

Question 29
Correct

Mark 1.00 out of 1.00

Which of the following is not a part of Struts architecture?

a. Interceptors

b. Value Stack / OGNL

c. Actions

d. EJB 

The correct answer is: EJB

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 11/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 30
Correct

Mark 1.00 out of 1.00

Suppose we have the servlet “NewServlet” with the code to retrieve the value of parameter “gender” from the input.html

Please choose the correct HTML code from the input.html for the “gender”. Choose TWO:

a. Gender: <input type="checkbox" name="gender" value="male" checked />Male 

<input type="checkbox" name="gender" value="female" />Female

b. Gender: <input type="radio" name="gender" value="male" checked />Male 

<input type="radio" name="gender" value="female" />Female

c.
Gender: <input type="password" name="gender" value="male" checked />Male
<input type="password" name="gender" value="female" />Female

d. Gender: <input type="text" name="gender" value="male" checked />

<input type="text" name="gender" value="female"/>

Your answer is correct.


The correct answers are:

Gender: <input type="radio" name="gender" value="male" checked />Male


<input type="radio" name="gender" value="female" />Female,

Gender: <input type="checkbox" name="gender" value="male" checked />Male


<input type="checkbox" name="gender" value="female" />Female

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 12/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 31
Correct

Mark 1.00 out of 1.00

Which statement is CORRECT about Struts 2?

a. Implements the Action interface.

b. Provide a single tag library. 

c. Uses JSTL.

d. Provides multiple tag libraries.

The correct answer is: Provide a single tag library.

Question 32
Correct

Mark 1.00 out of 1.00

In web application, these tasks such as authentication-blocking of requests, data compression, logging and auditing are performed by

a. servlet config

b. servlet context

c. servlet filter 

d. servlet container

The correct answer is: servlet filter

Question 33
Correct

Mark 1.00 out of 1.00

What does the FilterChain do?

a. It invokes the first filter in the chain.

b. It does nothing.

c. FilterChain is a function of the web.xml file

d. It invokes the next filter in the chain, or if the calling filter is the last filter in the chain, it invokes the resource at the end of the 
chain.

The correct answer is: It invokes the next filter in the chain, or if the calling filter is the last filter in the chain, it invokes the resource at the
end of the chain.

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 13/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 34
Correct

Mark 1.00 out of 1.00

What http method send by browser that gives the server what user data typed in the form?

a. post 

b. put

c. delete

d. head

The correct answer is: post

Question 35
Correct

Mark 1.00 out of 1.00

Which statements about JDBC are NOT true?

a. JDBC provides a standard API for tool/database developers and makes it possible to write database applications using a pure Java
API.

b. It consists of a set of classes and interfaces written in the Java


programming language.

c. The combination of Java and JDBC lets a programmer write it once and run it anywhere.

d. JDBC is a Java database system. 

The correct answer is: JDBC is a Java database system.

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 14/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 36
Correct

Mark 1.00 out of 1.00

To connect to the database, which JSTL tag do we use?

a. <sql:setDatabase>

b. <sql:setConnection>

c. <sql:setDataSource> 

d. <sql:setDataBase>

Your answer is correct.

The correct answer is:


<sql:setDataSource>

Question 37
Correct

Mark 1.00 out of 1.00

HttpServletRequest request and HttpServletResponse response, which sets a cookie "username" with the value "joe" in a servlet?

a. response.addCookie( "username", "joe")

b. response.addHeader( new Cookie( "username", "joe"))

c. response.addCookie( new Cookie( "username", "joe")) 

d. request.addCookie( "username", "joe")

e. request.addHeader( new Cookie( "username", "joe"))

Your answer is correct.

The correct answer is:


response.addCookie( new Cookie( "username", "joe"))

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 15/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 38
Incorrect

Mark 0.00 out of 1.00

Which among the following components acts as a Controller in Struts 2 framework? Choose TWO answer.

a. ActionMapper 

b. FilterDispatcher

c. Configuration Manager

d. Interceptors

Your answer is incorrect.


The correct answers are:
FilterDispatcher,

Interceptors

Question 39
Correct

Mark 1.00 out of 1.00

In the request life cycle of Struts 2, which component invokes the Interceptors to apply the common functionalities?

a. ActionServlet

b. FilterDispatcher

c. ActionInvocation 

d. ActionMapping

The correct answer is: ActionInvocation

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 16/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 40
Correct

Mark 1.00 out of 1.00

You are creating a web form with this HTML:

Which HTTP method is used when user press the “Login” button from the browser?

a. GET 

b. POST

c. SEND

d. PUT

Your answer is correct.

The correct answer is:


GET

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 17/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 41
Correct

Mark 1.00 out of 1.00

Please choose the right code to display information as bellows:

Your chosen Books[quantity*price] are:


Java [3 * $10] = 30
C# [5 * $15] = 75

a. Your chosen Books[quantity*price] are:

<ul>
<li>Java [3 * $10] = $[3*10]</li>

<li>C# [5 * $15] = $[5*15]</li>


</ul>

b. Your chosen Books[quantity*price] are: 


<ul>

<li>Java [3 * $10] = ${3*10}</li>


<li>C# [5 * $15] = ${5*15}</li>

</ul>

c. Your chosen Books[quantity*price] are:

Java [3 * $10] = ${3*10}


C# [5 * $15] = ${5*15}

d. Your chosen Books[quantity*price] are:

<ul>
<li>Java [3 * $10] = {3*10}</li>

<li>C# [5 * $15] = {5*15}</li>


</ul>

Your answer is correct.

The correct answer is: Your chosen Books[quantity*price] are:


<ul>
<li>Java [3 * $10] = ${3*10}</li>
<li>C# [5 * $15] = ${5*15}</li>
</ul>

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 18/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 42
Incorrect

Mark 0.00 out of 1.00

Which following methods of HttpServlet class stores a resource under the request URL?

a. doPost

b. doPut

c. doTrace

d. doHead

e. doDelete

f. doGet 

The correct answer is: doPut

Question 43
Correct

Mark 1.00 out of 1.00

Suppose we write the Servlet “EditServlet” to delete the student based on “id” using delete(id) method and then display the list in
“display.jsp”. Please try to fill the *Position1*, *Position2* and *Position3* to make the code complete.

a. action, list, getRequestDispatcher 

b. “action”, “list”, getRequest

c. id, listStudent, getRequest

d. id, listStudent, getRequestDispatcher

Your answer is correct.

The correct answer is:


action, list, getRequestDispatcher

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 19/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 44
Correct

Mark 1.00 out of 1.00

Choose the option to make jsp page as an error page?

a. Session= “true”

b. isErrorPage= “false”

c. isErrorPage= “true” 

d. Session= “false”

Your answer is correct.


The correct answer is:
isErrorPage= “true”

Question 45
Correct

Mark 1.00 out of 1.00

Which of the following is not a directive in JSP?

a. page

b. taglib

c. include

d. export 

The correct answer is: export

Question 46
Correct

Mark 1.00 out of 1.00

Which method we must override in the extend ActionSupport class to provide the implementation of validation in Struts 2?

a. input() method

b. validate() method for each input data

c. validate() method 

d. checkParams() method

The correct answer is: validate() method

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 20/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 47
Correct

Mark 1.00 out of 1.00

Consider the following HTML page code, which method can be used in subjectServlet to retrieve the value of “language” parameter, when
the form is submitted.

a.
String java = request.getParameterValues("Java");
String cs = request.getParameterValues("C#");

b. String[] languages = request.getParameterValues("language"); 

c. String java = request.getParameterValues("java");

String cs = request.getParameterValues("cs");

d. String languages = request.getParameterValues("language");

Your answer is correct.


The correct answer is: String[] languages = request.getParameterValues("language");

Question 48
Correct

Mark 1.00 out of 1.00

Select the method to get form data into jsp?

a. getParameter()

b. request.getParameter() 

c. request.getString()

d. request.getparameter()

The correct answer is: request.getParameter()

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 21/22
7/15/2021 Progress Test 1 - SE1502: Attempt review

Question 49
Correct

Mark 1.00 out of 1.00

What type of servlets use these methods such as doGet(), doPost(),doHead, doDelete(), doTrace()?

a. GenereicServlets

b. HttpServlets 

c. RequestServlets

d. ConfigServlets

The correct answer is: HttpServlets

Question 50
Incorrect

Mark 0.00 out of 1.00

Which of the following components is used by application to work with database server?

a. Connection

b. DriverManager

c. JDBC driver

d. Statement 

The correct answer is: Connection

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=30548&cmid=8727&showall=1 22/22

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy