FINALTERM EXAMINATION Fall 2008
CS506- Web Design and Development (Session - 1)
Time: 120 min
Question No: 1 ( M a r k s: 1 ) http://vuzs.net
From the Following; which we don’t include in simple tag while creating JSP custom tags:
► Start of tag
► End of tag
► Attributes
► None of these
Question No: 2 ( M a r k s: 1 ) http://vuzs.net
From the following; which component is/are used in directory Structure of web components:
► index.htm, JSP, Images etc..
► Web-inf, web.xml
► Classes, servlets classes
► lib, jar files
► All of these
Question No: 3 ( M a r k s: 1 ) http://vuzs.net
From following; which is the main reason that enters a thread into dead state:
► a)It dies a natural death because thread completes its execution.
► b)It is killed because someone invoked its stop method.
► Both a and b.
► None of these.
Question No: 4 ( M a r k s: 1 ) http://vuzs.net
From the following; which approach is used in java to create threads,
► Interface
► Inheritance
► Both Interface and Inheritance
► None of these.
Question No: 5 ( M a r k s: 1 ) http://vuzs.net
RPC stands for
► Remote Personal Computer (RPC)
► Remote Procedure Calls (RPC).
► Remote Procedure Client (RPC)
► None of these
Question No: 6 ( M a r k s: 1 ) http://vuzs.net
From the following which one is not a built-in validator?
► DoubleRangeValidator
► LongRangeValidator
► LengthValidator
► StringValidator
Question No: 7 ( M a r k s: 1 ) http://vuzs.net
-------------can be used to specify dynamic attribute values for JSTL actions without using full-blown programming language.
► EL
► RT
► Both EL and RT
► None of these
Question No: 8 ( M a r k s: 1 ) http://vuzs.net
The dot operator in Expression Language typically used for accessing the --------------------of an object.
► Properties
► Elements
► Values
► Attributes
Question No: 9 ( M a r k s: 1 ) http://vuzs.net
Tiers represent the _____________ view of application.
► Physical
► Logical
► External
► None of these
Question No: 10 ( M a r k s: 1 ) http://vuzs.net
Layers represent the _____________ view of application.
► Physical
► Logical
► External
► None of these
Question No: 11 ( M a r k s: 1 ) http://vuzs.net
Which of the following is appropriate for Page-with-Bean approach?
► The code becomes a mixture of presentation, business and data access logic.
► The maintenance of the application becomes a nightmare.
► A lot of code is also get duplicated.
► All the business logic goes into one application.
Question No: 12 ( M a r k s: 1 ) http://vuzs.net vuzs
The ___________ represent the state of component.
► View
► Model
► Controller
► Component
Question No: 13 ( M a r k s: 1 ) http://vuzs.net
The following value of JavaBean’s scope attribute has local variable.
► Page
► Request
► Session
► Application
Question No: 14 ( M a r k s: 1 ) http://vuzs.net
JSP action elements allow us to work with _____________.
► JavaScript
► JavaBeans
► ManagedBeans
► HTML
Question No: 15 ( M a r k s: 1 ) http://vuzs.net
A bean class ___________ have any public instance variables/attributes (fields).
► Can
► Can’t
► Must
► Shouldn’t
Question No: 16 ( M a r k s: 1 ) http://vuzs.net
Expression is a code fragment which returns ___________.
► Integer
► String
► Depends on the expression
► Nothing
Question No: 17 ( M a r k s: 1 ) http://vuzs.net
JSP file is compiled ___________.
► Whenever there is some modification in the file
► Whenever it is accessed
► Whenever browser is restarted
► Whenever the page is refreshed
Question No: 18 ( M a r k s: 1 ) http://vuzs.net
Servlet session and JSP session have ___________ abilities.
► Different
► Same
► Critical
► None of these
Question No: 19 ( M a r k s: 1 ) http://vuzs.net
Which of the following is not part of http response?
► Result Code
► URI
► Header fields
► Body
Question No: 20 ( M a r k s: 1 ) http://vuzs.net
In which file do we define a servlet mapping?
► Web.xml
► Servlet.mappings
► Servlet.xml
► None of the given
Question No: 21 ( M a r k s: 1 ) http://vuzs.net
Which of the following is a type of Java web application technologies?
► JSTL
► JSF
► JSP
► All of the given
Question No: 22 ( M a r k s: 1 ) http://vuzs.net
Extra information can be appended to URL using ____________.
► Extra path information
► Added parameters
► Custom change
► All of the given
Question No: 23 ( M a r k s: 1 ) http://vuzs.net
Web server is a software which provides services to access _________.
► Internet
► Intranet
► Extranet
► All of the given
Question No: 24 ( M a r k s: 1 ) http://vuzs.net
When
defining a method you must include a ___________ to declare any
exception that might be thrown but is not caught in the method.
► try block
► finally block
► catch block
► throws-clause
Question No: 25 ( M a r k s: 1 ) http://vuzs.net
In an applet class definition, the----------method takes the place of the constructor.
► paint();
► main();
► init();
► run() ;
Question No: 26 ( M a r k s: 1 ) http://vuzs.net
DSN stands for ___________.
► Domain System Name
► Data Source Name
► Database System Name
► Database Simple Name
Question No: 27 ( M a r k s: 1 ) http://vuzs.net
From following classes; which one can’t be instantiated?
► Super class
► Abstract Class
► Anonymous Class
► Concrete Class
Question No: 28 ( M a r k s: 1 ) http://vuzs.net
Converting bigger data types into smaller one is called ----------
► Up casting
► Down casting
► In casting
► Out casting
Question No: 29 ( M a r k s: 1 ) http://vuzs.net
Java provide ------------------
► Overloading
► Overriding
► Pointers
► Multiple Inheritance
Question No: 30 ( M a r k s: 1 ) http://vuzs.net
int x = 7/2;
value of x is:
► 1
► 2
► 3.5
► 3
Question No: 31 ( M a r k s: 1 )
Given the request path below, which part is context path, servlet path and path info?
/vubookshop/edu/index.html
unable to understand the question
unable to understand the question
Question No: 32 ( M a r k s: 1 )
Write the XML tags for the following scripting elements in JSP?
§ Comments:
§ Declaration:
Comments: No equivalent tag is defined
Declaration:
Expression:
Scriptlet:
Question No: 33 ( M a r k s: 2 )
What impact a JavaBeans object can produce when it is stored in Servlet Request object?
JavaBean
object that is stored in Servelet Request object remain accessible for
the duration of current request. In other words until you continue to
forward request to another servlet/JSP the bean value would be available
Question No: 34 ( M a r k s: 2 )
What invokes a thread’s run() method?
After
a thread is started, via its start() method or that of the Thread
class, the JVM invokes the thread's run() method when the thread is
initially executed.
Question No: 35 ( M a r k s: 3 )
What is the significance of error page?
We can configure error pages in jsp and servlets to direct the control to a custom error page, showing a friendly error message to the user when an exception is thrown in the page. Error pages enable you to customize error pages. You
can even hide them from the user's view entirely, if you want. This
also makes possible to maintain a consistent look and feel throughout an
application, even when those dreaded error messages are thrown. An
Error JSP is called by the web server when an uncaught exception gets
occurred.
Question No: 36 ( M a r k s: 3 )
Which type of information can be appended to URL?
With
URL rewriting, the parameter that we want to pass back and forth
between the server and client is appended to the URL. This appended
information can be retrieve by parsing the URL. This information can be
in the form of:
Extra path information,
Added parameters,
Some custom, server-specific URL change
Question No: 37 ( M a r k s: 3 )
Differentiate between Sequential Execution and multithreading.
Every
program has atleast one thread. Programs without multithreading
executes sequentially. That is, after executing one instruction the next
instruction in sequence is executed. If a function is called then until
the completion of function the next instruction is not executed.
Similarly if there is a loop then instructions after loop get only
executed when loop is completed.
Multithreading allows two parts of the same program to run concurrently A
problem with single-threaded applications is that lengthy activities
must complete before other activities can begin. In a multithreaded
application, threads can be distributed across multiple processors (if
they are available) so that multiple tasks are performed concurrently
and the application can operate more efficiently. Multithreading can
also increase performance on single-processor systems that simulate
concurrency—when one thread cannot proceed, another can use the
processor.
Question No: 38 ( M a r k s: 5 )
Which technology is used in JAVA to support following layers?
1. Presentation Layer client side HTML Applet Server side JSF Servelet JSF
2. Business Layer EJB Java Beans
3. Data Layer DAO Connectors
Question No: 39 ( M a r k s: 5 )
How cookies are sent to a client?
Create a Cookie Object
Cookie c = new Cookie (“name”, “value”);
Setting Cookie Attributes
c.setMaxAge(60);
Place the Cookie into HTTP response
Response.addCookie(c);
Question No: 40 ( M a r k s: 10 )
What are the characteristics of web services?
Interoperable
Economical
Automatic
Accessible
Available
Scalable
Question No: 41 ( M a r k s: 10 )
What is the usage of sleep (int time) method?
Sleep method will Causes the currently executing thread to wait for the time (milliseconds) specified
Waiting is efficient equivalent to non-busy. The waiting thread will not occupy the processor.
Threads come out of the sleep when the specified time interval expires or when interrupted by some other thread
Thread coming out of sleep may go to the running or ready state depending upon the availability of the processor.
High
priority threads should execute sleep method after some time to give
low priority threads chance to run otherwise starvation may occur
Sleep can be used for delay purpose i.e. anyone cal call Thread.sleep()method