Mvc pattern and servlet

Assignment Help JAVA Programming
Reference no: EM131488

Question 1

When you use the MVC pattern, the controller directs the flow of control to

A. the browser and the model

B. the view, model, and data store

C. the view and the model

D. the model and data store

Question 2

When you use the controller to forward a request to a servlet or JSP, you use the forward method of

A. the request object

B. the ServletContext object

C. the response object

D. a RequestDispatcher object

Question 3

The following Anchor tag demonstrates how to use < a href="/WorkServlet?shift=< %= shiftCode % > " > View your schedule
< /a>

A. URL rewriting

B. hidden fields

C. URL encoding

D. cookies

Question 4

Persistent cookies

A. are removed after the session ends

B. can't be deleted

C. exist after the session ends

D. are often called hidden fields

Question 5

Which of the following is not a benefit of using the MVC pattern for an application?

A. it requires less code

B. JSPs are used for what they do best

C. it's easier to make changes to the application servlets are used for what they do best JSPs are used for what they do best

D. it's easier to make changes to the application servlets are used for what they do best JSPs are used for what they do best it's easier to test and debug the application

Question 6

Which of the following statements is invalid?

A. String name = session.getAttribute("fullName");

B. session.setAttribute("fullName", "Ted Andrews");

C. Book book = (Book) session.getAttribute("bookObj");

D. session.removeAttribute("fullName")

Question 7

According to the following code from a web.xml file, the error.htm page is called when < error-page>

< exception-type>java.lang.Throwable< /exception-type>
< location>error.htm< /location>
< /error-page>

A. any HTTP or Java error occurs

B. an uncaught exception is thrown

C. an HTML page can't be found

D. an HTTP status code error occurs

Question 8

If the following JSP tag is coded in a main JSP, what happens when the reports.jsp page is updated?
< jsp:include page="includes/reports.jsp" />

A. the changes aren't updated in the subsequent requests for the main JSP

B. the changes appear for subsequent requests for the main JSP

C. a JSP error is thrown

Question 9

A session object is created

A. every time a browser makes a request for a web page

B. every time a browser requests a servlet

C. every time a browser requests a jsp

D. the first time a browser requests a servlet or JSP from a web site

Question 10

When you use hidden fields to pass parameters to a servlet or JSP, all but one of the following is true. Which one is it?

A. the parameters aren't shown in the URL

B. the user can see the parameters by using the browser to look at the page's source code

C. you don't have to store the parameters in the session object

D. you can't use URL encoding

Reference no: EM131488

Questions Cloud

Various techniques of inventory management : An investor is thinking of investing in a recurring deposit scheme that offers an interest rate of 12% per annum
Construct the shear force and bending moment diagrams : Write the algorithm and draw the flowchart for each problem
Mitigating dos attacks against broadcast authentication : Mitigating DOS Attacks against Broadcast Authentication in Wireless Sensor Networks
What should be the primary objective of management : The primary objective of  management and the term "free-cash flow
Mvc pattern and servlet : When you use the MVC pattern, the controller directs the flow of control to
Prepare an acquisition analysis : 2) Give all required consolidation adjustment entries needed to prepare the consolidated financial statements as at 30 June 2010.  The balance sheets and income statement of ABC Ltd and XYZ Ltd can be found on the worksheet.
Design and implement a small and simple email server : Design and implement a small and simple email server using the concept of web based information system (WBIS).
Taxation law : Advise the participants in the ‘barter' system of the income tax implications, if any, of participating in the system.
Write an essay on fdi in nigeria : Write an essay on FDI in Nigeria.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Rock-paper-scissors :- java problem

Design decision marks are based on how you implemented our programs/classes.

  Implementation of memory management

Implementation of memory management

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Determine if strings are equal

Complete the recursive method match in the code below which will determine whether or not two strings match.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  File integrity checker - tripwire

Write a program that will perform some of the basic tasks accomplished by a file integrity checker such as Tripwire.

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Java program to create a tree

Java program to create a tree, generate class - BottomUpTwoThreeFourTree, BottomUpTwoThreeFourTree,

  The frantic pipe layer game

Design the Frantic Pipe Layer game

  Cascading style sheet to a website

Compare and contrast the process of adding JavaScript and a Cascading Style Sheet to a Website. Determine if they can be used simultaneously in a page.

  Create a project in eclipse

Create a new project

  Print the contents of the array

Prepare a second loop that prints the contents of the array

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd