Paper Tayyari

Lecture 37: JSP Action Elements and Scope

MCQs, short and long questions from lecture 37.Lecture 37 ki MCQs, short aur long sawal.

8 MCQs · 21 short · 3 long questions · 8 MCQs from past papers8 MCQs · 21 short · 3 long sawal · 8 MCQs past papers se

Start mock testMock test shuru karein
DoneHal kiye 0/8
– correctsahi
1.
★ Final term Fall 2008

The following value of JavaBean's scope attribute has local variable.

  1. APage
  2. BRequest
  3. CSession
  4. DApplication

With page scope the bean is just bound to a local variable for the current page.

2.
★ Final term Fall 2008

JSP action elements allow us to work with _____________.

  1. AJavaScript
  2. BJavaBeans
  3. CManagedBeans
  4. DHTML

Action elements such as jsp:useBean, jsp:setProperty and jsp:getProperty work with JavaBeans.

3.
★ Final term Spring 2010

Which of the following is a correct order for Bean scope in JSP page from most visible to least visible?

  1. Aapplication, session, request, page
  2. Bpage, request, session, application
  3. Csession, page, request, application
  4. Dapplication, session, page, request

Application scope is widest, then session, then request, and page is narrowest.

4.
★ Final term 2007

Which of the following is not a correct scope when a JavaBean is used with JSP?

  1. Aapplication
  2. Bsession
  3. Crequest
  4. Dresponse

Bean scopes are page, request, session and application; response is not a scope.

5.
★ Final term past paper

Using the following value of JavaBean's scope attribute, the bean object is stored in ServletContext.

  1. APage
  2. BRequest
  3. CSession
  4. DApplication

Application scope stores the bean in the ServletContext, shared by the whole web application.

6.
★ Final term past paper

JSP ________ action element is used to obtain a reference to an existing JavaBean object.

  1. AuseBean
  2. BsetProperty
  3. CgetProperty
  4. DNone of these

jsp:useBean locates an existing bean in the given scope or creates one.

7.
★ Final term past paper

The default value of scope attribute in JSP useBean action element is ___________.

  1. APage
  2. BRequest
  3. CSession
  4. DApplication

If no scope is given, jsp:useBean uses page scope.

8.
★ Final term past paper

Which of the following is a correct order for Bean scope in JSP page from least visible to most visible?

  1. Aapplication, session, request, page
  2. Brequest, session, page, application
  3. Cpage, request, session, application
  4. Dpage, session, request, application

Page is narrowest, then request, session, and application is widest.