Olete.in
Articles
Mock Tests
🧪 JSP MCQ Quiz Hub
JSP - Java (MCQ) questions and answers
Choose a topic to test your knowledge and improve your JSP skills
1. What technique is used for the authentication mechanism in the servlet specification?
Role Based Authentication
Form Based Authentication
Both A & B
None of the above
2. Which attribute specifies a JSP page that should process any exceptions thrown but not caught in the current page?
The ErrorPage Attribute
The IsErrorPage Attribute
Both A & B
None of the above
3. Which Error Handling in Java handles runtime errors with exceptions If an exception is not caught in your JSP or Servlet Resin will use a special error page to send results back to the browser Resin uses a default error page unless you explicitly provide an error page yourself?
Client Request Time Processing Errors
Compilation Time Processing Errors
JSP Translation Time Processing Errors
None of the above
4. Which can generate HTML dynamically on the client but can hardly interact with the web server to perform complex tasks like database access and image processing etc. in JSP?
vs.Static HTML
vs.Server-Side Includes
vs.Pure Servlets
Vs.JavaScript
5. In JSP Action tags which tags are used for bean development?
jsp:useBean
jsp:setPoperty
jsp:getProperty
All mentioned above
6. Which two interfaces does the javax.servlet.jsp package have?
JspPage
HttpJspPage
JspWriter
Both A & B
7. Which of the following is an advantage of the statement � Separation of business logic from JSP ?
Custom Tags in JSP
JSP Standard Tag Library
All the above
None of the above
8. How many jsp implicit objects are there and these objects are created by the web container that are available to all the jsp pages?
8
9
10
7
9. Which action tags are used in JSP for developing web application with Java Bean?
jsp:useBean
jsp:setProperty
jsp:getProperty
Both B & C
10. Which technology do we mix our business logic with the presentation logic?
Servlet
JSP
Both A & B
None of the above
11. Which is the Microsoft solution for providing dynamic Web content?
ASP
JSP
Both A & B
None of the above
12. Which tag is used to execute java source code in JSP?
Declaration Tag
Scriptlet tag
Expression tag
None of the above
13. Which JSP Action tags is used to include the content of another resource it may be jsp html or servlet?
jsp:include
jsp:forward
jsp:plugin
jsp:papam
14. In JSP how many ways are there to perform exception handling?
3
2
4
5
15. In JSP page directive which attribute defines the MIME(Multipurpose Internet Mail Extension) type of the HTTP response?
import
Content Type
Extends
Info
16. A JSP page consists of which tags?
HTML tags
JSP tags
Both A & B
None of the above
17. Which packages does a JSP API consist of?
javax.servlet.jsp
java.servlet
javax.servlet.jsp.tagext
Both A & C
Submit