Vous êtes sur la page 1sur 4

Q 1 - _jspService() method of HttpJspPage class should not be overridden.

A - True

B - False

Answer : A
Explaination
JSP container creates _jspService() methods so it should not be overridden.
Hide Answer

Q 2 - Which of the following is a server side technology?

A - html

B - jsp

C - javaScript

D - css

Answer : B
Explaination
jsp is a server side technology.
Hide Answer

Q 3 - All servlet classes are required to be mapped and configured in web.xml.

A - True

B - False

Answer : A
Explaination
Yes, all servlets are required to be mapped/configured in web.xml
Hide Answer

Q 4 - Which of the following attribute is used to mark a page as error processing page?

A - isErrorPage

B - errorPage

C - exception

D - exceptionPage
Answer : A
Explaination

<%@ page isErrorPage="true" %>

Within jsp, indicate that it is an error-processing page, using the above directive.
Show Answer

Q 5 - Which of the following method can be used to read a multiple values with same
name, for example check box selections?

A - request.getParameter()

B - response.getParameter()

C - request.getParameterValues()

D - response.getParameterValues()

Answer : C
Explaination
You call request.getParameterValues() method to get the value of a form parameter if
the parameter appears more than once and returns multiple values.
Show Answer

Q 6 - Which of the following is true about autoFlush Attribute?

A - The autoFlush attribute can specify that buffered output should be flushed
automatically when the buffer is filled.

B - The autoFlush attribute can specify that an exception should be raised to indicate
buffer overflow.

C - Both of the above.

D - None of the above.

Answer : C
Explaination
The autoFlush attribute specifies whether buffered output should be flushed
automatically when the buffer is filled, or whether an exception should be raised to
indicate buffer overflow.
Hide Answer
Q 7 - What will happen if isScriptingEnabled attribute is set as false?

A - A translation-time error will be raised if the JSP uses any scriptlets, expressions
(non-EL), or declarations.

B - JSP container will ignore the any scriptlets, expressions (non-EL), or declarations
similar to comments.

C - Both of the above.

D - None of the above.

Answer : A
Explaination
A translation-time error will be raised if the JSP uses any scriptlets, expressions (non-
EL), or declarations.
Hide Answer

Q 8 - Which of the following is true about Cleanup phase in JSP life cycle?

A - The destruction phase of the JSP life cycle represents when a JSP is being removed
from use by a container.

B - The jspDestroy() method is the JSP equivalent of the destroy method for servlets.

C - Both of the above.

D - None of the above.

Answer : C
Explaination
The destruction phase of the JSP life cycle represents when a JSP is being removed from
use by a container.The jspDestroy() method is the JSP equivalent of the destroy method
for servlets.
Show Answer

Q 9 - How to pass information from JSP to included JSP?

A - Using <%jsp:param> tag.

B - Using <%jsp:page> tag.

C - Using <%jsp:import> tag.

D - Using <%jsp:useBean> tag.


Answer : A
Explaination
Using <%jsp:param> tag you can pass information from JSP to included JSP.
Hide Answer

Q 10 - What is the use of <c:remove > tag?

A - It removes a item from a list

B - it removes the data row from the database.

C - It removes a variable from either a specified scope or the first scope where the
variable is found

D - None of the above.

Answer : C
Explaination
The <c:remove > tag removes a variable from either a specified scope or the first scope
where the variable is found (if no scope is specified).

Vous aimerez peut-être aussi