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

20 Questions Published

Questions

Question 1 Multiple Choice (Multiple Answers)

What are basic methods of Data adapter

  1. Fill
  2. Read
  3. Clear
  4. FillSchema
Question 2 Multiple Choice (Multiple Answers)

What are the various objects in Dataset

  1. DataTable
  2. DataRow
  3. DataColumn
  4. DataCollection
Question 3 Multiple Choice (Multiple Answers)

What are the methods available in command object

  1. ExecuteNonQuery
  2. ExecuteQuery
  3. ExecuteReader
  4. ExecuteScalar
Question 4 Multiple Choice (Multiple Answers)

Which method is used to commit all changes in the DataSet or DataTable?

  1. Update()
  2. AcceptChanges()
  3. GetChanges()
  4. All the above
Question 5 Multiple Choice (Single Answer)

Which method is used to create a new row in a table

  1. NewRow()
  2. Add()
  3. Read()
  4. ExecuteReader()
Question 6 Multiple Choice (Single Answer)

Which method is used to Get the name of the specified column from SqlDataReader (or any ADO.NET DataReader)?"

  1. GetSqlValue ()
  2. GetOrdinal ()
  3. GetName ()
  4. all the above
Question 7 Multiple Choice (Multiple Answers)

How to add auto increment column in the DataTable?

  1. auto.AutoIncrementSeed = 1
  2. auto.AutoIncrement = true
  3. auto.Increment = true;
  4. auto.IncrementSeed = 1;
Question 8 Multiple Choice (Multiple Answers)

What are the classes those are used for database connections between sql server and asp.net.

  1. SqlDataReader
  2. SqlConnection
  3. SqlCommand
  4. SqlClientPermissionAttribute
Question 9 Multiple Choice (Single Answer)

What are the layers available in ADO.NET.

  1. The Physical Data Store
  2. The DataSet
  3. The Data Provider
  4. All the above
Question 10 Multiple Choice (Multiple Answers)

What are the type of database connection in ADO.NET

  1. SQL Connection
  2. Oracle Connection
  3. Oledb connection
  4. XML connection
Question 11 Multiple Choice (Multiple Answers)

Syntax for creating a connection object

  1. SqlConnection conn = new SqlConnection(
  2. SqlConnection conn=null; conn=new SqlConnection(
  3. SqlConnection conn = SqlConnection(
  4. All the above
Question 12 Multiple Choice (Single Answer)

Syntax for creating a SqlDataReader Object

  1. SqlDataReader rdr = cmd.ExecuteReader();
  2. SqlDataReader rdr = ExecuteReader();
  3. SqlDataReader rdr = cmd.Execute();
  4. SqlDataReader rdr = cmd.ExecuteScalar();
Question 13 Multiple Choice (Multiple Answers)

What aer the tasks SqlDataAdapter performs when filling a DataSet with data

  1. Close connection
  2. Open connection
  3. Retrieve data into DataSet
  4. Write changes from DataSet to data source
Question 14 Multiple Choice (Single Answer)

which are all the set of JSP tags defined in the JSP 1.0 specification

  1. Directives , Declarations , Scriptlets , Comments , Expressions
  2. Directives , Scopes , Scriptlets , Comments , Expressions
  3. Directives , Declarations , Scriptlets , Comments , Objects
  4. Directives , Tags , Scriptlets , Comments , Expressions
Question 15 Multiple Choice (Single Answer)

Which directive allows substitution of text or code to occur at translation time specified by file or URL reference ?

  1. Import
  2. Include
  3. Substitute
  4. None of the above
Question 16 Multiple Choice (Single Answer)

What is the syntax to invoke a servlet within the HTML

tag ?

  1. <FORM METHOD="POST|GET" ACTION="application_URI/JSP_URL"></FORM>
  2. <FORM METHOD="POST|GET" ACTION="application_SERVLET/JSP_URL"></FORM>
  3. <FORM METHOD="POST|GET" ACTION="application_URI/SERVLET_URL"></FORM>
  4. <FORM METHOD="POST|GET" ACTION="application_SERVLET_URI/JSP_URL"></FORM>
Question 17 Multiple Choice (Multiple Answers)

What are the ways to call a JSP(TestDisplay.jsp) from a Servlet ?

  1. getServletContext().getRequestDispatcher("/DateDisplay.jsp").forward(HttpServletRequest,HttpServletResponse);
  2. sendPage("TestDisplay", HttpServletRequest,HttpServletResponse)
  3. callPage("TestDisplay", HttpServletRequest,HttpServletResponse)
  4. HttpServletResponse.sendRedirect("/TestDisplay.jsp")
Question 18 Multiple Choice (Single Answer)

What are the valid values of the scope parameter in the jsp:useBean attribute ?

  1. page , request , out , application
  2. request , response , session , out
  3. page , request , session , application
  4. request , response , session , application
Question 19 Multiple Choice (Single Answer)

what is the default value for the Attribute session of the Page Directive ?

  1. True
  2. False
  3. Boolean
  4. -1
Question 20 Multiple Choice (Single Answer)

The Tester's view of quality means

  1. Meeting requirements
  2. Doing it the right way
  3. Doing it right the first time
  4. Fit for use
  5. Doing it on time