Professional Documents
Culture Documents
Sample Paper cs506
Sample Paper cs506
Sample Paper cs506
Question No: 3
When I/O complets, a thread moves from ________ state to the ready state.
A. Sleeping
B. Waiting
C. Running
D. Blocked
A. <init-param> </init-param>
B. <initialize-param> </initialize-param>
C. <initialize-parameters> </initialize-parameters>
D. <init-parameters> </init-parameters>
In Session Tracking, HTTP Session uses Cookies and ______________ in its underlying layer.
A. User Authentication
B. URL Rewriting
C. Hidden Form Fields
D. Server Response
Information stored during a session, HTTP Session object works like a/an _____________.
A. Stack
B. Queue
C. ArrayList
D. HashMap
With the help of _____________it is easier to develop dynamic web contents using regular
HTML.
A. Swing
B. Applet
C. Servlet
D. JSP
In JSP, declaration tag is used to declare variables and methods at ______________ level.
A. Program
B. Class
C. Package
D. Global
Which is NOT a standard method call as a part of the JSP life cycle?
A. jspInit()
B. jspService()
C. _jspService()
D. jspDestroy()
JSP ______________ allows us to work with JavaBeans, to include pages at request time and to
forward requests to other resources etc.
A. Action Elements
B. Declarations
C. Scriptlets
D. Expressions
Question No: 22 (Marks: 1)
The default value of scope attribute in JSP useBean action element is _____________.
A. Page
B. Request
C. Session
D. Application
In JSP, a Tag Handler class usually ____________ from SimpleTagSupport class that has
already implemented SimpleTag interface.
A. imports
B. includes
C. extends
D. implements
The right way to write a "Tag with Attributes" from JSP custom tags is:
A. <mytag : hello/>
B. <mytag:hello attribute = “value”/>
C. <mytag:hello> some body </mytag:hello>
D. <mytag:hello optional_attributes …………> some body </mytag:hello>
The ___________ translates interactions with the view into actions to be performed by the model
in a typical MVC model,.
A. model
B. view
C. page
D. controller
Which layer is used to provide a user interface to the client/user to interact with the application?
A. Database layer
B. Presentation layer
C. Business layer
D. Data layer
A. A programming language
B. A scripting language
C. Provides a way to simplify expressions in JSP
D. Provides a way to simplify expressions in Java Servlet
Which tag libraries contains tags to support locale messages, text, and numbers etc.?
A. Core
B. SQL
C. XML manipulation
D. Internationalization and formatting
In the context of Session Tracking, storing state on the server side makes __________ really
complicated as states need to be stored for each client.
A. server
B. client
C. session
D. servlet
The Expression Language (EL) accesses the object’s properties using ____________
conventions.
A. JSP
B. Servlets
C. Java
D. JavaBeans
Question No: 38 (Marks: 1)
A. Apache tomcat
B. Java Development Kit
C. Client HTML form
D. Java Compiler for compiling Servlets
A. ${}
B. @{}
C. #{}
D. %{}
______________ can be used to specify dynamic attribute values for JSTL actions without using
full-blown programming language.
A. Expression Language
B. Request Time
C. Expression Library
D. Request scope
Question No: 41 (Marks: 3)
You are required to write name of components with respect to numbers given in diagram.
Note: no need to redraw the diagram, rather just write name of components with respect to
numbers given in diagram.
1. ____________________
2. ____________________
3. ____________________
Question No: 44 (Marks: 3)
The given diagram shows the functionality of java servlet working in web server configuration.
Choose from the following options for numbered shapes and write in the blanks given at the end.
I) JVM
II) Servlet
III) Server
1) __________________
2) __________________
3) __________________
Table for five threads along with their priorities is given below.
Thread Priority
Thread A 7
Thread B 10
Thread C 7
Thread D 3
Thread E 3
Write the sequence of execution when a yield () method is called on the following scenarios:
You are required to write the code for two Java Servlets (processRequest() methods only) in such
a way that user enters "total_amount" and submit the form to FirstServlet. FirstServlet calculates
zakat on that amount and forwards the request (using Request Dispatcher) to SecondServlet that
displays the amount and calculated zakat.
You are required to write Java code for two Servlets (processRequest() methods only) in such a
way that user enter his/her name and submit the form to FirstServlet. FirstServlet stores user
name in Http Session object and forwards the request (using Request Dispatcher) to
SecondServlet that takes user name from Http Session object and displays on a web page.
Write code for a Course Outline class (i.e. CourseOutlineBean) which should satisfy all the
conventions that a JavaBean class have.
Required data members are as follows;
Rollno: int
sessionNo: long
topic: String
assignment: String
Question No: 50 (Marks: 5)
Fill the table based on web services features by analyzing the different features given in the table
and mention as “Yes” if feature belongs to web services, otherwise “No”.
Web Services
Feature
(Yes/No)
Interacts with User
Has a GUI