PRX301 - P2
Which of the elements defined within the taglib element of taglib descriptor file are required. Select the two correct answers
A. tlib-version B.short-name
Which of these is a correct fragment within the web-app element of deployment descriptor. Select the two correct answer
A.<error-page> <error-code>404</error-code> <location>/error.jsp</location> </error-page> D. <error-page> <exception-type>mypackage.MyException</exception-type> <location>/error.jsp</location> </error-page>
Which of the follwing are mandatory elements within the filter element. Select two correct answers.
A.filter-name D.filter-class
A database transaction must be ___
ACID
________ is a technology that allows a server-side script to create dynamic content that is sent to the client's browser
ASP
When selecting elements, the method of using the complete path is referred to as the ________ path, and it is useful for selecting specific elements.
Absolute
What are some CSS limitations when used with XML
Adding functionality , Reordering and sorting , Generation of text
How is an empty XML element defined?
All of the above
How is an empty element field defined
All of the above
Which of the following is represented as a node in the tree a DOM parser creates?
All of the above
The HttpServletRequest has methods by which you can find out about incoming information such as:
All of the others
With an extensible Schema definition you cannot:
All the above
Which statement(s) about Servlet Life Cycle is(are) correct? (Choose one)
All the others
Who created it, when?
Also a creation of W3C - first developed in 2001. | Current version: XML 1.0 and XML 1.1
Property documentElement of DOMDocument object return
An object representing the root element if the XML document
Which best describe void?
An operator
Which of the following files is the correct name and location of deployment descriptor of a web application. Assume that the web application is rooted at \doc-root. Select the one correct answer
C. \doc-root\WEB-INF\web.xml
Which of the following is a valid VBScript conversion function
CInt
Which of the following is not a valid HTTP/1.1 method. Select the one correct answer
COMPARE method
Cascading Style Sheets
CSS (acronym)
Select the BEST case to Use Entity Beans? (Choose one)
At any given time, only one client has access to the bean instance.
What does ACID standfor
Atomic, Consistent, Isolated, Durable
Which of the following statement is correct? (choose one)
Authorization means determining whether one has access to a particular resource or not.
What does method characters() of ContentHandler interface receive events for?
Character data
Name the http method used to send resources to the server. Select the one correct answer
B. PUT method
In ejb-jar.xml file, <persistence-type> element value is _________________
Bean or Container
Disadvantages of DTD are
(i)DTDs are not extensible (ii)DTDs are not in to support for namespaces (iii)there is no provision for inheritance from one DTDs to another
What happens when you try to access a JSP
- Browser sends HTTP request to web server
- JSP engine loads the JSP page from disk and converts it into a servlet content.
- JSP engine compiles the servlet
See the snipset below and choose one answer
-2
See the snipset below and choose one answer: <xsl:value-of select="floor(-2.3)"/>
-3
With XPath expressions, _______ are used to select the descendants of an element.
// (double forward slashes)
What is the value of i after the following statements? i = 2; i--; i--;
0
Google Chrome supports XML, XSLT, XPath from version _____.
1
What gets printed when the following is compiled. Select the one correct answer.<% int y = 0; %> <% int z = 0; %> <% for(int x=0;x<3;x++) { %> <% z++;++y;%> <% }%> <% if(z<y) {%> <%= z%> <% } else {%> <%= z - 1%> <% }%>
2
What is the result of the statement 17 % 5?
2
What is the value of num after the following statement is performed? num = Math.round( 2.45 );
2
Apple Safari supports XML and XSLT from version _____.
3
Firefox supports XML, XSLT, and XPath from version _____.
3
What gets printed when the following expression is evaluated? Select the one correct answer. ${(1==2) ? 4 : 5}
5
Internet Explorer supports XML, XSLT, and XPath from version ____.
6
In Xpath, how many type of nodes in the tree
7
Comment in XML document is given by
<!-- -->
For declaring a child element 'message' to occur zero or more times inside the 'note' element, identify the correct
<!ELEMENT element-name (child-name*)>
For the XML parser to ignore a certain section of your XML document, which syntax is correct
<![CDATA[ Text to be ignored ]]>
For the XML parser to ignore a certain section of your XML document, which syntax is correct?
<![CDATA[ Text to be ignored ]]>
Example JSP scriptlet
<% for () {} %>
Which of the following is legal JSP syntax to print the value of i. Select the one correct answer
<%int i = 1;%> <%= i %>
What is the correct declaration syntax for the version of an XML document
<? xml version="1.0"/?>
What is the correct declaration syntax for the version of XML document
<?xml version="1.0"?>
To use the external DTD we have the syntax
<?xml version="A.0" standalone="no"?><! DOCTYPE DOCUMENT SYSTEM "order.dtd"?>
Which of the following XML code snippets is/are correct?
<BOOK> <AUTHOR> abc...</AUTHOR> </BOOK># Which statements are true? | The DTD specifies ... + The DTD contains the list of tags allowed within the XML document, and their types and attributes.
To bind the HTML element <INPUT> Type in text with the datasource " dsoCustomer" we use
<INPUT TYPE="TEXT" DATASRC=" #dsoCustomer" >
Which of the following selections is the proper way to apply this CSS rule: .blue { color: blue }
<P CLASS = "blue">
The \n,\t, \r escape sequences do not affect HTML rendering unless they are used between which tags?
<PRE></PRE>
Setting an element's position to relative is done within which of the following
<STYLE></STYLE>
Which of the following are valid tags?
<fpt_university>
Which of the following XML documents will NOT get successfully validated against the DTD below
<root><root1/><root3/><root3/><root2/></root>
You can name the schema using the name attribute like
<schema name="schema1">
What is the correct syntax for referring to an external script called "xxx.js"?
<script src="xxx.js">
Which of the following xml fragments correctly define a security constraint in web.xml? (Choose one)
<security-constraint><web-resource-collection><web-resource-name>Info</web-resource-name><url-pattern>/info/*</url-pattern><http-method>GET</http-method></web-resource-collection><auth-constraint><role-name>manager</role-name></auth-constraint></security-constraint>
What is the correct HTML for referring to an external style sheet file named mystyle.css?
<style src="mystyle.css">
An attributes can be accessed in the way similar to the elements. Notice ____ in front of the attribute name
@
What are the four annotations used to annotation most methods to specify which operation to invoke
@GET, @POST, @PUT, @DELETE
Annotation for ..
@ManyToMany
Which of the following defines what is meant by a valid document?
A document which conforms to the rules of a DTD
The Filter property should be in which of the following formats?
ColumnName = FilterText
Schemas can be documented in human readable format by using
Comments
xmlDoc.async= 'false' mean:
Complete document must be loaded before futher processing
Unlike most other markup languages, including HTML, XML allows you to do what?
Create new tags
Implements the method of ErrorHandler, EntityResolver, DTDHandler
DefaultHandler
The ______________ is the container-generated implementation of the remote interface
EJB Object
Which of these is legal return type of the doStartTag method defined in a class that extends TagSupport class?
EVAL_BODY
XSL stands for
EXtensible Stylesheet Language
Which of the following statements is not true?
Entities that appear anywhere in an XML document are referred to as Parameter entities
A session bean being used by a client can also be used by another client.
False
All XML markup tags must have an attribute.
False
An object with page scope exists in every JSP of a particular Web application.
False
XML is
Free and Extensible
Which HTTP method gets invoked when a user clicks on a link? Select the one correct answer
GET method
XML is a Complement to
HTML
________ is a markup language for describing how content is rendered and _______ is a markup language for describing structured data—content is separated from presentation.
HTML, XML.
Which of the following method can be used to add cookies to a servlet response?
HttpServletResponse.addCookie(Cookie cookie)
The simplest way to reference a DHTML element is by its ________ attribute
ID
XML document can be viewed in
IE 6.0
What does the following HTML document do? <HTML> <HEAD> <TITLE>DHTML Event Model - ONLOAD</TITLE> <SCRIPT LANGUAGE = "JavaScript"> var value = 0; function startTimer(){ window.setInterval( "updateTime()", 1000 ); } function updateTime(){ value++; pText.innerText = value; } </SCRIPT> </HEAD> <BODY ONLOAD = "startTimer()"> <P><A ID = "pText">0</A></P> </BODY> </HTML>
It counts the number of seconds elapsed viewing the page
In EJB 2.0, ejb-jar.xml deployment descriptor file must be placed in ___________ folder.
META-INF
An attribute contains a
Name/value pair
Select the BEST case to use message-driven bean?(Choose one)
Need to avoid tying up server resources andneed the applications to process messages asynchronously
According to Bohm and Jacopini, which of the following does not follow structured programming?
Nested building blocks
Can we use the annotation @PrePassivate for more than one method in a Entity bean?
No
Which of these is true about deployment descriptors? Select one correct answer
None of the others
What is wrong with the following VBScript code? 1 If (s = t) Then 2 u = s + t 3 ElseIf (s > t) Then 4 u = r 5 Else 6 u = n 7 End If
Nothing
Which of the following is false
Objects do not have the property of information hiding.
Study the statements about web.xml file: 1) The deployment descriptor file is called web.xml, and it must be located in the WEB-INF directory.2) web.xml is in XML (extended markup language) format. Its root element is <web>.
Only statement 1 is true
An XPath _________ is similiar to a programming if...then conditional statement that allows you to select elements based upon certain criteria.
Predicate
Which of the following nodes in a DOM tree are always leaf nodes (nodes with no children)?
Processing Instruction Notation CDATA Section
Which are the types of messaging domains? (choose 2)
Publish/Subscribe
What are the two main purposes of Transaction Support
Recovery, Concurrency
Every method of the remote interface must throw a __________________
RemoteException
XML is a subset of
SGML
Consider the following statements: Statement A: You can point at a single document by using a hyperlink in HTML. Statement B: HTML links are multidirectional. which of the following is correct about the above statements?
Statement A is True, and Statement B is False.
Name the http method that sends the same response as the request. Select the one correct answer
TRACE method
Which of the following is not a type of DTD?
Table based
Which of the following is true?
Text qualifiers encapsulate the data in a field
Which of the following is true statement about the JavaServer Page life cycle?(Choose one)
The _jspService() method is called from the generated servlet's service() method
Which is NOT the BEST case to use Enterprise Java Beans? (Choose one)
The applications are small or medium size.
What does #REQUIRED attributes mean
The attribute value must be included in the element
What is the effect of executing the following JSP statement, assuming a class with name Employee exists in classes package. <%@ page import = "classes.Employee" %> <jsp:useBean id="employee" class="classes.Employee" scope="session"/> <jsp:setProperty name="employee" property="*"/>
The code sets the values of all properties of employee bean to matrching parameters in request object
Which of these are true. Select the two correct answers
The default value of isThreadSafe attribute of page directive is true .When isThreadSafe attribute of page directive is set to true, a thread is created for each request for the page
Which of the following is true regarding the following code? MsgBox( "VBScript is fun!", , "Results" )
The function should be preceded by the keyword Call
Which of the following statements related to the TranformerFactoty class and its methods are false?
The getFeature(String name) method permits the user to set values for specific attributes
Giving a local function variable the same name as a global variable will result in which of the following
The local variable will "hide" the global variable
The main difference between the blendTrans filters and the revealTrans filters is _________.
The revealTrans filter has more transition effects than the blendTrans filter
In CSS, when a style is applied to an element containing other elements inside it
The style is applied to the element and all the other elements contained in it
<!ELEMENT Circle EMPTY> <!ATTLIST Circle radius CDATA "20"> The following code indicates that the circle is defined as an empty element,with the radius attribute having a default value of 20 and type CDATA.
True
A JSP expression is used to insert values directly into the output.
True
All major browsers have support of XML and XSLT.
True
An Xpath expression describes the location of an element or attribute in our XML document
True
Besides testing the values of elements, you can also use predicates to check the values of attributes.
True
There is NO LIMIT to the number of XPath statements that can be combined into one.
True
To be a servlet, a class should extend HttpServlet and override doGet or doPost, depending on whether the data is being sent by GET or by POST.
True
XML parser checks for validity and well formed ness?
True
In simple Type Built into XML schema Boolean type holds
True, False, 1,0
An XML based web application to process audio files which are binary in nature needs to be written.
UDDI
Microsoft XML Schema Data types for Hexadecimal digits representating octates
UUID
JSP1.2 vs. JSP2.0
Version 2.0 incorporated the expression language, which makes your life a lot easier. Otherwise you | have to go through the get property and set property
Which is NOT the role of EJB Deployer?
Write the code that calls on components supplied by bean providers
What are some features of XSD
Written in XML , Support data-types
Deployment properties are stored in a _______________________ file.
XML
no
XML has __________ predefined tags
complement
XML is a _______________ to HTML
independent
XML is a software and hardware __________ tool for carrying information
data transmissions
XML is the most common tool for __________ between all sorts of applications
invented
XML tags are __________ by the author of the XML document
case
XML tags are _____________ sensitive
There is a way of describing XML data, how?
XML uses a DTD to describe the data, XML uses a description node to describe data
valid
XML validated against a DTD is __________ XML
structure, store, transport
XML was created to _______, ________, and ________ information
eXtensible Stylesheet Language Transformation
XSLT (acronym)
displayed by a browser
XSLT can be used to transform XML into HTML, before it is __________
Simple type Built into Schema " data' represent a data in
YYYY-MM-DD
In JavaScript, capital letters are different from lowercase letters?
Yes
An XPath predicate is contained within _________, and comes _______ the parent element of what will be tested.
[ ] , after
raw XML
__________ files can be viewed in all major browsers
XML (definition)
a set of rules for encoding documents in machine-readable form
markup language
a system of symbols (tags) and rules embedded in a document that govern its structure (content) and format (appearance)
Which of the following is not a valid PARAM setting for TDC controls?
a) <PARAM NAME = CLASSID: CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83>
An element declaration has the following syntax:
a. <!ELEMENT element-name category
In which of the following Authentication mechanism, the browser transmits the username and password to the server without any encryption? (Choose one)
a. HTTP BASIC Authentication
Which act as a proxy to an EJB?
a. Remote instance
XML uses
a. an XML Schema to describe the data
XSL ________ how the XML document should be displayed!
a. describes
Consider the following HTML code. Which method of MyFirstServlet will be invoked when you click on the url shown by the page?
a. doGet
XML Schema
an XML-based alternative to DTD
Property documentElement of DOMDocument object return
an object representing the root element if the XML document
XML Can be used to
b. Create new language.
XSL stands for:
b. EXtensible Stylesheet Language
A stateful session bean must commit a transaction before a business method
b. False
XML is a Complement to
b. HTML
Which Java technology provides a unified interface to multiple naming and directory services?
b. JNDI
Can we use the annotation @PrePassivate for more than one method in a Entity bean?
b. No
Which statement is correct about the Java Persistence API support for the SQL queries?
b. The result of a SQL query is not limited to entities
Which is true about the relationship "A keyboard has 101 keys"?
b. This is a one-to-may relationship
Post request put form data in the ___ of the HTTP request
body
To refer to a particular location or element in the array, we specify the name of the array and the ________ of the particular element in the array.
c) position number
PCDATA means:
c. parsed character data
Script-level variables have ________ duration.
d) static
Stylesheet can do have ____ variables with the same name.
d. several
The ____ method is called by the container before the servlet instance is killed
destroy()
Which of the following is not a property of the wave filter?
direction
Which of these is not correct about the filter-mapping element of web-app. Select the one correct answer
dispatcher element can be declared zero to three times in the filter-mapping element
What does XML stand for?
eXtensible Markup Language
Are comments processed by the processor?
f
Parameter entities use ampersand (&) and semicolon (;) as delimiters?
false
Which of the following are declared correctly?
for (var i=0;i<100;++i ) { statement; }
dash, period, colon
for XML best naming practices, what three characters should you avoid?
Initializing an array directly involves using the ________ control structure.
for loop
Which of the following is true?
for loops increment after the body statement is performed and while loops increment in either condition or body
Which of the following is not a JavaScript selection structure
for/in
The ________ property of the wave filter determines how many waves will be applied in the affected area
freq
Which of the following methods would you use to convert a list of Unicode values into a string containing the corresponding characters
fromCharCode
Modules in JavaScript are called ________.
functions
If the HTML form game has a text field named point in it, what is the proper way to set the text associated with point to 10?
game.point.value = "10"
Which of the following statements is correct
if ( studentGrade >= 60 ) document.write( "Passed" );
closing tag
in XML, all elements must have a ____________
Which of the following is example of JSP directive? Select one correct answer.
include
___________________ includes a static file in a JSP file, parsing the file's JSP elements
include directive
# Can a simple type (from XML Schema ) have children
no
In order for elements to be floated, position must be
not absolute
With in a context-param element of deployment descriptor, which of the following element is required?
param-name
Specifies that the attribute cannot be used?
prohibited
The web clients interact with a servlet using a ___/____ pattern
request/response pattern
The _________ attribute lets you chose specific child elements when working with the xsl:apply-templates element.
select
Which of the following is not a border property
shape
The value a in the following statement is called the ________ and the value b is called the ________. face = Math.floor( a + Math.random() * b );
shifting value, scaling factor
The value a in the following statement is called the ________ and the value b is called the ________. face = Math.floor( a + Math.random() * b );
shifting value, scaling factor | See More
Which of the following is a legal function call for the function definition provided below? function square( y ) { return y * y; }
square(7+2);
Which method is used to search for a substring?
stringVariable.indexOf(subString)
Which of the following is not a JavaScript keyword
sub
The ________ multiple selection structure is used to handle multiple decisions making and can be used to replace multiple if and if/else statements
switch
A default value is the value that is assigned automatically to the element when there is no other value specified
t
An XML Schema defines how many child elements can appear in an XML document?
t
By default the white space in elements is not truncated.
t
Each XML document can be represented as a tree structure
t
Elements, attributes and entities can be declared in any order
t
For each element type associated with a sequence element, there must be an element in the XML instance in the same order
t
The appendChild() method links a node to the current node.
t
XML allows data exchange as it has no formatting instructions
t
XML declaration informs the processing agent about the version of XML being
t
XML documents are stored with xml extension
t
XML offers a standard way to add markup to documents
t
XML tags are case sensitive
t
attributes
these provide additional information about an element
root element
this element encloses all other elements and is therefore the sole parent of them all
The do-do methods in a servlet should throws what exception
throws ServletException
Match the xml data againts its corresponding data type in Schema? <start>05:30:10.5</start>
time
right click the page, View Source
to view raw XML on a webpage you must __________ and select __________
Which of the following methods does the JavaScript Boolean object not possess
toInt
W3C DOM uses both tree and object model concepts:
true
XML DOM - defines a standard set of objects for XML documents only
true
XSLT takes two things as input: an XSLT stylesheet and an xml input document
true
Xpath can be thought of as a query language like SQL
true
If the string passed to parseInt contains a floating-point numeric value, parseInt will ________.
truncate the floating-point part
The xml-stylesheet element has which two attributes?
type & href
What are the four key elements of a wsdl file
types, messages, port type, binding,
What is the major difference between Servlet 2.5 and Servlet 3.0
web.xml
In the attribute-type the value which is pre-defined is indicated by:
xml
<?xml version="1.0">
xml declaration
Which top level XSLT elements is used to define a variable in a stylesheet or template and to assign it a value
xsl:variable
Is it legal to have an element and a complex type with the same name ?
yes
Which of the statements regarding the following code are correct? public void doPost(HttpServletRequestreq, HttpServletResponse res) throws IOException, ServletException{res.getWriter().print("Hello ");RequestDispatcherrd = getServletContext().getRequestDispatcher("/test.jsp");rd.include(req, res);res.getWriter().print("World");}
"Hello" and "World" both will be a part of the output.
Given the following deployment descriptor:<web-app> context-param><param-name>jdbcDriver</param-name><param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value></context-param><servlet><servlet-name>InitParams</servlet-name><servlet-class>InitParamsServlet</servlet-class></servlet> ..</web-app>What is the outcome of running the following servlet? (Choose one.)public class InitParamsServlet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {ServletContextsc = this.getServletContext(); PrintWriter out = response.getWriter(); out.write("Initialization Parameter is: " + sc.getInitParameter("jdbcDriver")); }}
"Initialization Parameter is: null" returned to the requester
What is the result of attempting to access the following JSP page?<html><body><%! public String methodA() { return methodB();}%><%! public String methodB() { return "JAD Final Test";}%><h2><%= methodA() %></h2></body></html>
"JAD Final Test" is output to the resulting web page
A textual object is a well formed XML document if
(i) Taken as a whole it matches the production labeled document. (ii) Each of the parsed entity which is referenced directly or indirectly within the document can be well formed
When working with XPath expressions, the ability to combine multiple expressions into one can be done by _________.
(vertical bar aka "pipe")
In an XPath expression, the wildcard _________ can select every child element at once because it automatically matches everything possible.
* (asterisks symbol)
In an XPath expression, if you put _______ where an element would normally go, you can select the parent element.
.. (2 periods)
With XML Schemas, the senders can ________ the data in a way that the receiver will understand
...
External style sheets are saved with the ________ extension.
.css
XSLT files must be save with _______ extension.
.xsl
Which of the following unabbreviated XPath expressions is the same as the abbreviated XPath expression below?/book/chapter[4]/paragraph[2]/sentence[1]
/child::book/child::chapter[position()=4]/child::paragraph[position()=2]/child::sentence[position()=1]
What gets printed when the following expression is evaluated? Select the one correct answer. ${12 % 4}
0
total2 += theArray[ element ]; g)
0 to the array length - 1
Which number gets printed when the following JSTL code fragment is executed? Select the one correct answers.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><c:set var="j" value="4,3,2,1"/><c:forEach items="${j}" var="item" varStatus="status"><c:if test="${status.first}"><c:out value="${status.index}" default="abc"/></c:if></c:forEach>
1
What will the browser display if the following script is executed? < SCRIPT LANGUAGE = "JavaScript" > var theArray = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]; modifyArray( theArray[ 3 ] ); document.write( theArray.join( " " ) ); function modifyArray( i ) { i = 11; } </SCRIPT>
1 2 3 4 5 6 7 8 9
What are the 4 types of cardinality
1..1 , 1.. , ..1 and ..
What would the browser display if it executed the following script? <SCRIPT LANGUAGE = "JavaScript"> for ( var count = 0; count < 10; ++count ) { if ( count == 5 ) continue; } document.writeln( count ); </SCRIPT>
10
What is the evaluation of the following expression? ((3+ (5 + 4) * 7) + 4) / 5
14
What is the value of num after the following statement is performed? num = 2 * Math.pow( 2, 3 );
16
Which numbers gets printed when the following JSTL code fragment is executed? Select the two correct answers. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:set var="j" value="4,3,2,1"/> <c:forEach items="${j}" var="item" begin="1" end="2"> <c:out value="${item}" default="abc"/> </c:forEach>
2 3
What would the browser display if it executed the following script? <SCRIPT LANGUAGE = "JavaScript"> for ( var count = 1; count <= 10; ++count ) { if ( count == 5 ) break; } document.writeln( count ); </SCRIPT>
5
How many numbers are printed, when the following JSTL code fragment is executed? Select the one correct answer.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:forEach var="item" begin="0" end="10" step="2"> ${item} </c:forEach>
6
What would the browser display if it executed the following script? <SCRIPT LANGUAGE = "JavaScript"> var total = 0; stop: { // labeled compound statement for ( var i = 0; i < 5; ++i ) { for ( var j = 0; j < 2 ; ++j ) { if ( i == 2 ) break stop; total++; } total++; } total++; } total++; document.writeln( total ); </SCRIPT>
7
In simple type built into XML schema type flat has single precision of ________ floating point
8 bit
Opera supports XML, XSLT, and XPath from version _____.
9
Which of these is a valid comment in XML?
<!- -This data should be hidden
Which of the following Document type definitions will validate the below XML document successfully ?
<!ELEMENT root EMPTY><!ATTLIST root rootattr CDATA #FIXED "value">,<!ELEMENT root (#PCDATA)>,<!ELEMENT root ANY><!ATTLIST root rootattr CDATA "value">
Which syntax is correct for JSP Scriptlets?
<% code %>
Example JSP scriptlet Declaration
<%! ... %>
Which syntax is correct for JSP Declarations?
<%! code %>
Example JSP expression. This expression is evaluated and turned into a string
<%= string %>
You can set a page to be an error page either through web.xml or by adding a page directive _____
<%@page errorPage="errorPage.jsp" %>
The VBScript operator for inequality is which of the following
<>
Which of the following XML fragments are well-formed?
<?xml version="A.0"?
Which of the following entries in an XML document will cause an application reading the document to use null values for the field named "customerAddress"?
<customerAddress xsd:nill="true"/>
Which of these is a correct fragment within the web-app element of deployment descriptor. Select the one correct answer.
<error-page> <exception-type> mypackage.MyException</exception-type> <location> /error.jsp</location> </error-page>
To compose a schema with the same target namespace you can use
<include schemaLocation="..." />
Which of the following correctly represents the following JSP statement. Select the one correct answer. <%=x%>
<jsp:expression>x</jsp:expression>
A bean with a property color is loaded using the following statement <jsp:useBean id="fruit" class="Fruit"/>Which of the following statements may be used to print the value of color property of the bean?. Select the one correct answer.
<jsp:getProperty name="fruit" property="color"/>
Which of the following is a valid standard action that can be used by a jsp page to import content generated by another JSP file named another.jsp?
<jsp:include page='another.jsp'/>
A bean with a property color is loaded using the following statement
<jsp:setProperty name="fruit" property="color" value="white"/>
A bean with a property color is loaded using the following statement <jsp:useBean id="fruit" class="Fruit"/> Which statement may be used to set the color property of the bean
<jsp:setProperty name="fruit" property="color" value="white"/>
You want to use a bean that is stored in com/enthu/GUI.ser file. Which of following statements correctly defines the tag that accesses the bean?
<jsp:useBean id="pref" beanName="com.enthu.GUI" type="com.enthu.GUI"/>
Which of these is a correct example of specifying a listener element resented by MyClass class. Assume myServlet element is defined correctly. Select the one correct answer
<listener> <listener-class>MyClass</listener-class></listener>
Inside which HTML element do we put the JavaScript?
<script>
Which is the correct way to use the union operator
<xsl:apply-templates select='/CD/Artist | /Tape/Artist' />
Which of the following set of statements will you use to process all the child nodes of the root node?
<xsl:template match= "/"> <xsl:apply-templates/> </xsl:template>
To match the root node in XMLT transform the syntax will be
<xsl:template match=" /">
If we wanted to find book elements in an XML document, we would set the match attribute to a simple XPath expression: book, and the code would look like this:
<xsl:template match="book">
Which of the following is not a valid equality or relational operator?
=
Annotation for 1..*
@OneToMany
Annotation for 1..1
@OneToOne
The _____ annotation can be used to bind template parameters to a resource class field
@PathParam
___, ____ annotations are used to specify data format to be sent out or recieved
@Produces, @Consumes
Which of the following statements are correct about the status of the Http response. Select the one correct answer.
A status of 200 to 299 signifies that the request was successful.
Which of these are legal return types of the doEndTag method defined in a class that extends TagSupport class. Select the two correct answers.
A. EVAL_PAGE (E.SKIP_PAGE)
A user types the URL http://www.javaprepare.com/scwd/index.html . Which HTTP request gets generated. Select the one correct answer
A. GET method
Which of the following are correct statements? Select the two correct answers
A.The getRequestDispatcher method of ServletContext class takes the full path of the servlet, whereas the getRequestDispatcher method of HttpServletRequest class takes the path of the servlet relative to the ServletContext C.The getRequestDispatcher(String URL) is defined in both ServletContext and HttpServletRequest method
Which element of the servlet element in the deployment descriptor is used to specify the parameters for the ServletConfig object. Select the one correct answer.
B. init-param
The ______________ supplies business components, or enterprise beans.
Bean provider
Which statement is correct about Bean-managed persistent (BMP)?
Bean-managed persistent persisted by the developer, who write the code for the database access calls
The ________ parses and translates all inbound and outbound messages going to and from a business.
BizTalk Server.
What does the keyword SYSTEM indicate in the following code? <!DOCTYPE Book SYSTEM "book.dtd">
Book.dtd is an internal DTD
Consider the following statements: Statement A: XML is a text-based markup language that enables you to store data in a structured format by using meaningful tags. Statement B: XML allows you to format data as per the requirements of the application.Which of the following is correct about the above statements?
Both, Statement A and Statement B, are True.
Which of the following represents the XML equivalent of this statement <%@ include file="a.jsp"%> . Select the one correct statement
C. <jsp:directive.include file="a.jsp"/>
A bean with a property color is loaded using the following statement <jsp:usebean id="fruit" class="Fruit"/> What happens when the following statement is executed. Select the one correct answer. <jsp:setProperty name="fruit" property="*"/>
C. All the properties of the fruit bean are assigned the values of input parameters of the JSP page that have the same name
Which three digit error codes represent an error in request from client? Select the one correct answer
C. Codes starting from 400
Consider the following XML document: <?xml version="1.0"?> <ORDERDETAILS> <PRODUCT ID="P001" NAME="Mini Bus" PRICE="75"><ORDER ID="O001"> <SHIP_ADD>10 NEWSLAND ESTATE, NY</SHIP_ADD> <QUANTITY>30</QUANTITY> </ORDER> <ORDER ID="O002"> <SHIP_ADD>11 NEWSLAND ESTATE, NY</SHIP_ADD> <QUANTITY>50</QUANTITY></ORDER> </PRODUCT> </ORDERDETAILS> Which of the following code snippets will you use to display the product of price and quantity
Choose D
What does CGI stand for
Common gateway interface
A ___________________________ in EJB is an object that is deploy on any EJB Server
Component
Which statement is correct about Container-managed persistent (CMP)?
Container-managed persistent persisted by the Enterprise Java Beans container
The instantiation of a session bean is done by the ____________________ while the management of the lifetime of the bean is done by the ___________________________.
Container/EJB server
Which one of the following sets of interfaces are part of the SAX2 API?
ContentHandler, ErrorHandler, and DTDHandler
A variable that your webpage can store on or retrieve from the users computer is known as
Cookie
XML Can be used to
Create new language
Which of the following is not a keyword used for default settings in an! ATTLIST element?
DEFINE
John, an XML developer, uses DOM to define the logical structure of documents and the way a document is accessed and manipulated. He wants to use XML DOM objects to traverse, read, and manipulate the structure and content of an XML document. John wants to represent the complete document map, which contains all the information in an XML document. He also wants to create an instance of the DOMDocument object to be able to work with any XML document. Which one of the following objects should John use?
DOMDocument
The DOM specification describes how strings are to be manipulated by the DOM by defining the datatype _______. It is encoded using _______ encoding scheme
DOMString, Unicode
Document Type Definition
DTD (acronym)
Which of the following cannot be a part of a SOAP message?
DTD Processing Instruction
Which of the following statements does not correctly identify the limitations of DTDs ?
DTD can be changed programatically using the DocumentType interface in DOM
In SAX, to provide customized DTD handling, application need to implement
DTDHandler
In SAX, to provide customized DTD handling, application need to implement :
DTDHandler
Which of the following statements about namespaces and DTDs are false?
DTDs for a document with namespace qualified elements cannot be written since DTDs do not support namespaces
What does DDL stand for
Data Definition Language
XSL is BEST described as a
Declarative language
Which of the following XML based technologies can be considered as XML metadata?
Document Type Definition, XML Schema
The default scripting language for Netscape and Internet Explorer is ________
ECMAScript
Default Fetch Behavior for Many-To-One
Eager
Default Fetch Behavior for One-To-One
Eager
Whats so great about XML?
Easy data exchange & High speed on network
Which of the following statements about XSL formatting objects are false ?
Elements in XSL-FO objects map to the boxes on the page in a one to one fashion
Which Statement about xml is true?
Elements may nest but not overlap
Which of the following is/are optional in the creation of an XML file?
Entities
HTML code:<B> Customer </B><p>Michelle Abraham <br> Salmonella Apartments<br> Programmer<br></p>Peter is asked to represent the information given in the HTML code snippet above in XML. He represents the information as follows: <CUSTOMER> <NAME> Michelle Abraham <ADDRESS> Salmonella Apartments </NAME> </ADDRESS> PROFESSION> Programmer </PROFESSION> </CUSTOMER> Identify the error in the above code and suggest a solution for the same.
Error on line: <NAME> Michelle Abraham <ADDRESS> Salmonella Apartments </NAME> </ADDRESS> . Solution: The closing tag of the Name element should be written before the ADDRESS element.
What is XML
Extensible Markup Language: an application- and platform-independent way to represent data
The acronym XSLT stands for __________.
Extensible Stylesheet Language Transformations
The ________ attribute of the ________ element specifies another element that is identified by its ________ attribute
FOR, SCRIPT, ID
The ________ attribute of the ________ element specifies another element that is identified by its ________ attribute.
FOR, SCRIPT, ID.
What would the browser display if the following code is executed in a script? var grade = 59 if ( grade >= 60 ) document.writeln( "Passed." ); else document.write( "Failed. " ); document.writeln( "You must take this course again." );
Failed
Use the ___ request when no data is sent
GET
what is the purpose of HTML
HTML - designed to display data, with focus on how data looks
Which of the following statements w.r.t XLinks and HTML links are true ?
HTML links cannot be used for multi directional navigation, XLinks can be used to link documents without modifying the documents to include the links
________ is a markup language for describing how content is rendered and ________ is a markup language for describing structured data—content is separated from presentation.
HTML, XML.
Any class that extends ____ is a servlet
HTTPServlet
Name the class that includes the getSession method that is used to get the HttpSession object.
HttpServletRequest
Which class that includes the getSession method that is used to get the HttpSession object?
HttpServletRequest
The method getWriter returns an object of type PrintWriter. This class has println methods to generate output. Which of these classes define the getWriter method? Select the one correct answer.
HttpServletResponse
Which of the following is false?
In any flowchart, control structure (sequence, if, if/else, switch, while, do/while or for) can be replaced by 2 rectangle (actions) in sequence
Which of the following is false?
In any flowchart, control structure (sequence, if, if/else, switch, while, do/while or for) can be replaced by 2 rectangle (actions) in sequence.
Which of the following is indicated by URL, which is used on the Internet?
Information resources(sources) on the Internet
________ are declared in each individual HTML element using the keyword STYLE.
Inline styles
The VBScript ________ function has the same purpose as JavaScript's window.prompt method
InputBox
Identify correct statement about a WAR file.(Choose one)
It contains web components such as servlets as well as EJBs.
What does the ScriptEngine function do?
It returns the type script being used
What would the function cube return, assuming it is called with the line cube(3). function cube(y); { return y y y; }
JavaScript runtime error
See the snipset below and choose one answer: <xsl:for-each select="LIST//TITLE">...</xsl:for-each>
Match all <TITLE> elements one or more level deep in the <LIST> element
A _____ _____ is used to receive a message from a queue
Message Listener
Which statement is correct about Message-Driven Beans exception handling?
Message-Driven Beans cannot send any exceptions back to clients
Which statement is correct about Message-Driven Beans?(Choose one)
Message-Driven Beans stateless
In DOM, a node can have
More than one children nodes
Allow to validate documents that use markup from multiple namespaces?
Namespace support
Is the following attribute valid? <!ATTLIST Test4 an_attribute ID #FIXED "value">
No
Is the following JSP code legal? Select the one correct statement. <%@page info="test page" session="false"%> <%@page session="false"%>
No. This code will generate syntax errors
Which of the following schema fragments is the same as the DTD fragment below ? <!ELEMENT myElement EMPTY>
None of the above
What is wrong with the following line of code? <P><FONT SIZE='5'>This is a test.</FONT></P>
Nothing
What gets printed when the following JSTL code fragment is executed? Select the one correct answer.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:set var="item" value="2"/> <c:if test="${var==1}" var="result" scope="session"> <c:out value="${result}"/> </c:if>
Nothing gets printed.
________ fires when the right mouse button is clicked.
ONCONTEXTMENU
What would the browser display if the following script was executed? <SCRIPT LANGUAGE = "JavaScript"> for( var i = 0; i < 5; i++ ) document.write("O"); </SCRIPT>
OOOOO
How many numbers gets printed when the following JSTL code fragment is executed? Select the one correct answer.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:set var="item" value="2"/> <c:choose> <c:when test="${item>0}"> <c:out value="1"/> </c:when> <c:when test="${item==2}"> <c:out value="2"/> </c:when> <c:when test="${item<2}"> <c:out value="3"/> </c:when> <c:otherwise> <c:out value="4"/> </c:otherwise> </c:choose>
One number gets printed.
Identify the correct statements
PCDATA means that the element contains data that is to be parsed by a parser. + #CDATA means that the element contains character data that is not to be parsed
Use the ____ request when sending data to the server
POST
You do not want the user to see the data and the format being passed to your server when the user tries to submit the information for registering with your site. Which HTTP method would you use? (Comment: You can set some hidden parameters such as server location, in the page when the user loads it. Such parameters mean nothing to the user and are generally not displayed. However, determined users can still view them using "View Source" for the page).
POST
Which of the following statements regarding processing instructions are true ?
Processing instructions can be used as a mechanism for extending schemas that cannot otherwise be modified, The target for a processing instruction must be a valid XML name
SAX uses :
Push parsing machenic for processing
Which of these is not a valid value for dispatcher element of filter-mapping. Select the one correct answer.
RESPONSE
What are the two prevailing styles of web services
RESTFUL and SOAP
Which of the following is NOT done with JavaScript
RGB Colors
The XSLT processor begins at the ______ element when looking for template matches.
Root
When you are using the absolute path to locate an element, your expression must start with the _________ element of your XML document.
Root
A county library uses an XML based application to query an XML database of books maintained
SAX
An XML based application maintains a very large configuration file in XML format.
SAX
____ is a java api for xml parsing
SAX
What are two types of XML Parsers
SAX, DOM
The sendRedirect method defined in the HttpServlet class is equivalent to invoking the setStatus method with the following parameter and a Location header in the URL. Select one correct answer.
SC_MOVED_TEMPORARILY
The sendRedirect method defined in the HttpServlet class is equivalent to invoking the setStatus method with the following parameter and a Location header in the URL. Select the one correct answer
SC_MOVED_TEMPORARILY
Which interface and method should be used to retrieve a servlet initialization parameter value? (Choose one)
ServletConfig : getInitParameter(String name)
Consider the following statements: Statement A: Java Architecture for XML Binding (JAXB) provides a fast and convenient way to bind between XML schemas and Java representations, making it easy for Java developers to incorporate XML data and processing functions in Java applications. Statement B: JAXB provides methods for unmarshalling (writing) XML instance documents into Java content trees, and then marshalling (reading) Java content trees back into XML instance documents.
Statement A is True, and Statement B is False.
Consider the following statements: Statement A: The xjc schema compiler, also called the binding compiler, is an important part of a JAXB implementation. The compiler binds a source XML schema to a set of schema-derived program elements. The binding is described by an XML-based binding language in a binding file. The binding compiler produces a set of packages containing Java source files and JAXB property files. Statement B: In most cases, the default bindings generated by the binding compiler are sufficient. However, there are cases where you might want to modify the default bindings (for example, you might want to provide more meaningful package names than are generated by default), you can use the following syntax: xjc schema_file.xsd ""g package_name
Statement A is True, and Statement B is False.
Consider the following statements: Statement A: You can use the <!ATTLIST> statement in a DTD to declare an attribute for an element. Statement B: A single <!ATTLIST> statement can be used to declare multiple attributes for an element.Which of the following is correct about the above statements?
Statement A is True, and Statement B is False.
Consider the following statements: Statement A: XML stand for eXtensible Markup Language. Statement B: CSS stand for Creative Style Sheets.Which of the following is correct about the above statements?
Statement A is True, and statement B is False.
Identify the correct statements:
Tags from multiple namespaces can be mixed. + XSL uses the prefix 'xsl:' for elements in the XSL namespace
Which of the following statement is correct. Select the one correct answer
The HttpServletResponse defines constants like SC_NOT_FOUND that may be used as a parameter to setStatus method
What gets printed when the following JSP code is invoked in a browser? Select one correct answer. <%= if(Math.random() < 0.5) %> hello<%= } else { %> hi<%= } %>
The JSP file will not compile
Which of the following is false
The Sort property automatically displays the new order of the data
What are characteristics of XML documents
The documents are self-describing | The documents are a hierarchy of nested objects
Which of the following is true?
The dropShadow filter does not have a direction attribute
Which of the following is the proper method to apply the fliph filter to the following H1 element? <H1 ID = "test">This is a test</H1>
The filter cannot be applied to this element.
Which of the following statements are true for <jsp:usebean>. Select the two correct answers.
The id attribute must be defined for <jsp:usebean>. The <jsp:usebean> must include either type or class attribute or both.
Which of the following is true about Data Integrity?
The information/data is not tampered with, in transit from host to client.
Which of the following is true?
The invert filter applies a negative image effect
What is the effect of the join statement in the following code?
The join method will create a string from the values in theArray1
Which of these is true about deployment descriptors. Select the one correct answer
The order of elements in deployment descriptor is not important. The elements can follow any order
Consider the following HTML document. 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <HTML> 3 <HEAD> 4 <TITLE>Object Model</TITLE> 5 6 <SCRIPT LANGUAGE = "JavaScript"> 7 function start() 8 { 9 alert( pText.innerText ); 10 pText.innerText = "Thanks for coming."; 11 } 12 </SCRIPT> 13 14 </HEAD> 15 16 <BODY ONLOAD = start()> 17 18 <P ID = "pText">Welcome to our Web page!</P> 19 20 </BODY> 21 </HTML> Which of the following selections a true statement?
The pText object does not have an innerText attribute
A JSP page called test.jsp is passed a parameter name in the URL using http://localhost/Final/test.jsp?name=John. The test.jsp contains the following code.<% String myName=request.getParameter("name");%><% String test= "Welcome " + myName; %><%=test%>What is the output?
The page display "Welcome John"
Which of the following is true?
The shadow filter property can be set to exactly 8 different values
What will happen when a servlet makes the following call within its doGet() method? getServletContext().setAttribute("userid", userid);
The userid attribute is placed in application scope.
The resolveEntity method of EntityResolver interface allow the application
To resolve external entity
Which of the following are correct. Select the one correct answer
To use the character %> inside a scriptlet, you may use %\> instead.
Select the word to replace ???to make the diagram about messaging domain correct
Topic
Every XSLT file must include the root element: xsl:stylesheet .
True
HTTP is a "stateless" protocol: each time a client retrieves a Web page, it opens a separate connection to the Web server, and the server does not automatically maintain contextual information about a client.
True
In designating an element in an XML structure, if you wanted to refer to one of the sub elements, you will have to create a string of child elements from the root to the desired child element.
True
Internet Explorer will skip white-space text node that are generated between nodes (e.g. new-line characters), while Mozilla will not.
True
JavaServer Pages (JSP) technology enables you to mix regular, static HTML with dynamically generated content from servlets. You simply write the regular HTML in the normal manner, using familiar Web-page-building tools
True
Message-Driven Bean does not have a home interface, local home interface, remote interface, or a local interface.
True
UDDI stands for which of the following
Universal Description Discovery and Integration
What does UDDI stand for
Universal Description, Discovery and Integration
A University wants to unify all their applications from the various departments in order
Use an XSLT stylesheet to convert the incoming or outgoing XML document into the format used within the division
The ONERROR event is used to handle all of these except
User errors.
A .................... manages the threading for the servlets and JSPs and provides the necessary interface with the Web server
Web Container
A ____ _____ allows you to build app that is interoperable applications
Web Service
What does WSDL stand for
Web service Description Lanaguage
Which of these is true about include directive. Select the one correct answer
When using the include directive, the JSP container treats the file to be included as if it was part of the original file
Which is the BEST case use Container-managed persistent (CMP)?
When you require some kind of special bean, like multi-tables, that cannot be completely realized with a single bean
errors
With XML, __________ are not allowed
CSS (Cascading Style Sheets)
With __________ you can add display information to an XML document
____ is a text based language
XML
SOAP uses ___ and ____
XML and HTTP
quoted
XML attribute values must be __________
plain text format
XML data is stored in __________
display
XML documents do not carry information about how to __________ the data
root element
XML documents must contain a ______________
nested
XML elements must be properly __________
Which of the following resources can be signed using an XML signature?
XML encoded data specific section of an XML file Binary encoded data
xml, variation
XML name cannot start with the letters __________ or any __________ of them
Which of the following statements about XML signatures are true ?
XML signatures have support for non-repudiation of the data that they sign, XML signatures can be used for XML data authentication
LF
XML stores a new line as __________
well formed
XML with correct syntax is __________ XML
The _______ of an identifier for a variable or function is the portion of the program in which the identifier can be referenced.
a) scope
Which of the following are correct JSP expressions
a. <%= new Date() %>
Which of the following statement is a correct JSP directive?(Choose one)
a. <%@ tagliburi="http://www.abc.com/tags/util" prefix="util" %>
A JSP page needs to generate an XML file. Which attribute of page directive may be used to specify that the JSP page is generating an XML file?
a. <%@page contentType ="text/xml">
Which of the following is equivalent <%! ? (Choose one)
a. <jsp:declaration
What is a correct way of referring to a stylesheet called "mystyle.xsl"?
a. <link type="text/xsl" href="mystyle.xsl" />
Which of the following xml fragments correctly define a security constraint in web.xml? (Choose one)
a. <security-constraint>a. <web-resource-collection>a. <web-resource-name>Info</web-resource-name>a. <url-pattern>/info/*</url-pattern>a. <http-method>GET</http-method>a. </web-resource-collection>a. <user-data-constraint>a. <transport-guarantee>CONFIDENTIAL</transport-guarantee>a. </user-data-constraint>a. </security-constraint>
Which statement is true about EJB 3.0 stateful session beans and stateless session beans?
a. Both can have multiple remote and local business interfaces
Which is NOT Enterprise Beans?
a. Business Beans
XML is
a. Free and Extensible
Which of the following methods can be used to add cookies to a servlet response?
a. HttpServletResponse.addCookie(Cookie cookie)
________ can validate your XML against a DTD.
a. Internet Explorer 5.0
The Java Persistent API defines the Query interface. Which statement is true about the Query.executeUpdate method ?
a. It must always be executed within a transaction
Which statement is true about the EJB 3.0 stateful session beans?
a. Its conversational state is retained across method invocations and transactions
Which statement is NOT true about JMS?
a. JMS does NOT depend on MOM (Messaging-Oriented Middleware) products
Which statement about JMS is true?
a. JMS supports Publish/Subcribe
Which is the CORRECT statement about JMS?
a. JMS uses JNDI to find destination
Which is NOT associated with the business tier in a JEE (J2EE) web-based application?
a. JSP
A developer wants to achieve the following two behaviors for an EJB 3.0 session bean:(1) If the client calls a business method with a transaction context, the container will invoke the enterprise bean's method in the client's transaction context.(2) If the client calls a business method without a transaction context, the container will throw the javax.ejb.EJBTransactionRequiredException.Which transaction attribute should be used?
a. MANDATORY
Which statement describe about Message-Driven Beans is correct? (Choose one)
a. Message-Driven Beans are stateful
Study the statements:1) The context path contains a special directory called WEB-INF, which contains the deployment descriptor file, web.xml. 2) A client application may directly access resources in WEB-INF or its subdirectories through HTTP.
a. Only statement 1 is true
Study the statements:<question>1) The context path contains a special directory called WEB-INF, which contains the deployment descriptor file, web.xml.<question>2) A client application may directly access resources in WEB-INF or its subdirectories through HTTP.
a. Only statement 1 is true
Which HTTP method is used in FORM based Authentication?
a. POST
See the extract from web.xml of web application "mywebapp" on server named myserver, runs on port 8080: <servlet-mapping><servlet-name>ServletA</servlet-name><url-pattern>/</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ServletB</servlet-name><url-pattern>/bservlet.html</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ServletC</servlet-name><url-pattern>*.servletC</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ServletD</servlet-name><url-pattern>/dservlet/*</url-pattern></servlet-mapping>Given that a user enters the following into her browser, which (if any) of the mapped servlets will execute? (Choose one.) http://myserver:8080/mywebapp/Bservlet.html
a. ServletA
Which interface can you use to retrieve a resource that belongs to the current web application?
a. ServletContext
Which interface you CANNOT use to obtain a RequestDispatcher Object?
a. ServletContext
Which of the following statements is true? (Choose one)
a. Session data is shared across multiple webapps in the same webserver/servlet container.
_________________ provides a way to identify a user across more than one page request or visit to a Web site and to store information about that user.
a. Session management
Which statements are BEST describe prefix attribute of <%@ taglib prefix=...%>directive of JSP file?
a. Specifies the relative or absolute URI of the tag library descriptor.
Which element defined within the taglib element of taglib descriptor file is required? Select one correct answer.
a. Tag
Which statements are BEST describe name attribute of <jsp:setProperty name=.... /> action?
a. The ID of the JavaBean for which a property (or properties) will be set.
Which statements are BEST describe id attribute of <jsp:useBean id=..... /> Action?
a. The name used to manipulate the Java object with actions <jsp:setProperty> and <jsp:getProperty>. A variable of this name is also declared for use in JSP scripting elements. The name specified here is case sensitive.
Which is NOT belonging to basic three types of EJB?
a. Transfer object
Which of the following elements defines the properties of an attribute that a tag needs?
a. attribute
XML Schema is designed to
a. be self-descriptive
Given a stateless session bean with container-managed transaction demarcation, from which method can a developer access another enterprise bean?
a. business method from the business interface
Which of the following methods will be invoked if the doStartTag() method of a tag returns Tag.SKIP_BODY?
a. doEndTag()
Which method of ReportGeneratorServlet will be called when the user clicks on the URL shown by the following HTML. Assume that ReportGeneratorServlet does not override the service(HttpServletRequest, HttpServletResponse) method of the HttpServlet class. (Choose one)
a. doGet(HttpServletRequest, HttpServletResponse);
a++; is the same as which of the following
a=a+1
________ makes it now possible for data manipulation to be shared by the server and the client.
all of the above
11 The ONFOCUS event fires when ________.
an element is clicked.
The ONBLUR event is associated with ________
an element losing focus.
www.w3schools.com
an excellent XML tutorial can be found here
Which of the following axes can be used together to reference all the nodes in any XML document ?
ancestor, descendant, self, following, preceding
What is the value of s1 after the following code is executed? var s1 = "deitel and associates" s1 = s1.slice( 6 )
and associates
child element
any element located within the root element
Which of the following is INCORRECT statement about implicit objects and scope?
application can't be used to access other web application resources
When processing an output XML, "new line" symbols
are converted to single LF symbol
Identifiers which have static duration ________.
are globally accessible to the script
Functions are invoked by writing the name of the function, followed by the function's ________ in closed parenthesis
arguments
Which of the following is the proper method to access the length of the array arr[]?
arr.length
_________ are data structures consisting of related data items (sometimes called collections of data items)
arrays
<!ELEMENT trial (targets+, source,title+,message*,#PCDATA)> The above example declares that the element trial must contain:
at least one 'target', exactly one 'source', at least one 'title', zero or one 'message', and some other parsed character data.
multiple values, tree structures, expandable
attributes cannot contain __________ or __________ and are not easily __________
How can we make attributes have multiple values:
attributes cannot have multiple values
The CSS specification gives precedence to ________.
author styles over user styles
</SCRIPT>
b) 1 2 3 4 5 6 7 8 9
++test[ 7 ];
b) 4
Which statements are BEST describe prefix attribute of <%@ taglib prefix=...%>directive of JSP file?
b. Specifies the required prefix that distinguishes custom tags from built-in tags. The prefix names jsp, jspx, java, javax, servlet, sun and sunw are reserved.
The xsl:choose element is used for the purpose of selection between the several possibilities.
b. True
XML is the mother of
b. WAP and WML
Which is NOT provided by the EJB tier in a multitier JEE (J2EE) application?
b. XML Parsing
Elements are the main building blocks of both
b. XML and HTML documents
Which directory is legal location for the deployment descriptor file? Note that all paths are shown as from the root of the web application directory.
b. \WEB-INF
CDATA means:
b. character data
Given that a servlet has been mapped to /account/. Identity the HttpServletRequest methods that will return the /account segement for the URI: /myapp/account/.
b. getServletPath
Entities are expanded when a document is parsed by an XML
b. parser
Templates are been ordered according to their ________ which can be specified with the priority attributte.
b. priority
Which of the following defines the class name of a tag in a TLD?
b. tag-class
What should be the return type of the method using @PrePassivate?
b. void
var value = theArray1.join( " " );
c) The join method will create a string from the values in theArray1.
Elements with only character data are declared with
c. #PCDATA
If the DTD is included in your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax:
c. <!DOCTYPE root-element [element-declarations]>
Which of the following are valid iteration mechanisms in jsp?
c. <% int i = 0;for(;i<5; i++){ %>"Hello World";<% i++;}%>
Which of the following constitute valid ways of importing Java classes into JSP page source?
c. <%@ page import="java.util.*" %>
Which is not a correct name for an XML element?
c. <first name>
Which of the following deployment descriptor snippets would you use to declare the use of a tag library?
c. <taglib> c. <taglib-uri>http://abc.net/ourlib.tld</taglib-uri>c. <taglib-location>/WEB-INF/ourlib.tld</taglib-location>c. </taglib>
Which is a valid PostConstruct method in a message-driven bean class?
c. @PostConstruct c. private void init() {}
Which is a valid PostConstruct method in a message-driven bean class?
c. @PostConstruct private void init() {}
How is an empty XML element defined?
c. All of the above.
Which statements are BEST describe taglib directive of JSP file?
c. Allows programmers to include their own new tags in the form of tag libraries. These libraries can be used to encapsulate functionality and simplify the coding of a JSP.
What do you need to create a EJB3 session bean?
c. Annotate the session bean with @Stateful or @Stateless
The requirement for an online shopping application are: It must support millions of customers. The invocations must be transactional. The shopping cart must be persistent. Which technology is required to support these requirements?
c. EJB
Which Statement about xml is true?
c. Elements may nest but not overlap
Which type of JEE (or J2EE) component is used to store business data persistently?
c. Entity Bean
Which statement is true about the use of a persist operation in a transaction of an Entity Beans
c. If a user persists a new entity with an existing primary key the transaction will fail
Which is true about JEE ( or J2EE)?
c. JEE includes servlet APIs and EJB APIs
Which statement describe about JMS is NOT true?
c. JMS use JNDI to locate the destination
EJB 3.0 specifications are first implemented in ________
c. Java EE 5
Which statements are BEST describe <jsp:getProperty> Action?
c. Sets a property in the specified JavaBean instance. A special feature of this action is automatic matching of request parameters to bean properties of the same name.
A developer must implement a "shopping cart" object for a web-based application. The shopping cart must be able to maintain the state of the cart, but the state is not stored persistently. Which JEE (J2EE) technology is suited to this goal?
c. Stateful session beans
Which of the following XML based markup languages provides a protocol for business transactions on the Internet?
cXML.
Every switch structure must have ________ labels which are separated by the keyword break.
case
If we want to select the supplier attribute of it's parent element, chips, our expression would be__________.
chips@supplier
</SCRIPT>
d) 9
Which VBScript function returns an integer indicating the variant subtype?
d) VarType
Which statement about an entity instance lifecycle is correct?
d. A managed entity instance is the instance associated with a persistence context.
A Java developer needs to be able to send email, containing XML attachments, using SMTP. Which JEE (J2EE) technology provides this capability?
d. JavaMail
_____ in XSL do allow the element to be processed for multiple times, each time producing different result.
d. Modes
What is the purpose of JNDI?
d. To access various directory services using a single interface
The World Wide Web Consortium (W3C) started to develop XSL because there was a need for:
d. XML-based Stylesheet Language
Entities are variables used to define
d. common text
A _____ function returns number of nodes present in an argument node-set.
d. count
What does XSL stand for?
d. eXtensible Stylesheet Language
A DTD can be declared inline in your XML document, or as an
d. external reference
Which of these axes which are used in XSL?
d. grand-parent
The ____ instruction do enables the conditional processing.
d. xsl:if
In SAX, to provide customized DTD handling, application need to implement :
dTDHandler
Describing an object in terms of behaviors without concern for how those behaviors are actually implemented is called ___
data abstraction
The statement on line 1 ________ the array while the statement on line 2 ________ the array. 1 var c; 2 c = new Array( 12 );
declares, allocates
In a switch structure, the ________ case clause is used to process exceptional conditions and is usually listed last.
default
An object's methods and attributes are accessed by writing the name of the object followed by the ________.
dot operator
What does XSL stand for?
eXtensible Stylesheet Language
A JSP page has the following page directives:<%@page isErrorPage='false' %> <%@page errorPage='/jsp/myerror.jsp' %> Which of the following implicit object is NOT available to the jsp page?
exception
Identifiers that represent local variables in a function ________.
exist while the function in which they are declared is still active
#REQUIRED specifies that an element is required in all XML documents that use the DTD.
f
DOM 2 doesn't provide mechanism for interrogating and modifying the namespace for a document.
f
DTDs are made up of three blocks of declarations and the DOCTYPE declaration
f
External DTDs use the keyword URL to specify the location of the DTD?
false
Is this statement true or false. The deployment descriptor of a web application must have the name web.xml . In the same way the tag library descriptor file must be called taglib.xml
false
SAX support random access
false
SAX support random access:
false
The default value for the minOccurs attribute in Schema is 0
false
Tree model is applied to static documents?
false
What is the effect of evaluation of following expression? Select the one correct answer. ${(5*5) ne 25}
false
When implementing a tag, if the tag just includes the body verbatim, or if it does not include the body, then the tag handler class must extend the BodyTagSupport class. Is this statement true of false.
false
XML is transformed only via XSLT?
false
Which of the following will evaluate to false
false && false
Which of the following will not evaluate to true?
false || false
The character is referred to as a________.
field delimiter
Which is the proper method to set the mask color?
filter: mask( color = #CCFFFF )
Which of the following settings can be altered to change the darkness of the font
font-weight
Which of the following is declared correctly and will not result in an error assuming x = 2 and y = 30?
for ( var j = x; j <= 80 * y; j += 5 / x )
How does a "for" loop start?
for (i = 0; i <= 5; i++)
When creating our XPath statement, each element is separated by a _________.
forward slash
Which of the following is not one of Bohm and Jacopini's three control structures
goto-less structure
Which of these axes which are used in XSL?
grand-parent
Servlet output is usually ___
html
Which of these represent the correct path for the core JSTL library in JSTL version 1.1? Select the one correct answer
http://java.sun.com/jsp/jstl/core
Which of the following JSP variable is not available within a JSP expression? Select one correct answer
httpsession
Which of the following JSP variables are not available within a JSP expression. Select the one correct answer.
httpsession
single quotes, "data"
if an attribute value itself contains double quotes you can use __________ or __________
A JSP page uses the java.util.ArrayList class many times. Instead of referring the class by its complete package name each time, we want to just use ArrayList. Which attribute of page directive must be specified to achieve this. Select the one correct answer
import
other elements, text, attributes, a mix
in XML, an element can contain _________, __________, __________, or __________
Which of the following are examples of JSP directive. Select the two correct answers.(?)(not checked yet)
include, taglibrary, page
Which of the following methods would you use to search a character for a specific string?
indexOf
_____ method is called when the servlet starts
init()
What are the five principal methods to manage the servlets life cycle
init, service, destroy, getServletConfig, getServletInfo
What are the three JSP Servlet Methods
jspInit()
During the redesign of a legacy system, it is decided to use XML as the data exchange format between
key/keyref
Which of the following statements correctly describe the differences between key/keyref and ID/IDREF ?
key/keyref allows the key to be defined for a set of elements while ID/IDREF allows keys to be defined only for the entire document, key/keyref can be used with elements and attributes, while ID/IDREF can only be used with attributes
The servlet container is responsible for the ____ of the servlet
lifecycle
________ and ________ run slower when they are applied to large arrays
linear search, bubble sort
The ________ attribute added to the ________ element uses your knowledge of XPath to find information in your XML document.
match & xsl:template
In the following line, the word writeln is a ________ which performs a task or action in the script.
method
The "prepackaged" functions that belong to JavaScript objects such as Math.pow and Math.round are often called ________.
methods
If the attribute minOccurs is specified but the attribute maxOccurs is not, what is the default value of the latter ?
minOccurs
Which of the following value pairs for the parameters minOccurs and maxOccurs can be used to indicate the cardinality operator "?"
minOccurs = "0" maxOccurs = "1"
Which of the following are valid combinations of minOccurs and maxOccurs for any element in a xsd:all group ?
minOccurs = 1 maxOccurs = 1 minOccurs = 0 maxOccurs = 1
A JSP file uses a tag as <myTaglib:myTag>. The myTag element here should be defined in the tag library descriptor file in the tag element using which element. Select the one correct answer
name
How do you find the client's browser name?
navigator.appName
With reference to the snippet of code given below, choose the correct syntax to complete the second line in order to create a XML Document Object var sample sample = ________________________
new ActiveXObject("microsoft.XMLDOM")
Which of these are not the valid XML DOM relationships
nextNode
Can you have external entities in an attribute of type CDATA
no
Where on the browser will the command window.status( "text" ) display output?
on the status bar
What is the value of s3 after the following code is executed? var s1 = one, s2 = two, s3 = three; s1.concat(s2) s3 = s1;
onetwo
Onclick is equivalent to which two events in sequence
onmousedown and onmouseup
The ALL value represents all of the cascade ____. For example: @OneToMany(cascade={CascadeType.ALL})
operations
Which package contains the interface that provides methods to parse XML documents
org.xml.sax package
An xsl:numbers do inserts a formatted numbers into the ____
output
Which is detected when the mouse moves over a link?
overMouse event
What is the correct CSS syntax for making all the <p> elements bold?
p {font-weight:bold;}
The ________ is the distance between the content inside an element and the edge of the element.
padding
Name the default value of the scope atribute of <jsp:usebean>.
page
Name the default value of the scope attribute of <jsp:useBean>
page
Name the implicit variable available to JSP pages that may be used to access all the other implicit objects
pageContext
XML DSOs has the property for the number of pages of data the recordset contains
pageCount
Consider the following HTML document. <HTML> <HEAD> <TITLE>Frames collection</TITLE> </HEAD> <FRAMESET ROWS = "100, *"> <FRAME SRC = "top.html" NAME = "first"> <FRAME SRC = "" NAME = "second"> </FRAMESET> </HTML> Which of the following is the proper way to access the frame "second" from the script of an outside document?
parent.frames( " second" )
The format for writing an element-related predicate is:
parent[child some test here]
PCDATA means:
parsed character data
The values of an attribute of type ID is unique
per document instance;
The ________ property of the wave filter shifts the effect in space
phase
If an element's position is declared as absolute then ________
positioning is set according to the margins of its parent element
The ____________________class makes every entity bean different.
primary key
A JavaBeans component has the following field
public void setEnabled( boolean enabled) public booleangetEnabled()
In JavaScript, all objects and Arrays are passed to functions by ________
reference
What does the srcElement event property contain
reference to the element that fired the event
An Entity bean must be capable of forming ____
relationships
CSS positions can be either absolute or ________.
relative
The ____________ interface is a Java interface that enumerates the business methods exposes by the enterprise bean class.
remote
The _______ method is used to remove the attribute node.
removeAttributeNode()
The ______ method can be used to remove the specified node
removeChild()
Elements which have absolute position are automatically ________ the text flow.
removed from
Which of the following best describes the visual effect that alpha is used for
replacing text colors
The _______ of an identifier for a variable or function is the portion of the program in which the identifier can be referenced
scope
Which of the following is not required for counter-controlled repetition
sentinel
A program in which all statements are executed one after the other in the order in which they are written exhibit ________.
sequential execution
___ method is called to process request
service()
JSP pages have access to implicit objects that are exposed automatically. Name the implicit object that is of type HttpSession.
session
Name the method defined in the HttpServletResponse class that may be used to set the content type. Select the one correct answer.
setContent
The third parameter in the addPoint method ________.
sets the height of the point source
The VBScript '&' operator is used for ________.
string concatenation
Which of the following XPath function calls will return the value 10 when invoked ?
string-length("XML-Schema")
If you "import" a stylesheet, the templates in it have lower precedence than those in the current stylesheet.
t
In XML
the internal DTD subset is read before the external DTD
When the TDC is bound to an element, the element's DATASRC attribute should be set to ________.
the name of the TDC object preceded by a #
DTD (document type definition)
the purpose of this is to define the structure of an XML document
<, >, &, ', "
these are the five predefined entity references
An XML Schema defines whether an element is empty or can include text.
true
DOM considers all items present in XML document as node?
true
Each XML document can be represented as a tree structure?
true
For each element type associated with a sequence element, there must be an element in the XML instance in the same order?
true
Is it easier to process XML than HTML
true
Is the following statement true or false. URL rewriting may be used when a browser is disabled. In URL encoding the session id is included as part of the URL.
true
The ContentHandler class provides implementations for the core interface of SAX:
true
The item() method of XMLDOMNodeList and XMLDOMNamedNodeMap return the node present at specified index
true
The xsl:element generates the elements in at time of processing
true
What is the effect of evaluation of following expression? Select the one correct answer. ${'cat' gt 'cap'}
true
XML developer has to ensure the uniqueness of the element names and attributes in a document?
true
What would the browser display if this script was executed? <SCRIPT LANGUAGE = "JavaScript"> var c = new Array(8) for( var i = 0; i < 8; i++ ) c[i] = i; document.write(c[8]) </SCRIPT>
undefined
What would the browser display if this script was executed? <SCRIPT LANGUAGE = "JavaScript"> var c = new Array(8); for( var i = 0; i < 8; i++ ) c[i] = i; document.write(c[8]); </SCRIPT>
undefined
With XML Schemas, the senders can ________ the data in a way that the receiver will
understand ...
The JAXB _____ method is used to read from a URL and convert it from XML to Java String
unmarshal
Call-by- ________ is the method of passing a copy of the argument's value to a function.
value
In JavaScript, numbers and boolean values are passed to functions by ____
value
Which of the following elements is not valid inside a group element in an XBRL document?
value
Which of the following is the proper method to dynamically allocate memory to an array of 100 elements
var c = new Array( 100 );
Which of the following is the proper method to dynamically allocate memory to an array of 100 elements?
var c = new Array( 100 );
You define an array using
var myarray = new Array();
Which of the following is an illegal array initialization statement
var n = new Array( 5 ); n = [ 10, 20, 30, 40, 50
What is the correct way to write a JavaScript array?
var txt = new Array("tim","shaq","kobe")
Which of the following is not a VBScript sub-typ
variant
The XSLT root element has which two required attributes?
version & xmlns:xsl
What should be the return type of the method using @PrePassivate?
void
The root of the deployment descriptor is named as
web-app
There are differences between Internet Explorer's DOM and Mozilla's DOM. The most important difference is that how they handle
white-space text nodes
Which property would you use to redirect visitor to another page?
window.location.href
Which of these is the command to enable error handling on a Web page
window.onError
How do you put a message in the browser's status bar?
window.status = "put your message here"
XSLT
with __________ you can transform an XML document into HTML
To divide the value of the seventh element of array a by 2 and assign the result to the variable x, we would write ________.
x = a[ 6 ] / 2
What would the browser display if the following code is executed in a script? var x = 11, y = 14; if ( x > 13 ) if ( y > 13 ) document.writeln( "x and y are > 13" ); else document.writeln( "x is <= 13" );
x is <= 13
What are the predefined attributes
xml:lang, xml:space
XML Schema file extension is what
xsd
What schema groups should a group of elements be defined under in order to allow them all to appear in any sequence in a document instance?
xsd:all
Which of the following XML Schema elements can be used to make schemas more readable ?
xsd:annotation xsd:appInfo
Assuming that the xsd prefix is mapped to the namespace URI for XML schema, what is the type
xsd:anyType
The ________ element lets you decide when and where your template elements are used.
xsl:apply-templates
The ________ element generates the markup for an element of the specified name in the output HTML
xsl:element
The standard for of an XSLT element is:
xsl:element
The _________ element uses the select attribute to chose elements and obtain their contents.
xsl:value-of
Which top level XSLT element is used to define a variable in a stylesheet or template and to assign it a value
xsl:variable
Consider the contents of 2 jsp files:<!-- In File : test.jsp --><html><body><% String s = "Hello"; %>//1 insert LOC here.<%=s%></body></html><!-- In File : test2.jsp --><% s = s+" world"; %>What can be inserted at //1 so that it prints "Hello world" when test.jsp is requested?
<jsp:include page="test2.jsp"/>
_______________ sends a request to an object and includes the result in a JSP file
<jsp:include>
Which of the following correctly represents the following JSP statement. Select the one correct answer. <%x=1;%>
<jsp:scriptlet>x=1;</jsp:scriptlet>
Which of the following represents a correct syntax for usebean. Select the two correct answers
<jsp:usebean id="fruit type ="String"/> <jsp:usebean id="fruit type ="String" beanName="Fruit"/>
If a ______________is being used then all the operations need to be written by the developer to a persistent API.
Bean-Managed persistent entity bean
A small retailer maintains inventory data in an XML document. This inventory data is read by an application.
DOM Parser
Which of the following statements regarding the differences between DOM and SAX are false ?
DOM is ideally suited than SAX for handling large documents, that may need to be searched efficiently, If random access to an XML document is desired, SAX is better suited than DOM
____ are small java classes that process HTTP request and return HTTP responses
Servlets
___ types of relationships can exist between entity beans
Seven
What does SAX stand for
Simple API for XML
What is the full form of SAX?
Simple API for XML
SOAP stands for
Simple Object Access Protocol
What does SOAP stand for
Simple Object Access Protocol.
The following paragraph describes the differences between XML and HTML but there are some FEATURES are NOT correct. Please find out them. XML features Defined set of tags designed for web display Format drivenEnd tags required for well-formed documents Quotes required around attributes values Slash required in empty tags HTML features User definable tags Content driven End tags not required Quotes not required Slash not required
It should be swap between "Defined set of tags designed for web display" and "Format driven" of XML to "User definable tags" and "Content driven" of HTML
What is the significance of the following CSS rule? LI, EM { color: red;c font-weight: bold }
It will apply the specified style to text enclosed by either LI or EM tags.
What is the significance of the following CSS rule? LI, EM { color: red;cfont-weight: bold }
It will apply the specified style to text enclosed by either LI or EM tags.
What is the significance of the line? LI EM { color: red; font-weight: bold }
It will apply the specified style to text enclosed by the EM tags which are within LI tags.
The properties that characterize transactions are known as ACID properties.
True
The xs:enumeration tag is used to define a valid value for an attribute.
True
XML parser checks for validity and well-formed ness?
True
XML vocabulary is used for specifying formatting
True
XSLT does not physically change an XML document- just how it is displayed.
True
XSLT is used style and transform XML documents.
True
Xslt's styles can be applied to XML elements selectively based on the element's attribute value.
True
Which of the following is the best description of the characters() method?
It is a method of the SAX ContentHandler interface to receive notifications on the presence of character data.
What makes XML Unique
It is a standard that lets users create their own tags to structure and store data
Which of the following statements about XSL formatting objects are true ?
It is possible to perform conditional formatting using XSL FO, It is possible to render a page with multi column layouts using XSL FO, Formatting objects can be used to describe the layout of a rendered page
What does the following CSS rule do? .note { font-size: 1.5em }
It multiplies all text object font sizes with CLASS = "note" by 1.5
What is the effect of the following line of code? window.event.returnValue = true;
It returns a true value to signal the browser to continue its default event-handling action.
What does the ScriptEngine function do
It returns the type script being used.
What will value contain after the following code is executed assuming that Colors is a valid TDC control? value = Colors.recordset;
It will contain the current indexed item of the datasource
What makes XML more powerful than HTML?
Its ability to adapt to new uses
____ allows you to map xml context to and from java objects
JAXB
____ allows you to randomly access stuff in the document unlike SAX
JAXB
Microsoft's version of scripting that uses the Java syntax is called
JScript
Microsoft's version of scripting that uses the Java syntax is called ________.
JScript
What does JAX-RS standfor
Java API for XML and RESTful services
What does JAXB stand for
Java Architecture for xml binding
The word sequence in the term sequence structure refers to the sequence of ________
JavaScript instructions in a script
________ was originally created by ________.
JavaScript, Netscape
How do you find the largest number of 6 and 8?
Math.max(6,8)
_____ in XSL do allow the element to be processed for multiple times, each time producing different result.
Modes
In XPath, you reference an element by using it's __________.
Name
Which of the following represents an abstraction of an unordered collection of nodes in DOM?
NamedNodeMap
JAX-WS supports which type of web service
SOAP
Which of the following statements regarding messaging with SOAP are true?
SOAP is a protocol agnostic methodology of transmitting data to other SOAP enabled applications
Which one of the following is the root element of all XML Schema documents?
Schema
_____ can be used to validate xml documents
Schemas
See the snipset below and choose one answer: <xsl:template match="BOOK*position()!=2+"> <xsl:value-of select="."/> </xsl:template>
Select all BOOK elements that are not the second child of their parents
The xsl:template is used to
Define a template that can be applied to a node to produce desired output
<?xml version="1.0"?> <script> <![CDATA [function matchwo(a,b) { if (a < b && a < 0) then { return 1 } } ]]>
Executes without any error
XPath can locate any type of information in an XML document with one line of code that returns a value when executed and is referred to as a(n) ________.
Expression
What is the format of DTDs ?
Extended Backus-Naur Form (EBNF);
What is XML?
Extensible Markup Language
XSLT is:
Extensible Stylesheet Language Transformation
Consider the following XML document and the attached stylesheet. What is the result of applying
FALSE
In an XPath expression, the element to the right of the double period will have its parent selected.
False
The xsl:value-of element can only be used to retrieve the value of the xml elements; attributes must be retrieved with the xsl:attrib-value element.
False
Unlike XML documents, XSLT documents do not need to include an XML declaration statement at the top of each XSLT document.
False
Using the xsl:prefix before every XSL element is recommended by NOT required.
False
xml:stylesheet is a special declaration for linking XML documents wit XSLT stylesheets, and it must be placed before your xml declaration to successfully link your XML file to your XSLT code.
False
Which of the following statements regarding XLinks are FALSE?
XLinks can be used to connect only two resources
Extensible Markup Language
XML (acronyn)
what is the purpose of XML
XML - designed to transport and store data, with focus on what data is
letters, numbers, other characters
XML names can contain __________, __________, and __________
spaces
XML names cannot contain __________
number, punctuation character
XML names cannot start with a __________ or a __________
A developer is working on a project that includes both EJB 2.1 and EJB 3.0 session beans. A lot of business logic has been implemented and tested in these EJB 2.1 session beans. Some EJB 3.0 session beans need to access this business logic. Which design approach can achieve this requirement?
c. No need to modify existing EJB 2.1 session beans. Use the @EJB annotation to inject a reference to the EJB 2.1 home interface into the EJB 3.0 bean class.
Which is NOT represented in a UML class diagram?
c. The interaction between objects in sequential order
Which is NOT a correct statement about entity beans?
c. They are used to implement business processes
Which is NOT true about stateless session beans?
c. They are used to represent data stored in a RDBMS
Following is the code for doGet() and doPost() method of TestServlet. Which of the statement is correct? image
c. This will work for HTTP GET as well as POST requests.
The xsl:attribute do generates the elements in the time of processing.
c. True
XML is a _______ Recommendation
c. W3C
XSL consists of three parts. Which are?
c. XSLT, Xpath, XSL-FO
You can also use a DTD to verify your own
c. data
You need to make sure that the response stream of your web application is secure. Which factor will you look at? (Choose one)
c. data integrity
With DTD, each of your XML files can carry a ________ of its own format with it.
c. description
Which of these is legal attribute of page directive?.
c. errorPage
The character is referred to as a________ |.
c. field delimiter
VBScript is ________
case sensitive like JavaScript
Which of the following abbreviated XPath expressions is equivalent to the following unabbreviated XPath expression ?child::chapter[attribute::number and attribute::title]
chapter[@number and @title]
Method characters() of ContentHandler interface receives events for
character data
In VBScript, the unit of object-oriented programming is the ________.
class
Which of the following is NOT a valid attribute for a useBean tag?
className
treaming pull parsing refers to a programming model in which _
client application calls methods on an XML parsing library when it needs to interact with an XML infoset
Which statements are BEST describe errorPage attribute of <%@ page errorPage=….%> directive?
a. Any exceptions in the current page that are not caught are sent to the error page for processing. The error page implicit object exception references the original exception.
Review the following scenario; then identify which security mechanisms would be important to fulfill the requirement. (Choose one.) An online magazine company wishes to protect part of its website content, to make that part available only to users who pay a monthly subscription. The company wants to keep client, network, and server processing overheads down: Theft of content is unlikely to be an issue, as is abuse of user IDs and passwords through network snooping.
a. Authorization and Authentication
Which statement is true about both stateful and stateless session beans about bean instances?
a. Bean instances are NOT require to survive container crashes
Which statement is true about EJB 3.0 stateful session beans and stateless session beans? (Choose one)
a. Both can have multiple remote and local business interfaces
Which of the following task may happen in the translation phase of JSP page? (Choose one)
a. Creation of the servlet class corresponding to the JSP file.
What is the consequence of attempting to access the following JSP page? <question><html><question><body><question><%! <question> public void _jspService(HttpServletRequest request, HttpServletResponse response) {<question> out.write("A");<question> }<question> %><question><% out.write("B"); %><question></body><question></html>
a. Duplicate method compilation error.
What is the consequence of attempting to access the following JSP page?<question><html><question><body><question><%!<question> public void _jspService(HttpServletRequest request, HttpServletResponse response) {<question> out.write("A");<question> }<question> %><question><% out.write("B"); %><question></body><question></html>
a. Duplicate method compilation error.
Which class type must be implicitly or explicitly denoted in the persistence.xml descriptor as managed persistence classes to be included within a persistence unit?
a. Entity classes
Which statements are BEST describe prefix attribute of <%@ taglib prefix=…%>directive of JSP file?
a. Specifies the relative or absolute URI of the tag library descriptor.
Which statements are BEST describe property attribute of <jsp:setProperty property=.... /> Action?
a. The ID of the JavaBean for which a property (or properties) will be set.
Which statements are BEST describe property attribute of <jsp:setProperty property=…. /> Action?
a. The ID of the JavaBean for which a property (or properties) will be set.
Which statement is correct about Java EE client of a message-driven beans?
a. The client can use JNDI to obtain a reference to a message destination
Consider the following java code://in file Book.java package com.bookstore;public class Book{private long isbn; public Book(){ isbn = 0; }public long getIsbn(){ return isbn; }public void setIsbn(long value){ this.isbn = value; }}Code for browse.jsp:<jsp:useBean class="com.bookstore.Book" id="newbook" />LINE 1 : <jsp:setProperty name="newbook" property="isbn" value="1000"/> Which of the following statements are correct?
a. The isbn property of newbook will be set to 1000.
A JSP page called test.jsp is passed a parameter name in the URL using http://localhost/Final/test.jsp?name=John. The test.jsp contains the following code.<% String myName=request.getParameter("name");%><% String test= "Welcome " + myName; %><%=test%>What is the output?
a. The page display "Welcome John"
Which statement is true about management of an EJB's resources?
a. The reference to home object is obtained through JNDI to improve maintainability and flexibility.
"Position" function do returns the number equal to context position
a. True
Each page has its own instances of the page-scope implicit objects.
a. True
GET requests and POST requests can both be used to send form data to a web server.
a. True
HTTP is a "stateless" protocol: each time a client retrieves a Web page, it opens a separate connection to the Web server, and the server does not automatically maintain contextual information about a client.
a. True
HttpSession objects have a built-in data structure that lets you store any number of keys and associated values.
a. True
JavaServer Pages (JSP) technology enables you to mix regular, static HTML with dynamically generated content from servlets. You simply write the regular HTML in the normal manner, using familiar Web-page-building tools.
a. True
Objects with application scope are part of a particular Web application.
a. True
Servlet methods are executed automatically.
a. True
The HttpSession method getAttribute returns the object associated with a particular name.
a. True
The following statement is true or false? "If the isThreadSafe attribute of the page directive is true, then the generated servlet implements the SingleThreadModel interface."
a. True
The following statement is true or false? <question>â€oeIf the isThreadSafe attribute of the page directive is true, then the generated servlet implements the SingleThreadModel interface.â€
a. True
The same servlet class can be declared using different logical names in the deployment descriptor.
a. True
The xsl:element generates the elements in at time of processing.
a. True
To read the cookies that come back from the client, you call getCookies on the HttpServletRequest.
a. True
Which is NOT a technique that can be used to implement 'sessions' if the client browser does not support cookies?
a. Using Http headers.
A .................... manages the threading for the servlets and JSPs and provides the necessary interface with the Web server.
a. Web Container
What is the implementation specification of EJB 3 session bean classes?
a. a session bean class must be marked with @Stateless or @Stateful
Which is NOT a scope of implicit objects of JSP file?
a. application
Attributes provide _______ about elements.
a. extra information
Identify the method used to get an object available in a session.(Choose one)
a. getAttribute of HttpSession
Which statement is true about EJB 3.0 containers?
a. javax.naming.initialContext is guaranteed to provide a JNDI name space
It defines the document structure with a list of _______.
a. legal elements
________ is the well-known host name that refers to your own computer.
a. localhost
Which of the following lines of code, in the doPost() method of a servlet, uses the URL rewriting approach to maintaining sessions? (Choose one)
a. out.println("<a href=' "+response.encodeURL("/servlet/XServlet")+" '>Click here</a>"));
An xsl:numbers do inserts a formated numbers into the ______ .
a. output
Which of the following statement correctly store an object associated with a name at a place where all the servlets/jsps of the same webapp participating in a session can access it? Assume that request, response, name, value etc. are references to objects of appropriate types.(Choose one)
a. request.getSession().setAttribute(name, value);
You have to send a gif image to the client as a response to a request. Which of the following calls will you have to make? (Choose one)
a. response.setContentType("image/gif");
JSP __________ let you insert arbitrary code into the servlet's _jspService method (which is called by service).
a. scriptlets
Which of the elements defined within the taglib element of taglib descriptor file are required? Select one correct answer.
a. taglib-location
CDATA is text that _____ be parsed by a parser.
a. will not
a++; is the same as which of the following ?
a=a+1;
The keywords Property Let and Property Set are used for ________.
accessing Private class variables
Which is NOT the main type of JSP constructs that you embed in a page?
actions
A _____ instruction do contains the template, which is been applied to each node selected with the select attribute.
b. xsl:for-each
Value of the local variable is bounded to which element.
b. xsl:when
To specify how whitespace characters should be handled, we would use the whitespace
constraints
Servlets are deployed in a Servlet ____
container
A JSP page needs to generate an XML file. Which attribute of page directive may be used to specify that the JSP page is generating an XML file.
contentType
To construct a relative path expression to select every count element, what would the correct expression look like?
count
Which of the following XSLT functions returns the number of nodes present in the nodeset, passed as an argument
count()
To construct a relative XPath expression to select every count element that has a book ancestor, you would use the code:
book//count
If you wanted to select every cost element that had a book parent, you would use a relative expression like this:
book/cost
The VBScript '+' operator is used for ________.
both a and b
Which of the following is the proper method to access the length of the array arr[]?
c) arr.length
1 _________ are data structures consisting of related data items (sometimes called collections of data items).
c) arrays
2 c = new Array( 12 );
c) declares, allocates
10 Which of the following is an illegal array initialization statement?
c) var n = new Array( 5 );
To divide the value of the seventh element of array a by 2 and assign the result to the variable x, we would write ________.
c) x = a[ 6 ] / 2
Which of the following XSLT functions can be used to return a nodeset with the current context node?
current()
The StAX cursor API represents _______________.
cursor with which you can walk an XML document from beginning to end.
What does the value string contain after the following code is executed? var string = "Good luck on the test"; string = string.charAt( 3 );
d
Which browsers can view the visual effects created by filters and transitions
d) Netscape
23 Giving a local function variable the same name as a global variable will result in which of the following?
d) The local variable will "hide" the global variable.
13 In JavaScript, all objects and Arrays are passed to functions by ________.
d) reference
When the TDC is bound to an element, the element's DATASRC attribute should be set to ________.
d) the name of the TDC object preceded by a The binding of TDC to a table requires setting the DATASRC property in the ________ | a) table element
Which of the following is the proper method to dynamically allocate memory to an array of 100 elements?
d) var c = new Array( 100 );
Which of these characters cannot be used as entity references in XML?
d. $
___ method is called before servlet process ends
destroy()
Method hasChildNodes of XMLDOMNode mean
determine if a given node has child nodes or not
Which of the following flowchart symbols indicates that a decision is to be made?
diamond
The VBScript control structures behave ________ to their JavaScript counterparts and the VBScript control structure syntax is ________ the JavaScript syntax
differently, different than
Which of the following is not a property of the glow filter
direction
Which of the following is not a property of the glow filter?
direction
The technique of developing and maintaining a large program by constructing it from small, simple pieces is called ________.
divide and conquer
which of the following is a JavaScript repetition structure
do/while
Which of the following methods will be invoked if the doStartTag() method of a tag returns Tag.SKIP_BODY?
doEndTag()
What are the two methods that are considered to be the entry point to a servlet
doGet(), doPost()
For XML document to be valid
document need to be well formed & valid
Give the content of books.xml file in the picture.To display the title of book, the following javascript is developed: <script language="javascript"> function fnLoadXML() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", "books.xml", false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; var arrTitle=xmlDoc.getElementsByTagName("title"); for (i=0; i<arrTitle.length; i++) { ??? document.write("<br>"); } }</script>
document.write(arrTitle[i].childNodes[0].nodeValue);
The exception-type element specifies an exception type and is used to handle exceptions generated from a servlet. Which element of the deployment descriptor includes the exception-type as a sub-element. Select the one correct answer
error-page
The exception-type element specifies an exception type and is used to handle exceptions generated from a servlet. Which element of the deployment descriptor includes the exception-type as a sub-element? Do not include the element in enclosing parenthesis
error-page
Which of these are legal attributes of page directive. Select the two correct answers
errorPage . session
With the ________, scripts can respond to a user moving the mouse, scrolling up or down the screen or entering keystrokes.
event model
With the ________, scripts can respond to a user moving the mouse, scrolling up or down the screen or entering keystrokes
event model.
The style of programming in which the user interacts with a GUI component is called ________ programming
event-driven
The method used most often for executing SQL statements is ____
executeQuery
A descendant having a new namespace cannot override the namespace defined by the parrent element?
false
Browser has the ability distinguish duplicate element names in an XML document?
false
Characters like ">" and "&" can be used in PCDATA sections?
false
Struts2 flow of controler (5 things)
filter dispatcher, web.xml, intercepterors, actions, resulting JSP
The TDC Filter property allows you to ________.
filter out all records that do not have a cell matching the text you specify
The outermost layer of the box model is the ___
margin
JAXB ___ method takes a string and converts it into xml
marshal
Well formed XML document means
must contain one or more elements and root element must contain all other elements
Can you define list of lists in XML Schema ?
n
Is the text node a direct child of the enclosing element in XPath
n
Can you retrict the content of an XML element to take only values from an enumeration list (using DTDs)
no
Do you have child nodes of type entity references (internal or external) from XPath's perspective
no
Is the DOCTYPE declaration compulsory ?
no
Is the following attribute valid? <!ATTLIST Test4 an_attribute ID #FIXED "value">
no
is the following element declaration valid in XML Schema
no
Which of the following selections does not follow the rules of operator precedence. Assume that the operators on the left are evaluated first.
parentheses, subtraction, modulus
Which of the following selections does not follow the rules of operator precedence? Assume that the operators on the left are evaluated first
parentheses, subtraction, modulus
Restricts string types using regular expressions?
pattern
Which of the following is NOT a type of popup box
radio
Call-by- ________ is the method of passing the argument's actual location in memory to a function.
reference
The TDC method Reset is used for _____
refreshing the display
Which of the following statement correctly store an object associated with a name at a place where all the servlets/jsps of the same webapp participating in a session can access it? Assume that request, response, name, value etc. are references to objects of appropriate types.(Choose one)
request.getSession().setAttribute(name, value);
The use of a DTD in XML development is
required when validating XML documents
If the string passed to parseInt contains text characters, parseInt will ________.
return NaN
Name the element within the tag element that defines the name of the class that implements the functionality of tag. Select the one correct answer
tag-class
The @ character is referred to as a______
text qualifier
text style sheets use which of the following MIME types?
text/css
What is the "Document Type Declaration" ?
the DOCTYPE declaration
Valid XML document means (most appropriate)
the XML document has DTD associated with it & it complies with that DTD
DTD includes the specifications about the markup that can be used within the document, the specifications consists of all EXCEPT
the browser name
The JavaScript keyword this always refers to ______
the element in which the statement resides
A JSP page will not have access to session implicit variable if:
the session attribute of page directive is set to false
The word top in the term top-down stepwise refinement refers to which of the following
the single statement that completely represents the program
<?xml version=" A.0" standalone=" yes" encoding="UTF-8" ?>
the standalone is wrong
Which element of the deployment descriptor of a web application includes the welcome-file-list element as a subelement. Select the one correct answer.(?)(not checked yet)
welcome-file
All variables declared in function definitions are ________.
local variables
Which of the following values of minOccurs and maxOccurs respectively represent the cardinality operator "+" ?
1, unbounded
A schema describes
(i) grammer (ii) vocabulary (iii) structure (iv) datatype of XML document
What would the browser display if the following script is executed? <SCRIPT LANGUAGE = "JavaScript"> var count = 5, total = 0; while ( count > -1 ) { total = total - 10; count = count - 1; } document.write(total); </SCRIPT>
-60
DOM VS. SAX
-DOM loads the entire document into memory
Microsoft XML Schema Data Type " boolean" has values
1,0
Whenever you need to select an element and use a predicate on that same element, you will need to use a ______ to access that element's value.
. (period)
A program in which all statements are executed one after the other in the order in which they are written exhibit ________.
...
Name the location of compiled class files within a war file? Select the one correct answer
/WEB-INF/classes
What gets printed when the following JSTL code fragment is executed? Select the one correct answer.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:set var="item" value="2"/> <c:forEach var="item" begin="0" end="0" step="2"><c:out value="${item}" default="abc"/></c:forEach>
0
What is output to the web page on the second access to the same instance of the following JSP? <html><body><% int x = 0; %><%= x++ %></body> </html>
0
What is output to the web page on the second access to the same instance of the following JSP?<html><body><%! int x = 0; %><%= x++ %></body> </html>
0
In the following statement, the range of the variable element is ________. for ( var element in theArray ) total2 += theArray[ element ];
0 to the array length - 1
What gets printed when the following expression is evaluated? Select the one correct answer. ${4 div 5}
0.8
What would the browser output if the following script is executed? < SCRIPT LANGUAGE = "JavaScript" > var array = [ [ 1, 2, 3 ], [ 1, 2, 3 ] ]; for ( var i in array ) { for ( var j in array[ i ] ) document.write( array[ i ][ j ] + " " ); document.writeln("<BR>"); } < /SCRIPT >
1 2 3 1 2 3
Which of the following values correctly represent the default values of the minOccurs and maxOccurs attributes respectively ?
1,1
What would the browser display if it executed the following script? <SCRIPT LANGUAGE = "JavaScript"> var total = 0; nextLoop: for ( var i = 0; i < 5; ++i ) { for ( var j = 0; j < 2 ; ++j ) { if ( i < 2 ) continue nextLoop; total++; } total++; } total++; document.writeln( total ); </SCRIPT>
10
What is the value of i after the following statements? i = 2; i += 25
27
What is the evaluation of the following expression? ((3+ ( 5 + 4 ) * 7 ) + 4 ) / 5
14
Which numbers gets printed when the following JSTL code fragment is executed? Select the two correct answers.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:set var="j" value="4,3,2,1"/> <c:forEach items="${j}" var="item" begin="1" end="2" varStatus="status"> <c:out value="${status.count}" default="abc"/> </c:forEach>
2 3
MC: How many comparisons will a linear search function makes before finding a match if the search key has a value of 3 and the array x has the values: x[ 0 ] = 0 x[ 1 ] = 2 x[ 2 ] = 1 x[ 3 ] = 4 x[ 4 ] = 3 x[ 5 ] = 3
5
What are characteristics of HTML tags
HTML tags are predefined with a set meaning
Considering the following XML document, what is the result of count(//*): <?xml version="1.0" encoding="UTF-8"?> <root> <employee id="45"> <name>John</name> <salary>$100,000</salary> </employee> </root>
4
What is the value of num assuming that all 12 elements of array test are initialized to 3? ++test[ 7 ]; var num = test[ 7 ];
4
What would the browser display if the following script was executed and the user entered 5 at both prompts? 1 <SCRIPT LANGUAGE = "JavaScript"> 2 var firstNumber = window.prompt("Enter an integer", 0); 3 var secondNumber = window.prompt("Enter an integer",0); 4 var thirdNumber; 5 thirdNumber = firstNumber + secondNumber; 6 document.write( thirdNumber ); 7 </SCRIPT>
55
What would the browser display if the following script is executed? <SCRIPT LANGUAGE = "JavaScript"> var count = 0, total = 0; while ( count <= 5 ) { total = total + 10; count = count + 1; } document.write(total); </SCRIPT>
60
How many indicators are present in Schema?
7
Consider the following code selections. Assume count is initialized to 7 and num is initialized to 0
7, 0
What would the browser display if this script was executed? <SCRIPT LANGUAGE = "JavaScript"> var c = new Array(8) for( var i = 0; i < 10; i++ ) c[i] = i; document.write(c[9]) </SCRIPT>
9
What would the browser display if this script was executed? <SCRIPT LANGUAGE = "JavaScript"> var c = new Array(8); for( var i = 0; i < 10; i++ ) c[i] = i; document.write(c[9]) </SCRIPT>
9
Which of these characters can be included within the text in an XML document in literal form?
; -
Which of these characters can be included within the text in an XML document in literal form?
; : -
The syntax for parameter entity is
<! ENTITY % NAME DEFINITION>
Which of these is a valid comment in XML?
<!- -This data should be hidden <FIRSTNAME>Joe</FIRSTNAME> <LASTNAME>Johnson</LASTNAME> - ->
To add the attribute named Type to the <customer> tag the syntax will be
<customer Type=" exelent" >
The _________________ is the overall application architect. This party is responsible for understanding how various components fit together and writes the applications that combine components
Application Assembler
Which of the following statement is the correct syntax for declaring an external DTD?
<!DOCTYPE rootelement SYSTEM [element and attribute declarations]>
Identify the correct syntax for declaring an internal DTD
<!DOCTYPE rootelement [element and attribute declarations]>
Which of the following are tags is used to define rules for an element?
<!ELEMENT ... (#PCDATA)>
Which of the following are valid iteration mechanisms in jsp?
<% int i = 0; for(;i<5; i++) { %> "Hello World"; <% i++; } %>
Assume that you need to write a JSP page that adds numbers from one to ten, and then print the output.<% int sum = 0;for(j = 0; j < 10; j++) { %>// XXX --- Add j to sum<% } %>// YYY --- Display the sum Which statement when placed at the location XXX can be used to compute the sum. Select the one correct statement
<% sum = sum + j; %>
Now consider the same JSP example as last question. What must be added at the location YYY to print the sum of ten numbers. Select the one correct statement
<%= sum %>
Your jsp page uses classes from java.util package. Which of the following statement would allow you to import the package? (Choose one)
<%@ page import="java.util.*"%>
The page directive is used to convey information about the page to JSP container. Which statement is legal page directive. Select one correct statement
<%@ page info="test page" session="false"%>
The page directive is used to convey information about the page to JSP container. Which of these are legal syntax of page directive. Select the two correct statement
<%@ page info="test page" session="false"%> <%@ page session="true" %>
Which of the following XML documents are NOT well formed ?
<?xml version="1.0"?><root attr1="val1" attr2="" attr1="test"><root/></root> </root>, <?xml version="1.0"?><root attr1="1value" attr2=""><root> 5 is < than 4 </root> </root>
What is the correct syntax of the declaration which defines the XML version
<?xml version="A.0"?>
Which of the following lines can be used in an XML document named Test.xml to associate it with a stylesheet named Test.css
<?xml-stylesheet href="Test.css" type="text/css"?>
Which of these is the correct syntax to link an XSL file to an XML document?
<?xml-stylesheet type="text/xsl" href="candidate.xsl"?>
Which of the following is the correct processing instruction that specifies an XSL document (myXSL.xsl) to be used to transform an XML document.
<?xml:stylesheet type = "text/xsl" href="myXSL.xsl">
Which of the following code snippet of HTML document are correct structured?
<HTML><HEAD><TITLE>...</TITLE>...</HEAD><BODY ...>...</BODY></HTML>
Which of the following is not a valid PARAM setting for TDC controls?
<PARAM NAME = CLASSID: CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83>
To create a data island we use the _____________HTML element
<XML>
Which of the following elements are used for error handling and are child elements of <web-app> of a deployment descriptor?
<error_page>
Which of the following XML documents are well-formed
<firstElement>some text goes here</firstElement><secondElement> another text goes here</secondElement>
A bean with a property color is loaded using the following statement <jsp:usebean id="fruit" class="Fruit"/> Which of the following statements may be used to print the value of color property of the bean. Select the one correct answer
<jsp:getProperty name="fruit" property="color"/>
Which of the following code snippets would you use to specify a default declaration of a namespace
<schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
You want to create an attribute named "baseprice" with a default value of 200 for the "product" element. The attribute should accept integer values. Which of the following statements will you use to declare the attribute
<xsd:attribute name="baseprice" default= "200" type="xsd:integer"/>
You want to create an attribute named "baseprice" with a default value of 200 for the "product" element. The attribute should accept integer values. Which of the following statements will you use to declare the attribute?
<xsd:attribute name="baseprice" default= 200 type="xsd:integer"/>
To create a choise in XML schemas, we use the
<xsd:choise> element
Which of the following XML Schema element definitions are equivalent to the element definition below ? <xsd:element name="myElement" type="xsd:anyType" />
<xsd:element name="myElement" />
Which one of the following statements can be used to process the element TICKETID, having the TICKET element as its ancestor
<xsl:for-each match = "TICKET[TICKETID]" >
The data about employees is stored in an XML document. The data is to be presented in a browser window in the ascending order of BASICPAY and descending order of EMPLOYEECODE. Which of the following code snippets should be used in the XSLT style sheet to sort the employee data?
<xsl:sort select="BASICPAY" data-type="number" order="ascending"/> <xsl:sort select="EMPLOYEECODE" data-type="text" order="descending"/>
To select the id attribute's value from the code: <student id="1">Jack</student>, you would use the following code:
<xsl:value-of select="@id" />
At the end of your XPath expression, add the symbol _________ plus the name of the attribute you wish to select.
@
Annotation for *..1
@ManyToOne
___ annotation is used to specify URI of the resource
@Path
Regarding URL rewriting for session support, which of the following is true?
Every URL that the client uses must include jsessionid.
Which of the elements defined within the taglib element of taglib descriptor file are required. Select the two correct answers
A. name D.tag-class
What are some Features of XSLT
Add/remove elements and attributes
What does the "sequence" element of XSD indicate?
All the elements specified within this element must compulsorily appear in the XML document, and they must appear in the specified order
Which of the following statements MOST accurately describes a "linkbase" ?
An XML document, which contains inbound or third party links is called a linkbase
PCDATA is
An XML element that contains parsed character data
<!-- WELCOME.xml --> <?xml version = "1.0"?> <!DOCTYPE WELCOME SYSTEM "hello.dtd"> The following code indicates that the DTD is:
An external DTD
The keyword termed as the shorthand for mixed content containing all declared elements is
Any
Which is NOT EJB container?
Apache Tomcat 5.5
All Biztalk documents have the root element ________.
BizTalk
Fill in the blanks. A tag handler class must implement the javax.servlet.jsp.tagext.Tag interface. This is accomplished by extending the class TagSupport or another class named in one of the options below. Select the one correct answer.
BodyTagSupport
<!DOCTYPE Book SYSTEM "book.dtd">
Book.dtd is an external DTD
What does the keyword SYSTEM indicate in the following code? <?xml version ="1.0"?> <!DOCTYPE Book SYSTEM "book.dtd">
Book.dtd is an external DTD
Study the statements:1) URL rewriting may be used when a browser is disabled cookies. 2) In URL encoding the session id is included as part of the URL. Which is the correct option?
Both 1 and 2 are true
Which of the following classes define the methods setStatus(...) and sendError(...) used to send an HTTP error back to the browser?
Both are defined in HttpServletResponse
Consider the following statements: Statement A: A namespace is a method of preventing conflicts between elements having the same names. Statement B: A namespace URI is the same as a Web URI. Which of the following is correct about the above statements?
Both, Statement A and Statement B, are True.
Consider the following statements: Statement A: XML enables you to store data in a structured format by allowing you to create customized tags. Statement B: XML documents can be easily interpreted by target systems. Which of the following is correct about the above statements
Both, Statement A and Statement B, are True.
<?xml version="1.0" ?> <!DOCTYPE APTECH [ <!ELEMENT APTECH (CLASS1
CLASS2)+> <!ELEMENT CLASS1 (#PCDATA)> <!ATTLIST CLASS1 count CDATA #REQUIRED> <!ELEMENT CLASS2 (#PCDATA)> <!ATTLIST CLASS2 count CDATA #REQUIRED> ]> <TRIAL>ELECTRONIC GOODS <CLASS1
What are 2 styling options for XML?
CSS and XSLT (Extensible Stylesheet Language Transformation)
Which of the following statements relating to cascading style sheets and formatting objects is FALSE ?
CSS is an XML syntax that can be used to describe the appearance of particular elements in an XML document, Cascading style sheets can only be applied to non XML documents.
________ allow you to specify the style of your page elements (spacing, margins, etc.) separately from the structure of your document
Cascading Style Sheets
Nebula communications Inc is currently in the process of optimizing their database driven XML based web
Change the application's parser to SAX instead of DOM
Method characters() of ContentHandler interface receives events for
Character data
Identify the type of content of the PRODUCT element in the following XML code fragment. <PRODDET> <PRODUCT> <PRODID="P001"></PRODID><font face="fnt__2013101081549_0" size="14" color="#000000" letterspacing="0" kerning="1"> <PRODDESC>Baby Food </PRODDESC><font face="fnt__2013101081549_0" size="14" color="#000000" letterspacing="0" kerning="1"> <PRICEPERUNIT> 12 </PRICEPERUNIT> </PRODUCT> </PRODDET>
ComplexType
XML is more advantageous to use than a fixed-length database system because
D. All of the above
SAX is
D. An XML parser
Which of these are legal return types of the doAfterBody method defined in a class that extends TagSupport class. Select the two correct answers
D.EVAL_BODY_AGAIN (F.SKIP_BODY
Which of these are legal return types of the doStartTag method defined in a class that extends TagSupport class. Select the two correct answers
D.EVAL_BODY_INCLUDE (F.SKIP_BODY
To Bind the HTML elements with DSO we use _________ attribute
DATASOURCE, DATASRC
The ________ attribute is added to a TABLE element's opening tag to bind a data island to a table
DATASRC
Method hasChildNodes of XMLDOMNode mean
Determine if a given node has child nodes or not
The XML DOM object is
Entity Reference
Which is the CORRECT statement?
Entity beans represent persistent state objects (things that don't go away when the user goes away)
Which of the following statement is true about the Entity class?
Entity class must be declared as top level class
A valid SOAP message should contain which of the following XML elements ?
Envelope, Body
The most common way to assign a value to a variable is by using what?
Equals sign
For what reason does the following JSP fail to translate and compile? <html><body><%! int x; %><%=x ; %></body></html>
Error in JSP Expression
John is an XML programmer. He writes the following code to represent the items of a toy company: <?xml version="1.0" encoding="UTF-8"?> <!--PRODUCTDATA is the root element--> <PRODUCTDATA> <PRODUCT PRODID="P001"> <PRODUCTNAME>Barbie Doll</PRODUCTNAME> <DESCRIPTION> The price of this toy is < 200</DESCRIPTION> <PRICE>$20.00</PRICE> <QUANTITY>12</QUANTITY> </PRODUCT> </PRODUCTDATA> Identify the error in the above code and suggest a solution for the same.
Error on line: <PRODUCT PRODID="P001"> Solution: He should use quotP001; instead of "P001".
The xsl:if is used to
Evaluate a condition expression against the content of the xml file
What type of method does SAX use to process XML documents?
Event-based
The HttpServlet extends _____
GenericServlet
Which of the following is NOT a valid CSS selector?
HEAD selectors
carrying
HTML is a about displaying information, while XML is about _____________ data (transport and storage)
Which one of the following XLink attributes allows you to specify the target of a link?
Href
JSP pages have access to implicit objects that are exposed automatically. One such object that is available is request. The request object is an instance of which class?
HttpServletRequest
XMLDOMNode implements the interface
IXMLDOMNode
<!ELEMENT A((B,C)
Identify what the statement indicates
A Java bean with a property color is loaded using the following statement <jsp:usebean id="fruit" class="Fruit"/> What is the effect of the following statement. <jsp:setproperty name="fruit" property="color"/> Select the one correct answer.
If there is a non-null request parameter with name color, then its value gets assigned to color property of Java Bean fruit.
What is the significance of the '+' sign in the code given below? <!ELEMENT BOOK (AUTHOR+)>
Indicates that AUTHOR tag must occur at least once inside the BOOK element
Which of the following functions searches a string for a substring and returns an index of the found substring if it is found
Instr
Which of the following programs support XML or XML applications
Internet Explorer 5.5, Netscape D.7
The Document Object Model
Is an XML parser
In a B2B organization, it is required to exchange XML messages conforming to a single vocabulary
Is the parser at the receiving end a validating parser? Does the parser handle XML Schemas or DTDs? Does the document instance override the internal DTD subset?
What does the following statement do? <SPAN ID = "colorName" STYLE = "font-family: monospace" DATASRC = "#Colors" DATAFLD = "ColorName"></SPAN><BR>
It assigns the TDC control named Colors to a span element for display purposes
Identify correct statement about a WAR file.(Choose one)
It contains web components such as servlets as well as EJBs
What does the Option Explicit statement do
It does not allow the programmer to use variables without declaring them first.
what does the Option Explicit statement do
It does not allow the programmer to use variables without declaring them first.
The binding of TDC to a table requires setting the DATASRC property in the ________
table element
Which is the correct sequence?
Jsp page is translated -->jsp page is complied-->jspInit is called ->_jspService is called -->jspDestroy is called
What organization presented the first version of Starndardized Generalized Markup
Language (SGML) in 1980?
Default Fetch Behavior for Many-To-Many
Lazy
Default Fetch Behavior for One-To-Many
Lazy
Select the correct JMS programming model.
Locate the JMS Driver->Create a JMS connection->Create a JMS session->Locate the JMS destination->Create a JMS producer or a JMS consumer->Send or receive message.
Method getElementsByTagName return a node of list which will be stored as
MLDOMNodeList object
Which of the following DOM interfaces could be used to filter a set of nodes from a tree based on some criteria?
NodeFilter
What is wrong with the following VBScript code? 1 Select Case x 2 Case 1 3 Call MsgBox("1") 4 Case 2 5 Call MsgBox("2") 6 Case Else 7 Call MsgBox("?") 8 End Select
Nothing
What would the browser display if the following script was executed? <SCRIPT LANGUAGE = "JavaScript"> for( int i = 0; i < 5; i++ ) document.write("X"); </SCRIPT>
Nothing, the script would generate an error
When using HTML forms which of the folowing is true for POST method? Select the one correct answer.
POST method sends data in the body of the request.
________ is an artificial and informal language that helps programmers develop algorithms
Pseudocode
SAX uses
Push parsing machenic for processing
Xpath expressions can be created using _________ paths, so that instead of starting at the root element, you can simply reference the element from within the path structure and go from there.
Relative
What does REST stand for
Representational State Transfer
By starting at the _______ element, we can select any element in the XML document by carefully creating a chain of children elements.
Root
The sendError method defined in the HttpServlet class is equivalent to invoking the setStatus method with the following parameter. Select the one correct answer
SC_NOT_FOUND
Consider the following statements: Statement A: XSLT is a superset of the CSS functionality. Statement B: XSLT is an application of XML.Which of the following is correct about the above statements?
Statement A is False, and statement B is True.
A DTD is written for the above XML document such that the above XML document is validated successfully
The DTD needs to declare xml:space as an attribute of the root element
What gets printed when the following JSP code is invoked in a browser. Select the one correct answer. <%= if(Math.random() < 0.5) %> hello<%= } else { %> hi <%= } %>
The JSP file will not compile.
Which of the following is true regarding VBScript classes?
The Property Let method is used for non-object subtypes
Consider the following HTML document. 1 <HTML> 2 <HEAD> 3 <TITLE>Children Collection</TITLE> 4 <SCRIPT LANGUAGE = "JavaScript"> 5 </SCRIPT> 6 </HEAD> 7 <BODY> 8 <P></P> 9 </BODY> 10 </HTML> Select the true statement.
The SCRIPT element is a direct child of the HEAD element.
Which of the following is true?
The TDC handles creating table cells for output
Which of the following is false?
The TDC outputs an interface like Microsoft Excel.
stop processing
The W3C XML specification states that a program should __________ an XML document if it finds an error
What is the effect of the join statement in the following code? var theArray1 = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], theArray2 = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; var value = theArray1.join( " " );
The join method will create a string from the values in theArray1.
A JSP file that uses a tag library must declare the tag library first. The tag library is defined using the taglib directive - <%= taglib uri="..." prefix="..."%> Which of the following specifies the correct purpose of prefix attribute. Select the one correct answer.
The prefix attribute is used in front of a tagname of a tag defined within the tag library.
Which of the following is true regarding Function procedures
The procedure can return a value by assigning a value to the Function procedure name
A JSP page called test.jsp is passed a parameter name in the URL using http://localhost/test.jsp?name="John". The test.jsp contains the following code. <%! String myName=request.getParameter();%><% String test= "welcome" + myName; %><%= test%>
The program gives a syntax error because of the statement <%! String myName=request.getParameter();%>
What is the significance of the second function argument in the following line window.setInterval( "run()", 100 );
The value sets how often to run the function
Consider the following script. What is wrong with the following code? 1 <SCRIPT LANGUAGE = "JavaScript"> 2 var firstNumber, 3 secondNumber; 4 thirdNumber; 5 6 thirdNumber = 7 parseInt( window.prompt( "Enter an integer", 0 ) ); 8 document.write( thirdNumber ); 9 </SCRIPT>
The word var must be placed before thirdNumber in line 4
What does the following statement do? Math.floor( Math.random() * 12 );
This creates a random number from 0 up to but not including 12.
A ____________ is a group of operations, which appear as one large operation during execution.
Transaction
Which of the following string functions returns a string that does not contain any leading or trailing space characters
Trim
Message-driven beans do not have any return value.
True
Which of the following statements regarding WSDL are true ?
WSDL can be used to indicate the operations that are considered valid and supported for a given service, To specify where a particular service is implemented
What are the types of errors handled defined by the SAX ErrorHandler interface?
Warning, Error, Fatal-Error
Which of the following is true regarding VBScript arrays?
VBScript arrays can be dynamically allocated
Which VBScript function returns an integer indicating the variant subtype?
VarType
XML is a _______ Recommendation
W3C
XSLT
W3C recommends using __________ instead of CSS
XML is the mother of
WAP and WML
XSL processors do parses the XML source and tries to find out the matching _______ rule.
b. template
Which statement is true?
When isThreadSafe attribute of page directive is set to true, a thread is created for each request for the pag
The CascadeType is defined as a Java ___
enumeration
The World Wide Web Consortium (W3C) started to develop XSL because there was a need for
XML-based Stylesheet Language
Most DOM objects such as XMLDOMAttribute, XMLDOMElement, XMLDOMEntity, XMLDOMComment etc have several common methods and properties since they are inherited from a common object. Which object is it?
XMLDOMNode
Method getElementsByTagName return a node of list which will be stored as
XMLDOMNodeList object
is an XML-related technology that is used to find elements, attributes, and other information in your XML document.
XPath
______ and ______ are both new XML-related technologies that extend or borrow from XPath.
XPointer & XQuery
sophisticated
XSLT is far more __________ than CSS
The attribute used to define a new namespace is
Xmlns
Can you nest attribute groups inside other attribute groups
Y
Is it possible to share aHttpSession object between a Java Server Page and Enterprise Java Bean?
Yes, you can pass the HttpSession as parameter to an EJB method, only if all objects in session are serializable
metadata, data itself
__________ should be stored as attributes, and the __________ should be stored as elements
The line window.alert("Hello world") will display output in ________.
a dialog box
What will value contain after the following code is executed? var value = new Date(); value = value.valueOf();
a large integer representing the number of milliseconds between midnight January 1, 1970 and the current date
What does the value string contain after the following code is executed? var string = "Good luck on the test"; string = string.link("www.deitel.com")
a link to www.deitel.com with the text "Good luck on the test"
Initializing an array directly involves using the ________ control structure.
a) for loop
document.write(c[8])
a) undefined
Call-by- ________ is the method of passing a copy of the argument's value to a function
a) value
What is the result of attempting to access the following JSP page?<question><html><question><body><question><%! public String methodA() {<question> return methodB();<question>}<question>%><question><%! public String methodB() {<question> return "JAD Final Test";<question>}<question>%><question><h2><%= methodA() %></h2><question></body><question></html>
a. "JAD Final Test" is output to the resulting web page.
If the DTD is external to your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax:
a. <!DOCTYPE root-element SYSTEM "filename">
Which of the following is a correct JSP declaration for a variable of class java.util.Date?
a. <%! Date d = new Date(); %>
Select the correct directive statement insert into the first line of following lines of code (1 insert code here):
a. <%@page import='java.util.*' %>
A bean present in the page and identified as 'mybean' has a property named 'name'. Which of the following is a correct way to print the value of this property?
a. <jsp:getProperty name="mybean" property="name"/>
Which of the following is a valid standard action that can be used by a jsp page to import content generated by another JSP file named another.jsp?
a. <jsp:include page='another.jsp'/>
Action _______has the ability to match request parameters to properties of the same name in a bean by specifying "*" for attribute property.
a. <jsp:setProperty>
Which of the following techniques would correctly put a bean into application scope? (You can assume that any necessary page directives are present and correct elsewhere in the JSP page.)(Choose one.)
a. <jsp:useBean id="app1" class="webcert.ch07.examp0701.AddressBean" scope="application" />
Which of the following element are required for a valid <taglib> tag in web.xml?(Choose one)
a. <taglib_uri>
An attributes can be accessed in the way similar to the elements. Notice ____ in front of the attribute name.
a. @
Which option can be used to predefine Java Persistence queries for easy use?
a. @NamedQuery annotation
Which statement about entity manager is true?
a. A container-managed entity manager must be a JTA entity manager.
In a DTD, Attributes are declared with an _______ declaration
a. ATTLIST
A developer is working on a project that includes both EJB 2.1 and EJB 3.0 session beans. A lot of business logic has been implemented and tested in these EJB 2.1 session beans. Some EJB 3.0 session beans need to access this business logic. Which design approach can achieve this requirement?
a. Add adapted home interfaces to EJB 3.0 session beans to make EJB 3.0 and EJB 2.1 session beans interoperable.
<html><body><form action="loginPage.jsp">Login ID:<input type= "text" name="loginID"><br>Password:<input type="password" name="password"><br><input type="submit" value="Login"><input type="reset" value="Reset"></form></body><html> Study the above html code. Assume that user clicks button Reset. What is the correct statement?
a. All inputs are cleared.
Which statements are BEST describe errorPage attribute of <%@ page errorPage=....%> directive?
a. Any exceptions in the current page that are not caught are sent to the error page for processing. The error page implicit object exception references the original exception.
Each object has ________ or data and ________ or behavior
attributes, methods
Local variables have ________ duration
automatic
For the XML parser to ignore a certain section of your XML document, which syntax is correct?
b. <![CDATA[ Text to be ignored ]]>
Which of these is a correct fragment within the web-app element of deployment descriptor? Select the one correct answer
b. <error-page> <exception-type> mypackage.MyException</exception-type> <location> /error.jsp</location> </error-page>
Which of the following correctly represents the following JSP statement? Select one correct answer. <%=x%>
b. <jsp:expression>x</jsp:expression>
If you want to send an entity object as the pass by value through a remote interface, which of the following statements are valid? (Choose one)
b. @Entity b. public class Employees implements Serializable{b. ...b. }
If you want to send an entity object as the pass by value through a remote interface, which of the following statements are valid? (Choose one)
b. @Entity public class Employees implements Serializable{...}
Which of the following lines of code are correct?
b. @Entity public class Employees{... }
In a DTD, Attributes are declared with an _______ declaration
b. ATTLIST
Which statement describe about Message-Driven Beans is correct? (Choose one)
b. An EJB 3.0 message-driven beans can itself be the client of another message-driven beans
How can you ensure the continuity of the session while using HttpServletResponse.sendRedirect() method when cookies are not supported by the client?
b. By enconding the redirect path with HttpServletResponse.encodeRedirectURL() method.
Which is disadvantage of using JEE ( or J2EE) server-side technologies in a web-based application?
b. Complexity
Which is disadvantage of using JEE (or J2EE) server-side technologies in a web-based application?
b. Complexity
Which security mechanism proves that data has not been tampered with during its transit through the network?
b. Data integrity
DTD is:
b. Document Type Definition
Which statements are BEST describe <jsp:include> Action?
b. Dynamically includes another resource in a JSP. As the JSP executes, the referenced resource is included and processed.
Which Java technology provides a standard API for publish-subscribe messaging model?
b. JMS
Which statement describe about JMS is NOT true?
b. JMS enhances access to email services
Which component can use a container-managed entity manager with an extended persistent context?
b. Only stateful session beans
Which is true about RMI?
b. RMI allows objects to be send from one computer to another
The sendRedirect method defined in the HttpServlet class is equivalent to invoking the setStatus method with they following parameter and a Location header in the URL. Select one correct answer.
b. SC_MOVED_TEMPORARILY
Which statements are BEST describe isErrorPage attribute of <%@ page isErrorPage=....%> directive?
b. Specifies if the current page is an error page that will be invoked in response to an error on another page. If the attribute value is true, the implicit object exception is created and references the original exception that occurred.
Which is true about JDBC?
b. The JDBC API is included in J2SE
Which statements are BEST describe page implicit object of jsp file?
b. This java.lang.Object object represents the this reference for the current JSP instance.
DTD defines the document structure with a list of legal elements.
b. True
The Copy and _______ constructs are used for the nodes copying.
b. copy-of
To send binary outptut in a response, the following method of HttpServletResponse may be used to get the appropriate Writer/Stream object.
b. getOutputStream
Parameter entities can appear in
dtd file
The ________ of a variable is the period during which it exists in memory
duration
In schema, the ALL element requires that
each element in the group must occur at most once
The question mark (?) operator indicates
either zero or one occurrence
The question mark (?) operator indicates
either zero or one occurrence.
______and _______methods do not apply to stateless session beans.
ejbActivate()
# Which of the following can be declared as a direct child of a XML Schema element ?
element + attribute
How a data source is displayed by the browser depends on the ________.
element that the data source is bound to
Which of the following is the proper method to apply a transition effect
element.filters( "blendTrans" ).apply();
The default model for complex type, in XML schemas for element is
elementOnly
The format for writing an attribute-related predicate is:
element[@element's attribute some test here]
Which of the following XSLT functions can be used to generate a string that can be used as the value of an ID type attribute?
generate-id()
The ________ method can be used to display the value of the specified attribute.
getAttribute()
The ________ method returns a node list that contains all elements with the specified tag name in the same order as they appear in the source document.
getElementsByTagname()
To send binary output in a response, the following method of HttpServletResponse may be used to get the appropriate Writer/Stream object. Select the one correct answer.
getOutputStream
____ method is called so that the servlet can access information about the servlet container
getServletConfig()
____ method is called so that the servlet container can access information about the servlet
getServletInfo()
To send text output in a response, the following method of HttpServletResponse may be used to get the appropriate Writer/Stream object. Select the one correct answer.
getWriter
Which of the following contradicts the notion of structured programming?
goto
not truncated
in XML, the white-space in a document is __________
reserved words
in an XML name there are no __________
Attribute standalone="no" should be included in XML declaration if a document:
has an external DTD
A web application is located in "helloapp" directory. Which directory should it's deployment descriptor be in?
helloapp/WEB-INF
How do you write a conditional statement for executing some statements only if "i" is NOT equal to 5?
if (i != 5)
How do you write a conditional statement for executing some statements only if "i" is equal to 5?
if (i==5)
attributes
it is the advice of w3schools to use tags rather than __________
What are characteristics of XML tags
lets the developers create | -XML needs to be well formed and validated
________ and ________ run slower when they are applied to large arrays.
linear search, bubble sort
Each attribute, element and text in the XML document represents a
node in the tree
Kind of Parsers are
non-validating and validating
Servlets do ___ have a main() method
not
In order for elements to be floated, position must be ________.
not absolute
When using the width, height and overflow properties of an element, position must be
not absolute
When using the width, height and overflow properties of an element, position must be ________
not absolute
What would the browser display if the following code was executed in a script? var product = 0; while ( product <= 25 ); product = 2 + product;
nothing, the script would result in an error
create() method of entity bean home interface returns _____________
null
In the following line, the word document is a ________ which resides in the computer's memory and contains information used by the script. document.writeln("Hello World");
object
Which of these is not a valid top level element in web-app
param-name
Function definitions often contain ________ which are considered to be local variables and correspond with the arguments in the function call.
parameters
Two styles of soap binding:
rpc and document style
JavaScript lines end with what?
semicolon
avaScript lines end with what?
semicolon
What type of loop is shown in the script below? <SCRIPT LANGUAGE = "JavaScript"> var gradeValue = 0, total = 0, grade = 0; while ( gradeValue != - 1 ) { total = total + gradeValue; grade = window.prompt("Enter Integer Grade, -1 to Quit:", "0"); gradeValue = parseInt( grade ); } </SCRIPT>
sentinel controlled
The first two parameters in the addPoint method ________.
sets the point source of the light
The last parameter in the addPoint method ________.
sets the strength percentage
Stylesheet can do have ____ variables with the same name
several
which of the following SAX2 methods is used by a non validating parser to report that an entity reference is not resolved
skippedEntity()
The above line is parsed using a SAX2 parser. What is the sequence of events passed by the parser to the handler ?
startPrefixMapping(),startElement(),endElement(),endPrefixMapping()
A ____________ session bean is a bean that holds conversations that span a single method call.
stateless
RESTful WS place a emphasizes on ____ communication
stateless
Script-level variables have ________ duration.
static
Web server responses can be ____ or ____
static or dynamic
The ________ property of the wave filter determines the wave's amplitude
strength
TThe java sort method uses ________ to sort the array passed to it
string comparison
Element content cannot have attributes.
t
You must use a parser to read an XML document
t
Each relationship can be either ___ or __
unidirectional or bidirectional
The ONLOAD event fires ________.
whenever an element finishes loading successfully
What is the underscore character used for in VBScript?
It is used as a line continuation character
Which of the following is true regarding the DHTML mask filter:
It is used to create images with transparent foregrounds
What is stored inside the variable value after the following line of code is executed? var value = navigator.appVersion
It stores a string representing the version of the browser and other information.
Event ________ fires constantly whenever the mouse is in motion
ONMOUSEMOVE
Which of the following statements regarding filters and transitions is false
They are applied on a client computer at run time by the server
What will value contain after the following code is executed assuming that Colors is a valid TDC control? value = Colors.recordset;
a) It will contain the current indexed item of the datasource
The chroma filter is used to ________.
apply transparency effects dynamically
The CSS specification gives precedence to
author styles over user styles
Describing an object in terms of behaviors without concern for how those behaviors are actually implemented is called ___
b) data abstraction
Which of the following settings for a background image can be modified to create a "watermark" effect where scrolling will not move the image from its set position
background-attachment
If you used the ONMOUSEMOVE event to capture mouse events over an image, which of the following event properties would you use to capture the location of the mouse cursor relative to the image boundaries
offsetX / offsetY
What does the following statement do? <SPAN ID = "colorName" STYLE = "font-family: monospace" DATASRC = "#Colors" DATAFLD = "ColorName"></SPAN><BR>
c) It assigns the TDC control named Colors to a span element for display purposes
Which of these is the proper function that stops a windows timer
clearInterval
The all collection is a property of the ________ object
document
Which of the following is the proper way to dynamically access the background color from within the script?
document.body.style.backgroundColor
Which of the following is the proper way to dynamically access the border width from within the script?
document.body.style.borderWidth
Microsoft's Internet Explorer Web browser contains a ________ that executes VBScript code
interpreter
The outermost layer of the box model is the
margin
The ________ object contains information about the Web browser that is viewing the page.
navigator
Event bubbling is _______.
the process of child elements passing events to their parent elements
Which of the following is not a property of the blur filter
( add, direction, strength) All of these are properties of the blur filter.
Which of the following is false?
Filters and transitions cannot be adjusted dynamically.
When the mouse moves over an element which of the following is triggered
ONMOUSEOVER
________ makes it now possible for data manipulation to be shared by the server and the client.
d) all of the above