Professional Documents
Culture Documents
Question 1
Correct
In order to get the value from the request parameter, please choose the correct code
Question 2
Correct
You cannot use the JSTL forEach tag to loop through most types of collections, including regular arrays.
Select one:
True
False
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 1/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 3
Correct
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.
Select one:
a. request
b. session
c. cookie
d. response
Question 4
Correct
Select one:
a. In struts 2 ValueStack represents a stack that contains the references of application specific objects.
b. When a request come an object of ValueStack is created first and after it object of Action, Model or any other java resources are
created
c. Retrieve via
ActionContext.getContext().getValueStack()
e. It contains the maps of object like Request Parameters, Request Attributes, Session Attributes and Application Attributes.
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 2/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 5
Correct
Select one:
a. Delegate call to business logic by the means of action methods which is mapped to request and contains business data
Question 6
Correct
Which of the following error code is associated with the message "Resource not found”?
a. 403
b. 404
c. 500
d. 401
Question 7
Correct
Before you can use JSTL tags within a JSP, you must code a import directive that identifies the JSTL library and its prefix.
Select one:
True
False
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 3/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 8
Correct
Which Custom tag is used to dynamically add the contents from the provided URL to the current page at request time?
a. <c:content>
b. <c:include>
c. <c:embedd=8ed>
d. <c:import>
Question 9
Correct
Before you can use JSTL tags within an application, you must make the jstl-impl.jar and jstl-api.jar files available to the application.
Select one:
True
False
Question 10
Incorrect
What gets printed when the following expression is evaluated? Select the one correct answer.$
{
~1
~2
~4
=5
}
Answer: ${~1~2~4=5}
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 4/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 11
Correct
What is servlet? (Choose 2)
b. Servlet is a class that extends the capabilities of the servers and responds to the incoming requests. It can respond to any requests
c. Servlet is a web component that is deployed on the server to create a static web page
The correct answers are: Servlet is an interface that must be implemented for creating any Servlet., Servlet is a class that extends the
capabilities of the servers and responds to the incoming requests. It can respond to any requests
Question 12
Correct
a. +
b. *
c. %
d. ?
Question 13
Correct
JSP ________ let you insert arbitrary code into the servlet's _JspService() method.
a. comment
b. scriptlets
c. custom tag
d. declarations
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 5/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 14
Correct
b. Filter intercept requests from a client before they access a resource at back end.
c. doFilter method is called by the container each time a request/response pair is passed through the chain due to a client request for a
resource at the end of the chain
d. Filter manipulate responses from server before they are sent back to the client.
The correct answer is: Init method is called by the JSP Filter to indicate to a filter
Question 15
Correct
Please choose the option in the blank ____________, when the web developers want to include the value of command and studentID without
being seen or modified by users when a form is submitted?
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 6/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 16
Correct
When compiling a project in java web, which of the following error codes is associated with the "Resource not found" message?
a. 500
b. 403
c. 400
d. 404
Question 17
Correct
The correct answer is: Filters are defined in the deployment descriptor file web.xml
Question 18
Correct
The value of session timeout in web deployment descriptor using the unit of ......
a. Hour
b. Second
c. Minute
d. Millisecond
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 7/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 19
Correct
A JSP page needs to generate an XML file. Which attribute of page directive may be used to specify that the JSP page is generating an XML
file.
Question 20
Correct
Suppose we have the model CalculatorModel class, please fill in the blank to add the value of model to the object request.
a. request.setValueOf
b. request.getRequestDispatcher
c. request.setAttribute
d. request.getAttribute
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 8/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 21
Incorrect
Choose the statement that best describes the relationship between JSP and servlets:
a. Servlets and JSP are competing technologies for handling web requests. Servlets are being superseded by JSP, which is preferred.
The two technologies are not useful in combination.
b. JSPs are built on servlet semantics and all JSPs are translaled to servlets for runtime usage.
d. Servlets are built on JSP semantics and all servlets are compiled to JSP pages for runtime usage.
The correct answer is: JSPs are built on servlet semantics and all JSPs are translaled to servlets for runtime usage.
Question 22
Incorrect
What is the expired time of the cookie if we set the value of time = 0.5
a. 60 minutes
b. 1.800 minutes
c. 45 minutes
d. 30 minutes
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 9/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 23
Correct
Question 24
Correct
The correct answer is: URL where server runs, UserID, Password
Question 25
Correct
b. It consists of a set of classes and interfaces written in the Java programming language.
c. JDBC provides a standard API for tool/database developers and makes it possible to write database applications using a pure Java API.
d. The combination of Java and JDBC lets a programmer write it once and run it anywhere.
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 10/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 26
Correct
b. ${ product}
c. 0 2 4 6 8 10
d. 0 1 2 3 4 5 6 7 8 9 10
Question 27
Correct
The correct answer is: forward executes on the server while sendRedirect() executes on the client.
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 11/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 28
Correct
Question 29
Correct
Why use RequestDispatcher to forward a request to another resource, instead of using a sendRedirect?
c. The RequestDispatcher does not require a round trip to the client, and thus is more efficient and allows the server to maintain
request state.
The correct answer is: The RequestDispatcher does not require a round trip to the client, and thus is more efficient and allows the server to
maintain request state.
Question 30
Correct
The correct answer is: Used for sending huge amounts of information having visible in a URL.
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 12/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 31
Correct
Please correct the code as bellowing, supposed that the parameters in sql has String value.
a. statement.setString()
b. statement.setValueString
c. statement.setString
d. statement.setTypeCastString
Question 32
Correct
a. Servlet
b. Applet
c. Application
d. Midlet
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 13/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 33
Correct
a. Scriptlet tag
b. Application tag
c. Declaration Tag
d. Expression tag
Question 34
Correct
Which of the following listeners will respond to events that a request comes to server or gets out of its scope?
a. ServletResponseListener
b. ServletRequestAttributeListener
c. ServletContextListener
d. ServletRequestListener
Question 35
Correct
a. executeUpdate()
b. executeResult()
c. executeQuery()
d. execute()
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 14/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 36
Correct
b. StudyTonight
c. Final Test
Question 37
Correct
The correct answer is: A filter is an object that is invoked at the preprocessing and postprocessing of a request.
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 15/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 38
Correct
Choose the corect JSTL statement to check whether the emptyCart is empty or not?
c.
<c:if test="${emptyCart == null}">
<p>Your cart is empty.</p>
</c:if>
Question 39
Correct
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 16/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 40
Correct
When compiling a project in java web, which of the following error code indicates an error inside the HTTP server which prevents it from
fulfilling the request?
a. 403
b. 500
c. 400
d. 404
Question 41
Correct
Which HTTP method is used when sending request from the browser?
a. GET
b. POST
c. SET
d. PUT
Question 42
Correct
The correct answer is: called only once at the end of the life cycle of a filter
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 17/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 43
Incorrect
a. Checking whether the username equals “admin” and password equals “abc123” or not.
c. Checking whether the username equals “admin” and password equals “abc123” or not. If yes, forward the requests to admin-
index.jsp
d. Checking whether the username equals “admin” and password equals “abc123” or not. If yes, forward the requests to index.jsp
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 18/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 44
Correct
Suppose we have the model class Student {private int id;}, now to set up a link for “Update” Action in jsp page and then send the Id value of
student object to the Servlet StudentControllerServlet.
a. @{student.id}
b. ${student.id}
c. {student.id}
d. ${student}
Question 45
Incorrect
In JSTL, which type of Java conditional statement is the tag similar to?
a. switch
b. if
c. when
d. foreach
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 19/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 46
Correct
Question 47
Incorrect
In the web deployment descriptor, the tag of tag is used for _________
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 20/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
Question 48
Correct
a. View
b. XML
c. Model
d. Controller
Question 49
Incorrect
a. ”false”
b. isErrorPage
c. ”true”
d. isErrorPage
e. session.setAttribute(“false”)
f. session.setAttribute(“true”)
Question 50
Correct
a. Statement
b. CallableStatement
c. PreparedStatement
d. QueryStatement
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 21/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 22/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 23/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 24/25
27/7/2021 Progress Test 2 - SE1502_3: Attempt review
https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=32661&cmid=8998 25/25