JSP and Java Web Development
Test your knowledge of Java Server Pages (JSP), servlets, and related Java web development concepts including JSP syntax, lifecycle methods, directives, session management, and error handling.
Questions
Java Server Pages specification includes
- Script language declarations, scriplets and expressions.
- JSP standard actions
- JSP standard directives
- All the Above
When a JSP page is compiled, what is it turned into?
- Applet
- Servlet
- Application
- Midlet
Which tag in the jsp is used to define the error page
- None of the above
- location
- exception-type
- error-page
Which of the following statements is true about JSP tag library?
- It defines the standard tag that works the same everywhere
- It is a single library and we can use it in multiple jsp containers
- It has support for the common structural tasks like iteration and condition
- All of the above
Which of the statement below does not correctly defines the difference between JDBC and ODBC ?
- ODBC can be directly used with Java because it uses a C interface
- ODBC makes uses of pointers which has been totally removed from JAVA
- ODBC is from Microsoft while JDBC is from java applications
- ODBC requires manual installation of the ODBC driver manager and driver on all client machines. While for JDBC driver are written in Java and JDBC code is automatically installable, secure and portable on all platforms.
Which of the tag is used to show the comments in the JSP page
- <% code fragment %>
- <%= expressions %>
- <%! Declarations %>
- <%-- comment -- %>
The _______ when added to the user session tells us that the session timed out
- SessionTimedoutIndicator
- SessionTotalTimeOutIndicator
- SessionTotalTimedoutIndicator
- SessionTimeoutIndicator
Which codeline must be set before any of the lines that use the PrintWriter
- setContentWriter()
- setWriter()
- setPrintType()
- setContentType()
Following method(s) cannot be overridden in the JSP page.
- jspDestroy()
- jspInit()
- _jspService()
- getParameter()
Following methods can be overridden in the JSP page
- jspDestroy()
- jspInit()==
- _jspService()
- getParameter()
The tag %@include file=”.........” % > helps in including the ______ file in the JSP page
- readOnly==
- dynamic
- static==
- None of the above
To show money format on the JSP page we use __________ class
- AirthmaticFormat
- CurrencyFormat
- NumberFormat ==
- StringBuffer
Which of the tag contains a code fragment valid in the page scripting language
- <%= expressions %>
- <% code fragment %
- <%! Declarations %>
- <%-- comment -- %>
Implementing the tag < %@ page isThreadSafe="false" % >implements the SingleThreadModel interface making the Jsp
- None of the above
- content safe
- synchornised
- thread safe
The error message displayed when the page is not found at the correct location
- 550
- 440
- 505
- 404
The information needed to create a TCP socket for communication in JSP is
- The Local Systems IP Address
- Local Systems Port Number
- Remote System’s IPAddress
- All of the above
The structure of simple explicit cursor is
- open cursor; ---some statements close;
- open cursor; fetch into variables; ---some statements close cursor;
- open cursor; fetch into variables; ---some statements close;
- All of the above