ALL
QUESTIONS AND CORRECT ANSWERS |
ALREADY GRADED A+
What is the HTTP 1.1 status code that indicates: Everything's fine? Select one:
a. 200
b. 101
c. 202
d. 201 - CORRECT ANSWER>>>>a
How does container initialize Servlet Object at deploy time?
a. The servlet must be declared into context deployment descriptor with servlet tag
b. The servlet must be declared into web deployment descriptor with servlet tag
c. The servlet must be declared into web deployment descriptor with servlet-mapping tag
d. The servlet does not need to be declared - CORRECT ANSWER>>>>b
What object will represent the output stream for the JSP page? a.
dispatch
b. out
c. response
d. writer - CORRECT ANSWER>>>>b
How do you manage database transaction in JDBC programming?
a. Database transaction management is depends on JDBC driver
b. Database transaction is managed by DBMS server, not by JDBC driver
Page | 1
,c. Turn on auto-commit mode to begin transaction, then commit/ rollback
d. Turn off auto-commit mode to begin transaction, then commit/ rollback - CORRECT
ANSWER>>>>d
Which is not method of the request object - an instance of HttpServletRequest.
a. sendRedirect(url)
b. getSession()
c. getCookies()
d. getParameterValues(name) - CORRECT ANSWER>>>>a
What are benefits of implements ModelDriven for action class? Choose 2 Select one or more:
a. All of the others
b. It depends on how many many model objects in application.
c. Struts will then populate the fields of this object with the request parameters, and this object
will be placed on top of the ValueStack once the action is executed.
d. Validation will also be performed on driven model object, instead of the action. - CORRECT
ANSWER>>>>c d
You can use the JSTL choose tag to perform conditional processing that's similar to an if
statement only in Java. Select one: a. True
b. False - CORRECT ANSWER>>>>b
What are benefits of implements ModelDriven for action class? Choose 2 Select one or more:
a. It depends on how many many model objects in application.
b. All of the others
c. Struts will then populate the fields of this object with the request parameters, and this object
will be placed on top of the ValueStack once the action is executed.
d. Validation will also be performed on driven model object, instead of the action. - CORRECT
ANSWER>>>>c d
,Which of the following is not a directive in JSP?
a. page
b. export
c. include
d. taglib - CORRECT ANSWER>>>>b
Which statement is true if the doStartTag method returns EVAL_BODY_BUFFERED ? Select
one:
a. The doAfterBody method is NOT called.
b. It is never legal to return EVAL_BODY_BUFFERED from doStartTag.
c. The tag handler must implement BodyTag.
d. The setBodyContent method is called once. - CORRECT ANSWER>>>>d
How many numbers are printed, when the following JSTL code fragment is executed? Select the
one correct answer.
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> ${item}
a. 11
b. 1
c. 5
d. 6 - CORRECT ANSWER>>>>d
Which of the following files is the correct name and location of deployment descriptor of a web
application?. Assume that the web application is rooted at \doc-root. Select the one correct
answer. Select one: a. \doc-root\dd.xml
b. \doc-root\web.xml
c. \doc-root\WEB_META\web.xml
d. \doc-root\WEB_INF\dd.xml
e. \doc-root\WEB-INF\web.xml - CORRECT ANSWER>>>>e
If ${snapshot} returns a correct connection to the database, the following statement will display:
Page | 3
, <sql:query dataSource="${snapshot}" var="result">
SELECT * FROM Students;
</sql:query>
<c:forEach var="row" items="${result.row}">
<c:out value="${row.stuId}" />
</c:forEach Select one:
a. The list of values of stuId in Students table.
b. Nothing
c. None of the other.
d. An error. - CORRECT ANSWER>>>>d
Which following methods of HttpServlet class stores a resource under the request URL?
a. doPut
b. doGet
c. doPost
d. doDelete
e. doHead
f. doTrace - CORRECT ANSWER>>>>a
If true value is passed in the element then it suggests that the attribute needs to be
evaluated at the time of request or during run time or dynamically. Select one: a. required
b. rtexprvalue
c. name
d. attribute - CORRECT ANSWER>>>>b
What gets printed when the following expression is evaluated? Select the one correct
answer.${(1==2) ? 4 : 5} a. 2
b. 3
c. 4
d. 5 - CORRECT ANSWER>>>>d