Sei sulla pagina 1di 113

5.0/ 5.

0 Points
Question 1 of 20
What is the correct HTML for creating a hyperlink?

A. <a name="">A</a>

B. <a href="http://www.example.com">example</a>

C. <a url="http://www.example.com">example</a>

D. <a>B</a>

5.0/ 5.0 Points


Question 2 of 20
What is the correct syntax in HTML for creating a link on a webpage?

A. <A SRC = “ghumti.html” >

B. <LINK SRC= “ghumti.html”>

C. < A HREF = “ghumti.html”>

D. <BODY LINK = “ghumti.html”>

5.0/ 5.0 Points


Question 3 of 20
How do I do multiple colors of text?
A. <font color-font="blue">blue</font>

B. <font font-color="blue">blue</font>

C. <font color="blue">blue</font>

5.0/ 5.0 Points


Question 4 of 20
What is the correct HTML for making a checkbox?

A. <input type="checkbox" />

B. <check>

C. <input type="check" />

D. <checkbox>

5.0/ 5.0 Points


Question 5 of 20
Which of following HTML Tag will inserting a line break?

A. <br />

B. <lb />

C. <p />
D. <break />

5.0/ 5.0 Points


Question 6 of 20
You do not have to connect to the internet to verify changes to a Web page on your computer.

True

False

5.0/ 5.0 Points


Question 7 of 20
Which tag is used to display the numbered list?

A. <LI></LI>

B. <OL></OL>

C. <UL></UL>

D. <DL></DL>

5.0/ 5.0 Points


Question 8 of 20
Which tag is used to lists the items with bullets?

A. <ul>…</ul>
B. <list>…</list>

C. <ol>…</ol>

D. <bullet>…</bullet>

5.0/ 5.0 Points


Question 9 of 20
What is the correct HTML for making a drop-down list?

A. <select>

B. <list>

C. <input type="list" />

D. <input type="dropdown" />

5.0/ 5.0 Points


Question 10 of 20
Which of the following is the correct regarding meta tag in HTML?

A. <meta name = ” ” />

B. <meta name = ” ” />

C. <meta> … </meta>
D. <metadata name = ” ” />

Part 2 of 2 - Part 2 45.0/ 50.0 Points

5.0/ 5.0 Points


Question 11 of 20
How do you display hyperlinks without an underline?

A. a {decoration:no underline}

B. a {underline:none}

C. a {text-decoration:none}

D. a {text-decoration:no underline}

5.0/ 5.0 Points


Question 12 of 20
Following CSS code is written -
<style>
a:link {
color:#FF0000;
}
a:visited {
color:#00FF00;
}
a:hover {
color:#FF00FF;
}
a:active {
color:#0000FF;
}
</style>
Guess in which color link will be displayed if user has not clicked on any of the link before.

A. #FF0000

B. #FF00FF

C. #0000FF

D. #00FF00

5.0/ 5.0 Points


Question 13 of 20
How do you change the font of an element?

A. f:

B. font-style:

C. font-face:

D. font-family:

5.0/ 5.0 Points


Question 14 of 20
Currently clicking and holding down the mouse button on represents ___________ pseudo class.
A. a:visited

B. a:active

C. a:hover

D. a:link

5.0/ 5.0 Points


Question 15 of 20
What is the correct CSS syntax for making all the <span> elements bold?

A. span {text-size:bold}

B. <span style="text-size:bold">

C. <span style="font-size:bold">

D. span {font-weight:bold}

5.0/ 5.0 Points


Question 16 of 20
Which HTML tag is used to define an internal style sheet?

A. <stylesheet>
B. <style>

C. <script>

D. <css>

5.0/ 5.0 Points


Question 17 of 20
What is the preferred way for adding a background color in HTML?

A. <background>yellow</background>

B. <body background="yellow">

C. <body style="background-color:yellow">

5.0/ 5.0 Points


Question 18 of 20
Which of the following is correct to set “Black” color as Background of page?

A. <body bgcolor = “#000000″>

B. <body background = “#000000″>

C. <body Background color = “#000000″>

D. All of Above
0.0/ 5.0 Points
Question 19 of 20
How do you make each word in a text start with a capital letter?

A. text-transform:capitalize

B. text-transform:uppercase

C. You can't do that with CSS

5.0/ 5.0 Points


Question 20 of 20
Which of the following is correct to align H1 tag to Right Alignment

A. <h1 tag align = “right”> … </h1>

B. H1 cannot make Right Alignment

C. <h1 align = “right”> … </h1>

D. <h1 alignment = “right”> … </h1>

0.0/ 5.0 Points


Question 1 of 20
What is the output of following JavaScript code?

<script type=""text/javascript"">
var cst = ""FPT Software JSC Danang Branch"";
var result = cst.split("" "");
document.write(result);
</script>

A. This JavaScript is Error because JavaScript doesn't have split() statement

B. F,P,T S,o,f,t,w,a,r,e J,S,C D,a,n,a,n,g B,r,a,n,c,h

C. FPT,Software,JSC,Danang,Branch

D. "FPT
Software
JSC
Danang
Branch"

5.0/ 5.0 Points


Question 2 of 20
Which of method is used to remove focus from the specified object

A. onchange()

B. blur()

C. focus()

D. None of the above


5.0/ 5.0 Points
Question 3 of 20
You define an JavaScript array using

A. var new array = myarray;

B. var new Array() = myarray;

C. var myarray = array new;

D. var myarray = new Array();

5.0/ 5.0 Points


Question 4 of 20
What operator makes converts 00110011 into 11001100?

A. |

B. &

C. ~

D. !

5.0/ 5.0 Points


Question 5 of 20
We write single ______ before the pseudo-class property.

A. Semicolon
B. Hash

C. Colon

D. Dot

5.0/ 5.0 Points


Question 6 of 20
Which of the following JavaScript statements use arrays?

A. setTimeout("a["+i+"]",1000)

B. k = a(i)

C. k = a & i

5.0/ 5.0 Points


Question 7 of 20
What is the correct syntax for referring to an external script called "xxx.js"?

A. <script type="text/javascript" src="xxx.js">

B. <script type="text/javascript" href="xxx.js">

C. <script type="text/javascript" name="xxx.js">


D. A, B, C are right

5.0/ 5.0 Points


Question 8 of 20
Where is the correct place to insert a JavaScript?

A. The <head> section

B. Both the <head> section and the <body> section are correct

C. The <body> section

5.0/ 5.0 Points


Question 9 of 20
How can you add a comment in a JavaScript?

A. //This is a comment

B. <!--This is a comment-->

C. 'This is a comment

5.0/ 5.0 Points


Question 10 of 20
Which of the following is incorrect regarding Logical styles?

A. Keyboard looks like teletype


B. Variable looks like teletype

C. Sample looks like teletype

D. Code looks like teletype

Part 2 of 3 - Part 2 20.0/ 20.0 Points

5.0/ 5.0 Points


Question 11 of 20
What is AJAX ?

A. is a football club name

B. is a program

C. None

D. is a country name

5.0/ 5.0 Points


Question 12 of 20
What does the XMLHttpRequest object accomplish in Ajax?

A. It provides a means of exchanging structured data between the Web server and client.

B. It provides the ability to mark up and style the display of Web-page text.
C. It provides the ability to asynchronously exchange data between Web browsers and a Web
server.

D. It's the programming language used to develop Ajax applications.

5.0/ 5.0 Points


Question 13 of 20
AJAX based on ______ .

A. JavaScript and HTTP requests

B. VBScript and XML

C. JavaScript and Java

D. JavaScript and XML

5.0/ 5.0 Points


Question 14 of 20
AJAX Stands for:

A. Abstract JSON and XML

B. Another Java and XML Library

C. Another Java Abstraction for X-Windows


D. Asynchronous Javascript and XML

Part 3 of 3 - Part 3 30.0/ 30.0 Points

5.0/ 5.0 Points


Question 15 of 20
jQuery method to set one or more style properties for selected elements?

A. property()

B. css()

C. html()

D. style()

5.0/ 5.0 Points


Question 16 of 20
jQuery method is used to perform an asynchronous HTTP request?

A. jQuery.ajaxSync()

B. jQuery.ajax()

C. jQuery.ajaxSetup()
D. jQuery.ajaxAsync()

5.0/ 5.0 Points


Question 17 of 20
When a user views a page containing a JavaScript program, which machine actually executes the
script

A. The User's machine running a Web browser

B. The Web server

C. A central machine deep within Netscape's corporate offices

D. None of the above

5.0/ 5.0 Points


Question 18 of 20
$(function(){});
What does this piece of jQuery do?

A. This is to create a method in jQuery

B. This is to test if jQuery has completed execution

C. This is to test if jQuery can be loaded again

D. This is a shorter version for $(document).ready(function(){});


5.0/ 5.0 Points
Question 19 of 20
What is the correct jQuery code for making all div elements 100 pixels high?

A. $("div").yPos(100)

B. $("div").height(100)

C. $("div").height="100"

5.0/ 5.0 Points


Question 20 of 20
Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from
selected elements?

A. switch()

B. altClass()

C. toggleClass()

D. switchClass()

5.0/ 5.0 Points


Question 1 of 20
Which property would you use to redirect visitor to another page?

A. link.redirect.href
B. window.location.href

C. java.redirect.url

D. document.href

5.0/ 5.0 Points


Question 2 of 20
We write single ______ before the pseudo-class property.

A. Semicolon

B. Hash

C. Colon

D. Dot

5.0/ 5.0 Points


Question 3 of 20
What is mean by "this" keyword in javascript?

A. It refers current object

B. It referes previous object

C. It is variable which contains value


D. None of the above

5.0/ 5.0 Points


Question 4 of 20
How do you write a conditional statement for executing some statements only if "i" is equal to 5?

A. if i=5 then

B. if i==5 then

C. if (i==5)

D. if i=5

5.0/ 5.0 Points


Question 5 of 20
Which of the following JavaScript statements use arrays?

A. setTimeout("a["+i+"]",1000)

B. k = a(i)

C. k = a & i

5.0/ 5.0 Points


Question 6 of 20
Which best describe void?

A. A function

B. An operator

C. A statement

D. A method

5.0/ 5.0 Points


Question 7 of 20
Which of method is used to remove focus from the specified object

A. onchange()

B. blur()

C. focus()

D. None of the above

5.0/ 5.0 Points


Question 8 of 20
How do you find the client's browser name?

A. browser.name
B. navigator.appName

C. client.navName

1.67/ 5.0 Points


Question 9 of 20
3-Tier Architecture includes:

A."MIDDLE TIER/
APPLICATION TIER"

B.PRESENTATION TIER

C.DATA/EIS TIER

D.CLIENT TIER

5.0/ 5.0 Points


Question 10 of 20
What is the output of following JavaScript code?
<script type=""text/javascript"">
var queue = new Array();
queue.push(""Mon"");
queue.push(""Tue"");
queue.push(""Wed"");
queue.shift();
queue.pop();
queue.unshift(""Thu"");
document.write(queue.join("" / ""));
</script>
A. Thu / Tue

B. Wed / Thu

C. Tue / Thu

D. Thu / Wed

Part 2 of 3 - Part 2 15.0/ 20.0 Points

5.0/ 5.0 Points


Question 11 of 20
What does the XMLHttpRequest object accomplish in Ajax?

A. It provides a means of exchanging structured data between the Web server and client.

B. It provides the ability to mark up and style the display of Web-page text.

C. It provides the ability to asynchronously exchange data between Web browsers and a Web
server.

D. It's the programming language used to develop Ajax applications.

0.0/ 5.0 Points


Question 12 of 20
What is AJAX ?
A. is a football club name

B. is a program

C. None

D. is a country name

5.0/ 5.0 Points


Question 13 of 20
AJAX Stands for:

A. Abstract JSON and XML

B. Another Java and XML Library

C. Another Java Abstraction for X-Windows

D. Asynchronous Javascript and XML

5.0/ 5.0 Points


Question 14 of 20
AJAX based on ______ .

A. JavaScript and HTTP requests

B. VBScript and XML


C. JavaScript and Java

D. JavaScript and XML

Part 3 of 3 - Part 3 25.0/ 30.0 Points

5.0/ 5.0 Points


Question 15 of 20
With jQuery, look at the following selector: $("div"). What does it select?

A. All div elements

B. The first div element

5.0/ 5.0 Points


Question 16 of 20
Which of the following jQuery syntax uses the class selector

A. $(‘#temp’)

B. $(‘class’)

C. $(‘temp’).class

D. $(‘.temp’)
5.0/ 5.0 Points
Question 17 of 20
Which of the following is correct?

A. jQuery is a JavaScript Library

B. jQuery is a JSON Library

5.0/ 5.0 Points


Question 18 of 20
jQuery does not support which of the following

A. AJAX

B. PHP Bytecode

C. HTML/DOM Manipulation

D. HTML events

5.0/ 5.0 Points


Question 19 of 20
jQuery method is used to perform an asynchronous HTTP request?

A. jQuery.ajaxSync()

B. jQuery.ajax()
C. jQuery.ajaxSetup()

D. jQuery.ajaxAsync()

0.0/ 5.0 Points


Question 20 of 20
With jQuery, look at the following selector: $("div.intro"). What does it select?

A. The first div element with class="intro"

B. All div elements with class="intro"

C. All div elements with id="intro"

D. The first div element with id="intro"

5.0/ 5.0 Points


Question 1 of 20
MVC stands for?

A. Models / Views / Controllers

B. Model / View / Controller

C. Model / View / Controler

D. Model / View / Control


0.0/ 5.0 Points
Question 2 of 20
Display results of Business Logic is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 3 of 20
How many instances can be created per application module by the RequestProcessor
class?

A. Three

B. Uncountable instances

C. Four

D. One

0.0/ 5.0 Points


Question 4 of 20
<bean:write> tag in Struts 1.x is used to ___________

A. Define a scripting variable based on the value(s) of the specified bean property

B. Define a scripting variable based on the value(s) of the specified request parameter

C. Render an internationalized message string to the response.

D. Render the value of the specified bean property to the current JspWriter
0.0/ 5.0 Points
Question 5 of 20
To specify a form-bean of dynamic validation form, which of the following is used in
<form-bean> tag

A. type="org.apache.struts.validator.DynaValidationForm"

B. type="org.apache.struts.validator.DynaValid Form”

C. type="org.apache.struts.validator.DynaValidatorForm"

D. type="org.apache.struts.validator.DynaValidateForm"

0.0/ 5.0 Points


Question 6 of 20
<logic:present> tag in Struts 1.x is used to ___________

A. Evaluate the nested body content of this tag if the requested variable is either null or an
empty string.
B. Generate the nested body content of this tag if the specified value is present in this
request.

C. Generate the nested body content of this tag if the specified value is present in this
request.

D. Evaluate the nested body content of this tag if the requested variable is not equal to the
specified value

5.0/ 5.0 Points


Question 7 of 20
Which of the following methods is overridden by Action class?

A. service()

B. destroy()

C. execute()
D. run()

5.0/ 5.0 Points


Question 8 of 20
Which of the following is performed by ActionServlet and RequestProcessor?
1.Receiving the HttpServletRequest
2.Populating JavaBean from the request parameters
3.Displaying response on the web page Issues
4.Content type issues handling
5.Provide extension points

A. 1 and 4

B. 2,3,4,5

C. 1,2,4,5

D. 3, 4, 5

5.0/ 5.0 Points


Question 9 of 20
Declaration of a action as following is____________
<action-mappings>
<action path=""/logon""
type=""com.codementor.LogonAction""
name=""logonForm""
input=""/Login.jsp""
scope=""request"" >
<forward name=""success"" path=""/Success.jsp"" />
<forward name=""failure"" path=""/Failure.html"" />
</action>
</action-mappings>
</struts-config>

True
False

0.0/ 5.0 Points


Question 10 of 20
Performing DB Queries is responsibility of?
A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 11 of 20
Which of the following tag is a valid form submission in Struts framework? [ some-
action.do is a sample]

A. < html:web-form action="/some-action.do">

B. < html:form action="/some-action.do">

C. < jsp:webform action="/some-action.do">

D. < html:page-form action="/some-action.do">

0.0/ 5.0 Points


Question 12 of 20
Which validation way is used at client-side?

A. Using Form Bean class

B. Validator Framework

C. Using Action Class

D. Using javascript

0.0/ 5.0 Points


Question 13 of 20
Struts framework is based on
A. Servlet, JSP, XML and Java

B. Applet, XML and Java

C. Servlet, HTML and Java

D. Servlet, JSP and Java

0.0/ 5.0 Points


Question 14 of 20
Struts framework

A. has built-in support for the model

B. provides model components

C. should always decouple the application from a specific model implementation

D. does not support JavaBeans and EJB

0.0/ 5.0 Points


Question 15 of 20
<logic:iterate> tag in Struts 1.x is used to ___________

A. Repeat the nested body content of this tag over a map

B. Repeat the content of this tag over a list

C. Repeat the body content of this tag over an array

D. Repeat the nested body content of this tag over a specified collection

5.0/ 5.0 Points


Question 16 of 20
Which of the following tags in struts-config.xml file defines the availability of necessary
Struts JSP custom tag libraries?
A. < jsp-taglib>

B. < struts-taglib>

C. < taglib>

D. < jsp-lib>

5.0/ 5.0 Points


Question 17 of 20
Serves logical connection between user‟s interaction and the business process is
responsibility of?

A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 18 of 20
Which of the logic tags is used for repetitive output generation?

A. < logic:iterate>

B. < logic:lessThan>

C. < login:redirect>

D. < logic:loop>

5.0/ 5.0 Points


Question 19 of 20
Prefix of Struts1.x tag name used in JSP file is
A. <html-

B. <html:

C. <s:

D. <s-

5.0/ 5.0 Points


Question 20 of 20
Represents Output/Input of the application is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 1 of 20
Struts framework is based on

A. Servlet, JSP, XML and Java

B. Servlet, HTML and Java

C. Servlet, JSP and Java

D. Applet, XML and Java


5.0/ 5.0 Points
Question 2 of 20
Represents Output/Input of the application is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 3 of 20
How many instances can be created per application module by the RequestProcessor class?

A. Three

B. Uncountable instances

C. Four

D. One

5.0/ 5.0 Points


Question 4 of 20
Which of the logic tags is used for repetitive output generation?

A. < logic:lessThan>
B. < logic:iterate>

C. < logic:loop>

D. < login:redirect>

5.0/ 5.0 Points


Question 5 of 20
Prefix of Struts1.x tag name used in JSP file is

A. <s:

B. <s-

C. <html-

D. <html:

5.0/ 5.0 Points


Question 6 of 20
Encapsulates Domain Logic which are independent of Presentation is responsibility of?

A. M

B. V
C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 7 of 20
Struts framework

A. does not support JavaBeans and EJB

B. should always decouple the application from a specific model implementation

C. provides model components

D. has built-in support for the model

0.0/ 5.0 Points


Question 8 of 20
To specify a form-bean of dynamic validation form, which of the following is used in <form-bean> tag

A. type="org.apache.struts.validator.DynaValidateForm"

B. type="org.apache.struts.validator.DynaValid Form”

C. type="org.apache.struts.validator.DynaValidationForm"

D. type="org.apache.struts.validator.DynaValidatorForm"
5.0/ 5.0 Points
Question 9 of 20
Responsible for making decision among multiple presentation is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 10 of 20
A Form Bean class in Struts 1.x extends

A. None of above

B. ActionBean class

C. FormBean class

D. ActionForm class

5.0/ 5.0 Points


Question 11 of 20
Which of the following tags in struts-config.xml file defines the availability of necessary Struts JSP custom tag
libraries?
A. < jsp-lib>

B. < taglib>

C. < struts-taglib>

D. < jsp-taglib>

5.0/ 5.0 Points


Question 12 of 20
Declaration of a action as following is____________
<action-mappings>
<action path=""/logon""
type=""com.codementor.LogonAction""
name=""logonForm""
input=""/Login.jsp""
scope=""request"" >
<forward name=""success"" path=""/Success.jsp"" />
<forward name=""failure"" path=""/Failure.html"" />
</action>
</action-mappings>
</struts-config>

True

False

0.0/ 5.0 Points


Question 13 of 20
Which tag is used along with uri, to specify the tiles framework‟s .tld file?

A. < %@taglib url="/WEB-INF/tile.tld" prefix="tiles"%>

B. < %@taglibs uri="/WEB-INF/tiles.tld" prefix="tiles"%>


C. < %@taglib uri="/WEB-INF/tlds/tiles.tld" prefix="tiles"%>

D. < %@taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>

5.0/ 5.0 Points


Question 14 of 20
What is the limitation of creating ActionServlet instances per web application?

A. One

B. Three

C. Unlimited

D. Two

0.0/ 5.0 Points


Question 15 of 20
<logic:present> tag in Struts 1.x is used to ___________

A. Evaluate the nested body content of this tag if the requested variable is not equal to the
specified value

B. Evaluate the nested body content of this tag if the requested variable is either null or an empty
string.

C. Generate the nested body content of this tag if the specified value is present in this request.
D. Generate the nested body content of this tag if the specified value is present in this request.

5.0/ 5.0 Points


Question 16 of 20
Which of the java bean tags is used to show the bean value on the web page?

A. < bean:define>

B. < bean:write>

C. < bean:message>

D. < bean:show>

5.0/ 5.0 Points


Question 17 of 20
Struts framework is based on

A. Servlet, JSP and Java

B. Servlet, HTML and Java

C. Servlet, JSP, XML and Java

D. Applet, XML and Java


5.0/ 5.0 Points
Question 18 of 20
ActionServlet, RequestProcessor and Action classes are the components of

A. Model

B. Controller

C. View

D. Deployment

5.0/ 5.0 Points


Question 19 of 20
Which of the following delegates the request handling to the RequestProcessor instance?

A. ActionServlet

B. Action class

C. Deployment descriptor

D. None of the above

0.0/ 5.0 Points


Question 20 of 20
Display results of Business Logic is responsibility of?

A. M
B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 1 of 20
How many instances can be created per application module by the RequestProcessor class?

A. Three

B. Uncountable instances

C. Four

D. One

5.0/ 5.0 Points


Question 2 of 20
Struts framework is based on

A. Servlet, JSP and Java

B. Servlet, HTML and Java

C. Servlet, JSP, XML and Java


D. Applet, XML and Java

0.0/ 5.0 Points


Question 3 of 20
Which is not True about ActionErrors in Struts 1.x?

A. A validation error, which can handle all errors and exceptions of application

B. A specific validation error, which will be put in the ActionErrors

C. Used in struts to contain all the errors from a validation point

D. Contains an error key (which may be used with the resourse bundle)

5.0/ 5.0 Points


Question 4 of 20
Contains data and Related Functionality is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)
5.0/ 5.0 Points
Question 5 of 20
Application module selection is done by

A. Action class

B. ActionServlet

C. RequestProcessor

D. All of the above

5.0/ 5.0 Points


Question 6 of 20
Which of the logic tags is used for repetitive output generation?

A. < logic:lessThan>

B. < logic:iterate>

C. < logic:loop>

D. < login:redirect>

5.0/ 5.0 Points


Question 7 of 20
The dispatch from the controller to the Action class is based on a configuration that is provided by a

A. struts-config.xml
B. struts-processor-conifg.xml

C. struts-action-config.xml

D. struts-configs.xml

5.0/ 5.0 Points


Question 8 of 20
Which of the following tag is a valid form submission in Struts framework? [ some-action.do is a sample]

A. < html:page-form action="/some-action.do">

B. < html:form action="/some-action.do">

C. < html:web-form action="/some-action.do">

D. < jsp:webform action="/some-action.do">

5.0/ 5.0 Points


Question 9 of 20
Which of the following is performed by ActionServlet and RequestProcessor?
1.Receiving the HttpServletRequest
2.Populating JavaBean from the request parameters
3.Displaying response on the web page Issues
4.Content type issues handling
5.Provide extension points

A. 1 and 4
B. 2,3,4,5

C. 3, 4, 5

D. 1,2,4,5

5.0/ 5.0 Points


Question 10 of 20
Which of the following acts as a bridge between user-invoked URI and a business method?

A. HttpRequest

B. ActionServlet

C. Action class

D. RequestProcessor

5.0/ 5.0 Points


Question 11 of 20
Which of the following tags in struts-config.xml file defines the availability of necessary Struts JSP custom tag
libraries?

A. < jsp-lib>

B. < taglib>

C. < struts-taglib>
D. < jsp-taglib>

5.0/ 5.0 Points


Question 12 of 20
<logic:empty> tag in Struts 1.x is used to ___________

A. Evaluate the nested body content of this tag if the requested variable is either null or an empty
string

B. Evaluate the nested body content of this tag if the specified value is an appropriate substring
of the requested variable

C. Evaluate the nested body content of this tag if the requested variable is greater than the
specified value.

D. Evaluate the nested body content of this tag if the requested variable is equal to the specified
value

0.0/ 5.0 Points


Question 13 of 20
To specify a form-bean of dynamic validation form, which of the following is used in <form-bean> tag

A. type="org.apache.struts.validator.DynaValidateForm"

B. type="org.apache.struts.validator.DynaValid Form”

C. type="org.apache.struts.validator.DynaValidationForm"
D. type="org.apache.struts.validator.DynaValidatorForm"

5.0/ 5.0 Points


Question 14 of 20
Which of the following delegates the request handling to the RequestProcessor instance?

A. ActionServlet

B. Action class

C. Deployment descriptor

D. None of the above

5.0/ 5.0 Points


Question 15 of 20
MVC stands for?

A. Model / View / Controler

B. Model / View / Controller

C. Model / View / Control

D. Models / Views / Controllers

5.0/ 5.0 Points


Question 16 of 20
Struts framework

A. does not support JavaBeans and EJB

B. should always decouple the application from a specific model implementation

C. provides model components

D. has built-in support for the model

5.0/ 5.0 Points


Question 17 of 20
Declaration of a action as following is____________
<action-mappings>
<action path=""/logon""
type=""com.codementor.LogonAction""
name=""logonForm""
input=""/Login.jsp""
scope=""request"" >
<forward name=""success"" path=""/Success.jsp"" />
<forward name=""failure"" path=""/Failure.html"" />
</action>
</action-mappings>
</struts-config>

True

False

5.0/ 5.0 Points


Question 18 of 20
Encapsulates Domain Logic which are independent of Presentation is responsibility of?

A. M
B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 19 of 20
Calculating Business Process is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 20 of 20
Business delegate pattern

A. Hides remote services complexity

B. Reduces coupling and increases manageability

C. Eases failure recovery


D. All of the above

5.0/ 5.0 Points


Question 1 of 20
Declaration of a action as following is____________
<action-mappings>
<action path=""/logon""
type=""com.codementor.LogonAction""
name=""logonForm""
input=""/Login.jsp""
scope=""request"" >
<forward name=""success"" path=""/Success.jsp"" />
<forward name=""failure"" path=""/Failure.html"" />
</action>
</action-mappings>
</struts-config>

True

False

5.0/ 5.0 Points


Question 2 of 20
Performing DB Queries is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)
5.0/ 5.0 Points
Question 3 of 20
<logic:present> tag in Struts 1.x is used to ___________

A. Evaluate the nested body content of this tag if the requested variable is not equal to the
specified value

B. Evaluate the nested body content of this tag if the requested variable is either null or an empty
string.

C. Generate the nested body content of this tag if the specified value is present in this request.

D. Generate the nested body content of this tag if the specified value is present in this request.

5.0/ 5.0 Points


Question 4 of 20
Prefix of Struts1.x tag name used in JSP file is

A. <s:

B. <s-

C. <html-

D. <html:

5.0/ 5.0 Points


Question 5 of 20
An instance of Action is invoked by
A. ActionServlet

B. ActionListener

C. RequestProcessor

D. All of the above

5.0/ 5.0 Points


Question 6 of 20
To specify a form-bean of dynamic validation form, which of the following is used in <form-bean> tag

A. type="org.apache.struts.validator.DynaValidateForm"

B. type="org.apache.struts.validator.DynaValid Form”

C. type="org.apache.struts.validator.DynaValidationForm"

D. type="org.apache.struts.validator.DynaValidatorForm"

5.0/ 5.0 Points


Question 7 of 20
Which of the following methods is overridden by Action class?

A. run()

B. service()
C. destroy()

D. execute()

5.0/ 5.0 Points


Question 8 of 20
Which of the following is performed by ActionServlet and RequestProcessor?
1.Receiving the HttpServletRequest
2.Populating JavaBean from the request parameters
3.Displaying response on the web page Issues
4.Content type issues handling
5.Provide extension points

A. 1 and 4

B. 2,3,4,5

C. 3, 4, 5

D. 1,2,4,5

5.0/ 5.0 Points


Question 9 of 20
Business delegate pattern

A. Hides remote services complexity

B. Reduces coupling and increases manageability


C. Eases failure recovery

D. All of the above

5.0/ 5.0 Points


Question 10 of 20
Represents Output/Input of the application is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 11 of 20
Responsible for making decision among multiple presentation is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)
5.0/ 5.0 Points
Question 12 of 20
Struts framework is based on

A. Servlet, JSP and Java

B. Servlet, HTML and Java

C. Servlet, JSP, XML and Java

D. Applet, XML and Java

5.0/ 5.0 Points


Question 13 of 20
ActionServlet, RequestProcessor and Action classes are the components of

A. Model

B. Controller

C. View

D. Deployment

0.0/ 5.0 Points


Question 14 of 20
Which of the following should always forwards or redirect to a resource (view) after completed?
A. Action class

B. HttpResponse object

C. ActionServlet

D. Request Processor

5.0/ 5.0 Points


Question 15 of 20
Which of the following tag is a valid form submission in Struts framework? [ some-action.do is a sample]

A. < html:page-form action="/some-action.do">

B. < html:form action="/some-action.do">

C. < html:web-form action="/some-action.do">

D. < jsp:webform action="/some-action.do">

5.0/ 5.0 Points


Question 16 of 20
Display results of Business Logic is responsibility of?

A. M

B. V
C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 17 of 20
Which of the following tags in struts-config.xml file defines the availability of necessary Struts JSP custom tag
libraries?

A. < jsp-lib>

B. < taglib>

C. < struts-taglib>

D. < jsp-taglib>

5.0/ 5.0 Points


Question 18 of 20
Which validation way is used at client-side?

A. Using Form Bean class

B. Validator Framework

C. Using javascript
D. Using Action Class

5.0/ 5.0 Points


Question 19 of 20
<logic:iterate> tag in Struts 1.x is used to ___________

A. Repeat the nested body content of this tag over a specified collection

B. Repeat the content of this tag over a list

C. Repeat the body content of this tag over an array

D. Repeat the nested body content of this tag over a map

5.0/ 5.0 Points


Question 20 of 20
Which is not True about ActionErrors in Struts 1.x?

A. A validation error, which can handle all errors and exceptions of application

B. A specific validation error, which will be put in the ActionErrors

C. Used in struts to contain all the errors from a validation point

D. Contains an error key (which may be used with the resourse bundle)

5.0/ 5.0 Points


Question 1 of 20
Which of the following tools can be used to stress test the Servlet
1. JMeter from Apache
2. Mercury LoadRunner

A. 1 only

B. 2 only

C. 1,2 both

D. Neither 1 nor 2.

5.0/ 5.0 Points


Question 2 of 20
Which of the following can be used to access database from JSPs?

A.Custom tags

B.Scriplets

C.Directives

D.Beans

5.0/ 5.0 Points


Question 3 of 20
URL encoding is the method of replacing all the spaces and other extra characters into their
corresponding _______ Characters

A. Octal
B. Decimal

C. Binary

D. Hex

0.0/ 5.0 Points


Question 4 of 20
Which tag in the jsp is used to define the error page?

A. location

B. exception-type

C. error-page

D. None of the above

5.0/ 5.0 Points


Question 5 of 20
The ________________________ when added to the user session tells us that the session timed out.

A. SessionTimeoutIndicator

B. SessionTotalTimedoutIndicator
C. SessionTotalTimeOutIndicator

D. SessionTimedoutIndicator

5.0/ 5.0 Points


Question 6 of 20
Which codeline must be set before any of the lines that use the PrintWriter?

A. setPrintType()

B. setContentWriter()

C. setWriter()

D. setContentType()

5.0/ 5.0 Points


Question 7 of 20
All the ___________ data is kept at the application server ___________ data is kept at the web server

A. dynamic, static

B. static, dynamic

C. HTML, Servlet

D. Servlet, HTML
5.0/ 5.0 Points
Question 8 of 20
The _____ method performs the cleanup of objects created during requests and responses between
clients and servers

A. Init()

B. Destroy()

C. Run()

D. Resume()

5.0/ 5.0 Points


Question 9 of 20
Implementing the tag < %@ page isThreadSafe="false" % >implements the SingleThreadModel
interface making the Jsp _________________

A. Content safe

B. Synchornised

C. Thread safe

D. None of the above


5.0/ 5.0 Points
Question 10 of 20
The three main types of JSP constructs that can be embedded in a Java Server page are

A.Scripting Elements

B.Actions

C.Methods

D.Directives

Part 2 of 2 - Part 2 45.0/ 50.0 Points

5.0/ 5.0 Points


Question 11 of 20
A deployment descriptor describes

A. web component response settings

B. web component settings

C. web component request objects

D. All of the above

5.0/ 5.0 Points


Question 12 of 20
The tasks – authentication-blocking of requests, data compression, logging and auditing – are
performed by

A. servlet container

B. servlet config

C. servlet filter

D. servlet context

5.0/ 5.0 Points


Question 13 of 20
Dynamic interception of requests and responses to transform the information is done by

A. servlet container

B. servlet context

C. servlet filter

D. servlet config

5.0/ 5.0 Points


Question 14 of 20
The life cycle of a servlet is managed by

A. servlet context
B. servlet container

C. the supporting protocol (such as http or https)

D. all of the above

5.0/ 5.0 Points


Question 15 of 20
The major difference between servlet and CGI is

A. Servlets are thread based and CGI is process based

B. Servlets executes slower compared to CGI

C. Servlet has no platform specific API, where as CGI has

D. All of the above

5.0/ 5.0 Points


Question 16 of 20
The init parameter name and value pairs that are defined in web.xml file are handled by

A. ServletResponse object

B. ServletConfig object
C. ServletRequest object

D. ServletContext object

5.0/ 5.0 Points


Question 17 of 20
What is the disadvantage of Type-4 Native-Protocol Driver?

A. At client side, a separate driver is needed for each database.

B. It does not support to read MySQL data.

C. The driver converts JDBC calls into vendor-specific database protocol

D. Type-4 driver is entirely written in Java

0.0/ 5.0 Points


Question 18 of 20
The include() method of RequestDispatcher

A. sends a request to another resource like servlet, jsp or html

B. includes resource of file like servlet, jsp or html

C. appends the request and response objects to the current servlet

D. None of the above


5.0/ 5.0 Points
Question 19 of 20
What are the mechanisms available in ServletContextListener interface?

A. contextInit(), contextService(), contextDestroyed()

B. contextInitialized((),contextDestroyed()

C. contextInitialized(), contextService(), contextDestroyed()

D. None of the above

5.0/ 5.0 Points


Question 20 of 20
Which of the following are the session tracking techniques?

A. URL rewriting, using request object, using response object, using session object

B. URL rewriting, using session object, using response object, using hidden fields

C. URL rewriting, using servlet object, using response object, using cookies

D. URL rewriting, using session object, using cookies, using hidden fields

5.0/ 5.0 Points


Question 1 of 20
Which of the following tools can be used to stress test the Servlet
1. JMeter from Apache
2. Mercury LoadRunner

A. 1 only

B. 2 only

C. 1,2 both

D. Neither 1 nor 2.

5.0/ 5.0 Points


Question 2 of 20
Which of the following can be used to access database from JSPs?

A.Custom tags

B.Scriplets

C.Directives

D.Beans

5.0/ 5.0 Points


Question 3 of 20
URL encoding is the method of replacing all the spaces and other extra characters into their
corresponding _______ Characters

A. Octal
B. Decimal

C. Binary

D. Hex

0.0/ 5.0 Points


Question 4 of 20
Which tag in the jsp is used to define the error page?

A. location

B. exception-type

C. error-page

D. None of the above

5.0/ 5.0 Points


Question 5 of 20
The ________________________ when added to the user session tells us that the session timed out.

A. SessionTimeoutIndicator

B. SessionTotalTimedoutIndicator
C. SessionTotalTimeOutIndicator

D. SessionTimedoutIndicator

5.0/ 5.0 Points


Question 6 of 20
Which codeline must be set before any of the lines that use the PrintWriter?

A. setPrintType()

B. setContentWriter()

C. setWriter()

D. setContentType()

5.0/ 5.0 Points


Question 7 of 20
All the ___________ data is kept at the application server ___________ data is kept at the web server

A. dynamic, static

B. static, dynamic

C. HTML, Servlet

D. Servlet, HTML
5.0/ 5.0 Points
Question 8 of 20
The _____ method performs the cleanup of objects created during requests and responses between
clients and servers

A. Init()

B. Destroy()

C. Run()

D. Resume()

5.0/ 5.0 Points


Question 9 of 20
Implementing the tag < %@ page isThreadSafe="false" % >implements the SingleThreadModel
interface making the Jsp _________________

A. Content safe

B. Synchornised

C. Thread safe

D. None of the above


5.0/ 5.0 Points
Question 10 of 20
The three main types of JSP constructs that can be embedded in a Java Server page are

A.Scripting Elements

B.Actions

C.Methods

D.Directives

Part 2 of 2 - Part 2 45.0/ 50.0 Points

5.0/ 5.0 Points


Question 11 of 20
A deployment descriptor describes

A. web component response settings

B. web component settings

C. web component request objects

D. All of the above

5.0/ 5.0 Points


Question 12 of 20
The tasks – authentication-blocking of requests, data compression, logging and auditing – are
performed by

A. servlet container

B. servlet config

C. servlet filter

D. servlet context

5.0/ 5.0 Points


Question 13 of 20
Dynamic interception of requests and responses to transform the information is done by

A. servlet container

B. servlet context

C. servlet filter

D. servlet config

5.0/ 5.0 Points


Question 14 of 20
The life cycle of a servlet is managed by

A. servlet context
B. servlet container

C. the supporting protocol (such as http or https)

D. all of the above

5.0/ 5.0 Points


Question 15 of 20
The major difference between servlet and CGI is

A. Servlets are thread based and CGI is process based

B. Servlets executes slower compared to CGI

C. Servlet has no platform specific API, where as CGI has

D. All of the above

5.0/ 5.0 Points


Question 16 of 20
The init parameter name and value pairs that are defined in web.xml file are handled by

A. ServletResponse object

B. ServletConfig object
C. ServletRequest object

D. ServletContext object

5.0/ 5.0 Points


Question 17 of 20
What is the disadvantage of Type-4 Native-Protocol Driver?

A. At client side, a separate driver is needed for each database.

B. It does not support to read MySQL data.

C. The driver converts JDBC calls into vendor-specific database protocol

D. Type-4 driver is entirely written in Java

0.0/ 5.0 Points


Question 18 of 20
The include() method of RequestDispatcher

A. sends a request to another resource like servlet, jsp or html

B. includes resource of file like servlet, jsp or html

C. appends the request and response objects to the current servlet

D. None of the above


5.0/ 5.0 Points
Question 19 of 20
What are the mechanisms available in ServletContextListener interface?

A. contextInit(), contextService(), contextDestroyed()

B. contextInitialized((),contextDestroyed()

C. contextInitialized(), contextService(), contextDestroyed()

D. None of the above

5.0/ 5.0 Points


Question 20 of 20
Which of the following are the session tracking techniques?

A. URL rewriting, using request object, using response object, using session object

B. URL rewriting, using session object, using response object, using hidden fields

C. URL rewriting, using servlet object, using response object, using cookies

D. URL rewriting, using session object, using cookies, using hidden fields

06_ATJB_Quiz1_ HTML & CSS


Part 1 of 2 - Part 1 50.0/ 50.0 Points
5.0/ 5.0 Points
Question 1 of 20

Choose the correct HTML tag to make a text bold

<b>

5.0/ 5.0 Points


Question 2 of 20

Which tag is used to lists the items with bullets?

<ul>…</ul>

5.0/ 5.0 Points


Question 3 of 20

H1 is the smallest header tag.

False

5.0/ 5.0 Points


Question 4 of 20

<TITLE> … </TITLE> tag must be within

Header

5.0/ 5.0 Points


Question 5 of 20

How to create a form in html page

<form name ="frmName"/>

5.0/ 5.0 Points


Question 6 of 20

<input type="text" /> defines a ... input field that a user can enter text into

one-line

5.0/ 5.0 Points


Question 7 of 20

What is the correct HTML for creating a hyperlink?

<a href="http://www.w3schools.com">W3Schools</a>

5.0/ 5.0 Points


Question 8 of 20

HTML Tags are case sensitive.

False

5.0/ 5.0 Points


Question 9 of 20

What is the full form of HTTP?

Hyper text transfer protocol


5.0/ 5.0 Points
Question 10 of 20

An ordered list starts with the ... tag. Each list item starts with the ... tag.

"<ol>
<li>"

Part 2 of 2 - Part 2 50.0/ 50.0 Points

5.0/ 5.0 Points


Question 11 of 20

What does CSS stand for?

Cascading Style Sheets

5.0/ 5.0 Points


Question 12 of 20

To define the space between the element's border and content, you use the padding property, but are you allowed to
use negative values?

False

5.0/ 5.0 Points


Question 13 of 20

Which CSS property controls the text size?

font-size

5.0/ 5.0 Points


Question 14 of 20

How do you insert a comment in a CSS file?

/* this is a comment */

5.0/ 5.0 Points


Question 15 of 20

What is attribute for <img> tag?

Src

5.0/ 5.0 Points


Question 16 of 20

How do you display a border like this: The top border = 10 pixels, The bottom border = 5 pixels, The left border = 20
pixels, The right border = 1pixel?

border-width:10px 1px 5px 20px

5.0/ 5.0 Points


Question 17 of 20

Which of the following tags below are used for a multi-line text input control?

textarea tag
5.0/ 5.0 Points
Question 18 of 20

Following CSS code is written -


<style>
a:link {
color:#FF0000;
}
a:visited {
color:#00FF00;
}
a:hover {
color:#FF00FF;
}
a:active {
color:#0000FF;
}
</style>
User have created 5 pages and included same css in each page. Each page having list of all 5 pages with links. User
is currently viewing 5.html then color of 5.html will be _______.

Blue

5.0/ 5.0 Points


Question 19 of 20

Which of the following is an attribute of <Table> tag?

CELLPADDING

5.0/ 5.0 Points


Question 20 of 20

Which of the following are true?

<br> is an empty element without a closing tag

The <body> element defines the body of the HTML document.

The <p> element defines a paragraph in the HTML document.


Part 1 of 2 - Part 1 50.0/ 50.0 Points

5.0/ 5.0 Points


Question 1 of 20

What is HTML stands for?

Hypertext Markup Language

5.0/ 5.0 Points


Question 2 of 20

You do not have to connect to the internet to verify changes to a Web page on your computer.
True

5.0/ 5.0 Points


Question 3 of 20

There are_____color names recognized by all version of HTML

16

5.0/ 5.0 Points


Question 4 of 20

A table is divided into rows (with the (1) tag), and each row is divided into data cells (with the (2) tag). A (3) tag
can contain text, links, images, lists, forms, other tables

"(1): <tr>
(2): <td>
(3): <td>"

5.0/ 5.0 Points


Question 5 of 20

Choose the correct HTML tag for the largest heading

<h1>

5.0/ 5.0 Points


Question 6 of 20

How to set a picture as a background web page?

<body background= “backpic.gif”>

5.0/ 5.0 Points


Question 7 of 20

The error message displayed when the page is not found at the correct location.

404

5.0/ 5.0 Points


Question 8 of 20

Choose the correct HTML tag to left-align the content of a cell.

<td align= “left”>

5.0/ 5.0 Points


Question 9 of 20

Which of the following are true?

The <body> element defines the body of the HTML document.

<br> is an empty element without a closing tag

The <p> element defines a paragraph in the HTML document.


5.0/ 5.0 Points
Question 10 of 20

Tables can be nested

True

Part 2 of 2 - Part 2 40.0/ 50.0 Points

5.0/ 5.0 Points


Question 11 of 20

Currently clicking and holding down the mouse button on represents ___________ pseudo class.

a:active

5.0/ 5.0 Points


Question 12 of 20

Which of the following tags below are used for a multi-line text input control?

textarea tag

5.0/ 5.0 Points


Question 13 of 20

Which of the following is correct to set “Black” color as Background of page?

<body bgcolor = “#000000″>

5.0/ 5.0 Points


Question 14 of 20

Which is true to change the text color to red?

<BODY COLOR=RED>

5.0/ 5.0 Points


Question 15 of 20

Which of the following is correct to change font face in Web Page

<font face = “font name”> … </font>

5.0/ 5.0 Points


Question 16 of 20

How do you add a background color for all "<h1>" elements?

h1 {background-color:#FFFFFF}

5.0/ 5.0 Points


Question 18 of 20

Which is the correct CSS syntax?


body {color: black}

5.0/ 5.0 Points


Question 19 of 20

Which of the following is correct HTML for inserting an image?

<img src= “www.ghumti.com/ganesh.jpg” alt= “This is me” />

5.0/ 5.0 Points


Question 20 of 20

How do you change the font of an element?

font-family:

5.0/ 5.0 Points


Question 1 of 20

Which of following HTML Tag will inserting a line break?

<br />

5.0/ 5.0 Points


Question 2 of 20

HTML Tags are case sensitive.

False

5.0/ 5.0 Points


Question 3 of 20

The attributes below can be used in form elements:

onfocus

onselect

onblur

Onsubmit

5.0/ 5.0 Points


Question 4 of 20

Choose the correct HTML tag for the radio button

<input type ="radio"/>

0.0/ 5.0 Points


Question 6 of 20

What is the correct HTML for referring to an external style sheet?

<link rel="stylesheet" type="text/css" href="mainstyle.css">


5.0/ 5.0 Points
Question 7 of 20

Which of the following is a two sided tag?

DL

5.0/ 5.0 Points


Question 8 of 20

How do I add scrolling text to my page?

<marquee>

5.0/ 5.0 Points


Question 9 of 20

Which of the following are true?

The <body> element defines the body of the HTML document.

<br> is an empty element without a closing tag

The <p> element defines a paragraph in the HTML document.

5.0/ 5.0 Points


Question 10 of 20

A homepage is __________

the first page of a website

5.0/ 5.0 Points


Question 11 of 20

What is the correct syntax for removing the default underline from links?

a { text-decoration: none; }

5.0/ 5.0 Points


Question 13 of 20

Which HTML attribute is used to define inline styles?

style

5.0/ 5.0 Points


Question 14 of 20

How do you change the left margin of an element?

margin-left:

5.0/ 5.0 Points


Question 15 of 20

How do you display hyperlinks without an underline?


a {text-decoration:none}

5.0/ 5.0 Points


Question 18 of 20

Which of the following is correct HTML for inserting an image?

<img src= “www.ghumti.com/ganesh.jpg” alt= “This is me” />

06_ATJB_Quiz2_Javascript & Ajax


5.0/ 5.0 Points
Question 1 of 20

Can you write HTML tag inside the javascript ?


<script type=""text/javascript"">
document.write(""<h1>This is a heading</h1>"");
document.write(""<p>This is a paragraph.</p>"");
document.write(""<p>This is another paragraph.</p>"");
</script>

Yes

5.0/ 5.0 Points


Question 2 of 20

We write single ______ before the pseudo-class property.

Colon

5.0/ 5.0 Points


Question 3 of 20

What is the output of following JavaScript code?

<script type=""text/javascript"">
document.write(3 & 5);
</script>

0.0/ 5.0 Points


Question 4 of 20

What is the output of following JavaScript code?


<script type=""text/javascript"">
var queue = new Array();
queue.push(""Mon"");
queue.push(""Tue"");
queue.push(""Wed"");
queue.shift();
queue.pop();
queue.unshift(""Thu"");
document.write(queue.join("" / ""));
</script>

Thu / Tue
5.0/ 5.0 Points
Question 5 of 20

Which of the following JavaScript statements use arrays?

if (i==5)

5.0/ 5.0 Points


Question 7 of 20

JavaScript Onclick Event is equivalent to which two events in sequence

onmousedown and onmouseup

5.0/ 5.0 Points


Question 8 of 20

What is mean by "this" keyword in javascript?

It refers current object

5.0/ 5.0 Points


Question 9 of 20

What is the output of following JavaScript code?


<script type=""text/javascript"">
document.write(2 + 5 + ""8"");
</script>

78

0.0/ 5.0 Points


Question 10 of 20

What is the output of following JavaScript code?

<script type=""text/javascript"">
var cst = ""FPT Software JSC Danang Branch"";
var result = cst.split("" "");
document.write(result);
</script>

"FPT
Software
JSC
Danang
Branch"

5.0/ 5.0 Points


Question 11 of 20

What does the XMLHttpRequest object accomplish in Ajax?

It provides the ability to asynchronously exchange data between Web browsers and a Web server.
5.0/ 5.0 Points
Question 12 of 20

AJAX Stands for:

Asynchronous Javascript and XML

5.0/ 5.0 Points


Question 13 of 20

AJAX based on ______ .

JavaScript and XML

5.0/ 5.0 Points


Question 14 of 20

What is AJAX ?

is a program

5.0/ 5.0 Points


Question 15 of 20

jQuery method to set one or more style properties for selected elements?

css()

5.0/ 5.0 Points


Question 16 of 20

What scripting language is jQuery written in?

JavaScript

5.0/ 5.0 Points


Question 17 of 20

What does the dollar sign in jQuery statement do?

It is used to define or access jQuery

5.0/ 5.0 Points


Question 18 of 20

jQuery method is used to perform an asynchronous HTTP request?

jQuery.ajax()

5.0/ 5.0 Points


Question 19 of 20

What is the correct jQuery code for making all div elements 100 pixels high?

$("div").height(100)
5.0/ 5.0 Points
Question 20 of 20

Is jQuery a library for client scripting or server scripting?

Client scripting

06_ATJB_Quiz3_Servlet & JSP


5.0/ 5.0 Points
Question 1 of 20

URL encoding is the method of replacing all the spaces and other extra characters into their
corresponding _______ Characters

Hex

5.0/ 5.0 Points


Question 2 of 20

The ________________________ when added to the user session tells us that the session timed out.

SessionTimeoutIndicator

5.0/ 5.0 Points


Question 3 of 20

The two different errors that may occur during the lifecycle of JSP are

Request time errors

Translation time errors

5.0/ 5.0 Points


Question 4 of 20

The three main types of JSP constructs that can be embedded in a Java Server page are

Actions

Scripting Elements

Directives
5.0/ 5.0 Points
Question 5 of 20

The _____ method performs the cleanup of objects created during requests and responses between
clients and servers

Destroy()

5.0/ 5.0 Points


Question 6 of 20

The three basic bean tags used in JavaServer Pages are


Jsp:getProperty
Jsp:useBean

Jsp:setProperty

5.0/ 5.0 Points


Question 7 of 20

Which tag in the jsp is used to define the error page?

error-page

5.0/ 5.0 Points


Question 8 of 20

Which of the following tools can be used to stress test the Servlet
1. JMeter from Apache
2. Mercury LoadRunner

1,2 both

5.0/ 5.0 Points


Question 9 of 20

In the properties files _________ defines global Servlet settings and list of servlets in the system.

Session.properties

5.0/ 5.0 Points


Question 10 of 20

Which of the tag is used to show the comments in the JSP page?

<%-- comment -- %>


5.0/ 5.0 Points
Question 11 of 20

RequestDispatcher object is used

to include other resources


5.0/ 5.0 Points
Question 12 of 20

The tasks – authentication-blocking of requests, data compression, logging and auditing – are
performed by

servlet filter

5.0/ 5.0 Points


Question 13 of 20

How many ServletContext objects are available for an entire web application?

Only one
5.0/ 5.0 Points
Question 14 of 20

Dynamic interception of requests and responses to transform the information is done by

servlet filter

5.0/ 5.0 Points


Question 15 of 20

The include() method of RequestDispatcher

includes resource of file like servlet, jsp or html

5.0/ 5.0 Points


Question 16 of 20

What is the disadvantage of Type-4 Native-Protocol Driver?

At client side, a separate driver is needed for each database.

5.0/ 5.0 Points


Question 17 of 20

The method forward(request,response) will

return back to the same method from where the forward was invoked

5.0/ 5.0 Points


Question 18 of 20

To get the servlet environment information

ServletContext object is used

5.0/ 5.0 Points


Question 19 of 20

Servlet mapping defines

an association between a URL pattern and a servlet

5.0/ 5.0 Points


Question 20 of 20

What is the limit of data to be passed from HTML when doGet() method is used?

2K

5.0/ 5.0 Points


Question 1 of 20

_____ is a process which allows the bean container to examine any class at run-time to
determine its method signatures
Reflection

5.0/ 5.0 Points


Question 2 of 20

J2EE consists of the following three tiers

Presentation tier

Business tier

Data tier

5.0/ 5.0 Points


Question 3 of 20

Which of the following statements is true about JSP tag library?

All of the above

5.0/ 5.0 Points


Question 4 of 20

Under JSP 1.0 , the implicit object which can be used for reference. It is used to refer to the
______________

Servlet generated by the JSP page

5.0/ 5.0 Points


Question 5 of 20

The three basic bean tags used in JavaServer Pages are

Jsp:getProperty

Jsp:useBean

Jsp:setProperty

5.0/ 5.0 Points


Question 6 of 20

Which of the following statement is false for the tag?

It offers option of sharing local variables and better run time efficiency

5.0/ 5.0 Points


Question 7 of 20

Which of the tag contains a code fragment valid in the page scripting language?

<% code fragment %>


5.0/ 5.0 Points
Question 8 of 20

A java bean in a JSP can have which of the following attributes

Page

Request

Session

5.0/ 5.0 Points


Question 9 of 20

In the properties files _________ defines global Servlet settings and list of servlets in the
system.

Session.properties

5.0/ 5.0 Points


Question 10 of 20

JSP is the Java platform technology for building applications containing dynamic web
contents such as __________________
1. XHTML
2. XML
3. DHTML
4. HTML

1234

5.0/ 5.0 Points


Question 11 of 20

The getSession() method with „true‟ as its parameter [ getSession(true) ] it will return the
appropriate session object when

the session is existing

0.0/ 5.0 Points


Question 12 of 20

A deployment descriptor describes

web component settings

5.0/ 5.0 Points


Question 13 of 20

The method forward(request,response) will

return back to the same method from where the forward was invoked
5.0/ 5.0 Points
Question 14 of 20

Which method is used to specify before any lines that uses the PintWriter?

setContentType()

5.0/ 5.0 Points


Question 15 of 20

The major difference between servlet and CGI is

Servlets are thread based and CGI is process based

5.0/ 5.0 Points


Question 17 of 20

How many ServletContext objects are available for an entire web application?

Only one

5.0/ 5.0 Points


Question 18 of 20

The tasks – authentication-blocking of requests, data compression, logging and auditing –


are performed by

servlet filter

5.0/ 5.0 Points


Question 19 of 20

The include() method of RequestDispatcher

includes resource of file like servlet, jsp or html

5.0/ 5.0 Points


Question 20 of 20

What is the disadvantage of Type-4 Native-Protocol Driver?

At client side, a separate driver is needed for each database.

5.0/ 5.0 Points


Question 1 of 20

Following method(s) cannot be overridden in the JSP page.

_jspService()

5.0/ 5.0 Points


Question 2 of 20
Implementing the tag < %@ page isThreadSafe="false" % >implements the
SingleThreadModel interface making the Jsp _________________

Thread safe

5.0/ 5.0 Points


Question 5 of 20

The TCP/IP protocol is composed of the following layers

Transmission control protocol

Sockets

Internet protocol

5.0/ 5.0 Points


Question 6 of 20

A java bean in a JSP can have which of the following attributes

5.0/ 5.0 Points


Question 7 of 20

Java Server Pages technology commonly called JSP technology offers the following
advantages
1. Separation of dynamic and static content.
2. Support for scripting and tags
3. Reuse of components and tags.
4. Web access layer for N-tier enterprise application architecture

All of 1 2 3 4

5.0/ 5.0 Points


Question 9 of 20

To show money format on the JSP page we use __________ class

Number Format

0.0/ 5.0 Points


Question 10 of 20

_______ is the process of creating a copy of an object suitable for passing to another
object

Reflection

5.0/ 5.0 Points


Question 12 of 20

What are the mechanisms available in ServletContextListener interface?


contextInitialized((),contextDestroyed()

5.0/ 5.0 Points


Question 17 of 20

The life cycle of a servlet is managed by

servlet container

5.0/ 5.0 Points


Question 19 of 20

Which of the following are the session tracking techniques?

URL rewriting, using session object, using cookies, using hidden fields

5.0/ 5.0 Points


Question 1 of 20

Represents Output/Input of the application is responsibility of?

5.0/ 5.0 Points


Question 2 of 20

<logic:empty> tag in Struts 1.x is used to ___________

Evaluate the nested body content of this tag if the requested variable is either null or an
empty string

5.0/ 5.0 Points


Question 3 of 20

How many instances can be created per application module by the RequestProcessor
class?

One

5.0/ 5.0 Points


Question 4 of 20

An instance of Action is invoked by

RequestProcessor

0.0/ 5.0 Points


Question 5 of 20

Which is not True about ActionErrors in Struts 1.x?

Used in struts to contain all the errors from a validation point


5.0/ 5.0 Points
Question 6 of 20

<logic:present> tag in Struts 1.x is used to ___________

Generate the nested body content of this tag if the specified value is present in this
request.
5.0/ 5.0 Points
Question 7 of 20

A Form Bean class in Struts 1.x extends

ActionForm class
5.0/ 5.0 Points
Question 8 of 20

Application module selection is done by

ActionServlet
5.0/ 5.0 Points
Question 9 of 20

Declaration of a action as following is____________


<action-mappings>
<action path=""/logon""
type=""com.codementor.LogonAction""
name=""logonForm""
input=""/Login.jsp""
scope=""request"" >
<forward name=""success"" path=""/Success.jsp"" />
<forward name=""failure"" path=""/Failure.html"" />
</action>
</action-mappings>
</struts-config>

True

Question 10 of 20 5.0/ 5.0 Points


5/5
Which of the following methods is overridden by Action class?

execute()

5.0/ 5.0 Points


Question 11 of 20

Calculating Business Process is responsibility of?


M

5.0/ 5.0 Points


Question 12 of 20

Which of the java bean tags is used to show the bean value on the web page?

< bean:write>

5.0/ 5.0 Points


Question 13 of 20

Performing DB Queries is responsibility of?

5.0/ 5.0 Points


Question 14 of 20

Display results of Business Logic is responsibility of?

5.0/ 5.0 Points


Question 15 of 20

MVC stands for?

Model / View / Controller

0.0/ 5.0 Points


Question 16 of 20

Contains data and Related Functionality is responsibility of?

5.0/ 5.0 Points


Question 17 of 20

Struts framework is based on

Servlet, JSP, XML and Java

5.0/ 5.0 Points


Question 18 of 20

Which of the following acts as a bridge between user-invoked URI and a


business method?
Action class

5.0/ 5.0 Points


Question 19 of 20

Which of the following tag is a valid form submission in Struts framework? [


some-action.do is a sample]

< html:form action="/some-action.do">

5.0/ 5.0 Points


Question 20 of 20

<logic:iterate> tag in Struts 1.x is used to ___________

Repeat the nested body content of this tag over a specified collection
5.0/ 5.0 Points
Question 1 of 20

Which of the following tags in struts-config.xml file defines the availability of


necessary Struts JSP custom tag libraries?

< taglib>
5.0/ 5.0 Points
Question 2 of 20

<bean:write> tag in Struts 1.x is used to ___________

Render the value of the specified bean property to the current JspWriter
5.0/ 5.0 Points
Question 3 of 20

The dispatch from the controller to the Action class is based on a


configuration that is provided by a

struts-config.xml
5.0/ 5.0 Points
Question 6 of 20

Which of the logic tags is used for repetitive output generation?

< logic:iterate>
0.0/ 5.0 Points
Question 7 of 20

Which of the following should always forwards or redirect to a resource


(view) after completed?
Request Processor
5.0/ 5.0 Points
Question 9 of 20

Which validation way is used at client-side?

Using javascript

5.0/ 5.0 Points


Question 10 of 20

Prefix of Struts1.x tag name used in JSP file is

<html:

5.0/ 5.0 Points


Question 15 of 20

ActionServlet, RequestProcessor and Action classes are the components of

Controller

5.0/ 5.0 Points


Question 17 of 20

Responsible for making decision among multiple presentation is


responsibility of?

5.0/ 5.0 Points


Question 18 of 20

To specify a form-bean of dynamic validation form, which of the following is


used in <form-bean> tag

type="org.apache.struts.validator.DynaValidationForm"

5.0/ 5.0 Points


Question 19 of 20

<logic:empty> tag in Struts 1.x is used to ___________

Evaluate the nested body content of this tag if the requested variable is either null or an empty string
5.0/ 5.0 Points
Question 1 of 20

Which of the following is performed by ActionServlet and RequestProcessor?


1.Receiving the HttpServletRequest
2.Populating JavaBean from the request parameters
3.Displaying response on the web page Issues
4.Content type issues handling
5.Provide extension points

1,2,4,5

5.0/ 5.0 Points


Question 6 of 20

Encapsulates Domain Logic which are independent of Presentation is responsibility of?

5.0/ 5.0 Points


Question 13 of 20

Serves logical connection between user‟s interaction and the business process is responsibility of?

5.0/ 5.0 Points


Question 1 of 20
Declaration of a action as following is____________
<action-mappings>
<action path=""/logon""
type=""com.codementor.LogonAction""
name=""logonForm""
input=""/Login.jsp""
scope=""request"" >
<forward name=""success"" path=""/Success.jsp"" />
<forward name=""failure"" path=""/Failure.html"" />
</action>
</action-mappings>
</struts-config>

True

False

5.0/ 5.0 Points


Question 2 of 20
Performing DB Queries is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 3 of 20
<logic:present> tag in Struts 1.x is used to ___________

A. Evaluate the nested body content of this tag if the


requested variable is not equal to the specified value
B. Evaluate the nested body content of this tag if the
requested variable is either null or an empty string.

C. Generate the nested body content of this tag if the


specified value is present in this request.

D. Generate the nested body content of this tag if the


specified value is present in this request.

5.0/ 5.0 Points


Question 4 of 20
Prefix of Struts1.x tag name used in JSP file is

A. <s:

B. <s-

C. <html-

D. <html:
5.0/ 5.0 Points
Question 5 of 20
An instance of Action is invoked by

A. ActionServlet

B. ActionListener

C. RequestProcessor

D. All of the above

5.0/ 5.0 Points


Question 6 of 20
To specify a form-bean of dynamic validation form, which of the following
is used in <form-bean> tag

A. type="org.apache.struts.validator.DynaValidateForm"

B. type="org.apache.struts.validator.DynaValid Form”

C. type="org.apache.struts.validator.DynaValidationForm"
D. type="org.apache.struts.validator.DynaValidatorForm"

5.0/ 5.0 Points


Question 7 of 20
Which of the following methods is overridden by Action class?

A. run()

B. service()

C. destroy()

D. execute()

5.0/ 5.0 Points


Question 8 of 20
Which of the following is performed by ActionServlet and
RequestProcessor?
1.Receiving the HttpServletRequest
2.Populating JavaBean from the request parameters
3.Displaying response on the web page Issues
4.Content type issues handling
5.Provide extension points

A. 1 and 4
B. 2,3,4,5

C. 3, 4, 5

D. 1,2,4,5

5.0/ 5.0 Points


Question 9 of 20
Business delegate pattern

A. Hides remote services complexity

B. Reduces coupling and increases manageability

C. Eases failure recovery

D. All of the above

5.0/ 5.0 Points


Question 10 of 20
Represents Output/Input of the application is responsibility of?

A. M
B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 11 of 20
Responsible for making decision among multiple presentation is
responsibility of?

A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 12 of 20
Struts framework is based on

A. Servlet, JSP and Java

B. Servlet, HTML and Java

C. Servlet, JSP, XML and Java

D. Applet, XML and Java

5.0/ 5.0 Points


Question 13 of 20
ActionServlet, RequestProcessor and Action classes are the components
of

A. Model

B. Controller

C. View

D. Deployment
0.0/ 5.0 Points
Question 14 of 20
Which of the following should always forwards or redirect to a resource
(view) after completed?

A. Action class

B. HttpResponse object

C. ActionServlet

D. Request Processor

5.0/ 5.0 Points


Question 15 of 20
Which of the following tag is a valid form submission in Struts
framework? [ some-action.do is a sample]

A. < html:page-form action="/some-action.do">

B. < html:form action="/some-action.do">


C. < html:web-form action="/some-action.do">

D. < jsp:webform action="/some-action.do">

5.0/ 5.0 Points


Question 16 of 20
Display results of Business Logic is responsibility of?

A. M

B. V

C. C

D. All (M, V, C)

5.0/ 5.0 Points


Question 17 of 20
Which of the following tags in struts-config.xml file defines the availability
of necessary Struts JSP custom tag libraries?

A. < jsp-lib>
B. < taglib>

C. < struts-taglib>

D. < jsp-taglib>

5.0/ 5.0 Points


Question 18 of 20
Which validation way is used at client-side?

A. Using Form Bean class

B. Validator Framework

C. Using javascript

D. Using Action Class

5.0/ 5.0 Points


Question 19 of 20
<logic:iterate> tag in Struts 1.x is used to ___________

A. Repeat the nested body content of this tag over a specified


collection

B. Repeat the content of this tag over a list

C. Repeat the body content of this tag over an array

D. Repeat the nested body content of this tag over a map

5.0/ 5.0 Points


Question 20 of 20
Which is not True about ActionErrors in Struts 1.x?

A. A validation error, which can handle all errors and


exceptions of application

B. A specific validation error, which will be put in the


ActionErrors

C. Used in struts to contain all the errors from a validation


point

D. Contains an error key (which may be used with the


resourse bundle)

Potrebbero piacerti anche