Web Technologies: JSP, Servlets, and ADO.NET
Covers Java web development with JSP and Servlets, plus .NET data access with ADO.NET for web applications
Questions
What are basic methods of Data adapter
- Fill
- Read
- Clear
- FillSchema
What are the various objects in Dataset
- DataTable
- DataRow
- DataColumn
- DataCollection
What are the methods available in command object
- ExecuteNonQuery
- ExecuteQuery
- ExecuteReader
- ExecuteScalar
Which method is used to commit all changes in the DataSet or DataTable?
- Update()
- AcceptChanges()
- GetChanges()
- All the above
Which method is used to create a new row in a table
- NewRow()
- Add()
- Read()
- ExecuteReader()
Which method is used to Get the name of the specified column from SqlDataReader (or any ADO.NET DataReader)?"
- GetSqlValue ()
- GetOrdinal ()
- GetName ()
- all the above
How to add auto increment column in the DataTable?
- auto.AutoIncrementSeed = 1
- auto.AutoIncrement = true
- auto.Increment = true;
- auto.IncrementSeed = 1;
What are the classes those are used for database connections between sql server and asp.net.
- SqlDataReader
- SqlConnection
- SqlCommand
- SqlClientPermissionAttribute
What are the layers available in ADO.NET.
- The Physical Data Store
- The DataSet
- The Data Provider
- All the above
What are the type of database connection in ADO.NET
- SQL Connection
- Oracle Connection
- Oledb connection
- XML connection
Syntax for creating a connection object
- SqlConnection conn = new SqlConnection(
- SqlConnection conn=null; conn=new SqlConnection(
- SqlConnection conn = SqlConnection(
- All the above
Syntax for creating a SqlDataReader Object
- SqlDataReader rdr = cmd.ExecuteReader();
- SqlDataReader rdr = ExecuteReader();
- SqlDataReader rdr = cmd.Execute();
- SqlDataReader rdr = cmd.ExecuteScalar();
What aer the tasks SqlDataAdapter performs when filling a DataSet with data
- Close connection
- Open connection
- Retrieve data into DataSet
- Write changes from DataSet to data source
which are all the set of JSP tags defined in the JSP 1.0 specification
- Directives , Declarations , Scriptlets , Comments , Expressions
- Directives , Scopes , Scriptlets , Comments , Expressions
- Directives , Declarations , Scriptlets , Comments , Objects
- Directives , Tags , Scriptlets , Comments , Expressions
Which directive allows substitution of text or code to occur at translation time specified by file or URL reference ?
- Import
- Include
- Substitute
- None of the above
What is the syntax to invoke a servlet within the HTML
- <FORM METHOD="POST|GET" ACTION="application_URI/JSP_URL"></FORM>
- <FORM METHOD="POST|GET" ACTION="application_SERVLET/JSP_URL"></FORM>
- <FORM METHOD="POST|GET" ACTION="application_URI/SERVLET_URL"></FORM>
- <FORM METHOD="POST|GET" ACTION="application_SERVLET_URI/JSP_URL"></FORM>
What are the ways to call a JSP(TestDisplay.jsp) from a Servlet ?
- getServletContext().getRequestDispatcher("/DateDisplay.jsp").forward(HttpServletRequest,HttpServletResponse);
- sendPage("TestDisplay", HttpServletRequest,HttpServletResponse)
- callPage("TestDisplay", HttpServletRequest,HttpServletResponse)
- HttpServletResponse.sendRedirect("/TestDisplay.jsp")
What are the valid values of the scope parameter in the jsp:useBean attribute ?
- page , request , out , application
- request , response , session , out
- page , request , session , application
- request , response , session , application
what is the default value for the Attribute session of the Page Directive ?
- True
- False
- Boolean
- -1
The Tester's view of quality means
- Meeting requirements
- Doing it the right way
- Doing it right the first time
- Fit for use
- Doing it on time