2mark Question
2mark Question
2mark Question
Question Bank
UNIT – I
1. DEFINE INTERNET.
Network is an interconnection of systems to share data and information.
Internet is network of network or collection of heterogeneous networks.
2. WHAT IS THE USE OF IP ADDRESSES AND PORTS?
It is very difficult to remember the IP address of each and every node. It
order to avoid this problem domain names are used.
Example googl.com, rediff.com etc.
PORTS
Ports are used in receiving and sending data to another server or client.
Example for port numbers
Protocol Port Protocol Purpose
Echo 7 TCP/UDP Echo is a test protocol used to verify that 2 machines
1. are able to connect by having one echo back the Application Layer Transport Layer
(TCP, UDP) Internet layer (IP) Physical path(Ethernet, FDDI etc) other’s input.
Discard 9 TCP/UDP Discard is a less useful test protocol in which all data
2. received by the server is ignored.
FTP 21
SMTP 25
HTTP 80
POP3 110
NTP 119 Usenet News transfer is more formally known as
the Network News Transfer Protocol
RMI Registry 1099 This is the registry service for Java Remote Objects.
3. MENTION THE DIFFERENT INTERNET ADDRESS CLASS AND IT’S RANGE.
Internet addresses are assigned to different organizations by the Internet Assigned
Numbers Authority (IANA).
Class C address block specifies the first 3 bytes of address, for example 199.1.32. This
allows room for 254 individual addresses from 199.1.32.1 to 199.1.32.254
Class B address specified only the first 2 bytes of the addresses .
There are also Class D and E addresses are used for IP multicast group.
4. DEFINE FIREWALL.
The hardware and software that sits between the Internet and the local network, checking all the
data that comes and goes out is called “firewalls”. The security is provided using SSL(Secure
Socket Layer) in internet.
HTML allows linking to other HTML documents as well as images. There are 3 attributes
that can be introduced in BODY tag.
• Use METHOD = “post” in a form that causes changes to server data, for example
when updating a database.
• The ACTION attribute in the FORM tag is the path to this script; in this case, it is a
common script which emails form data to an address. Most Internet Service Providers will have
a script like this on their site.
23. MENTION THE VARIOUS FORM ELEMENTS.
Various elements or controls can be created in FORM using <INPUT> tag. They are 1. Label
2. Text box 3. Text Area 4. Radio button 5. Check box 6. List box 7. Command button 8.
Scroll bars
24. WHAT IS THE USE OF FRAMES IN HTML GIVE THE SYNTAX OF FRAMES
Frames are used to call many html files at the same time. This can be done using
<FRAMESET> </FRAMESET>
tags. ATTRIBUTES OF FRAMES
When you enter a keyword, the search engine examines its online database and presents to you a
listing of sites that, in theory , match your search criteria.
44. Discuss about the client/server strategies in Internet.
• Application Server
• Database Server
• Transaction Server
• Six client/server models
45. Explain about <table> & <frame> tags in detail..
i. Syntax of <table> tag:
ii.
<TABLE>
iii. <TR>…</TR> <!—
Row1_ iv. <TR>…</TR>
<!—Row2_ v. …
vi. <TR>…</TR> <!—
Rowm_
vii.
</TABLE>
viii. Syntax of <frame> tag:
ix. <frameset rows=” “, cols=” “>
x. <frame name=” “ src=” “>
xi. <frame name=” “ src=” “>
xii. …
xiii. <frame name=” “ src=” “>
xiv. </frameset>
46. Explain about Internet servers.
• Mail servers
• Web servers
• FTP servers
• News server
• DNS servers
47. Explain the elements of WWW.
• Client & server
Placing the <B>tag before the text will make everything bold, until you close the tag
with</B> (Or using <STRONG>tags</STRONG > will do the same.)
59. How do I make text show in italics?
Placing the <I>tag before the text will make everything in italics, until you close the tag
with</I> (Using <EM>emphasis tags</EM > will do the same.)
60. How would you make all text on a page green and a little larger than normal,
but
make all headings yellow?
Put the following at the beginning of the Web page:
<BODY TEXT=”green”><BASEFONT
SIZE=4>
Then make each heading look like this:
<H1><FONT COLOR=”Yellow”>Heading goes here </FONT></H1>
61. Write the HTML to create the following ordered list.
X. Xylophone
Y.
Yak
Z. Zebra
<OL TYPE =”A” START =
“24”>
<LI> Xylophone
<LI>YA
K
<LI>Zebra
</OL>
The following alternative will also do the same things.
<OL TYPE =”A”<LI VALUE
=”24”>Xylophone<LI>Yak<LI>Zebra</OL>
62. How would you insert a single word and put a square bullet in front of it?
<UL TYPE=”Square”><LI>Supercalifragilisticexpealidocious</UL>
63. How would you insert an image file named elephant.jpg at the very top of a
Web
page?
Copy the image file into the same directory folder as the HTML text file and type <IMG SRC>
immediately after the <BODY> tag in the HTML text file
64. How would you give a Web page a black background and make all text,
including
links, bright green?
Put the following at the beginning of the Web page:
<BODY BGCOLOR=”black”>
The following would do the same thing”
<BODY BGCOLOR =”#000000”
TEXT=”#00FF00” LINK=”00FF00” VLINK=”#000000”>
65. How would you make an image file named texture.jpg appear as a
background tile?
<BODY BACKGROUND=”texture.jpg”
TEXT=”White” LINK=”red” VLINK=”blue” ALINK=”black”>
66. How would you wrap text around the right side of an image, leaving 40 pixels of
space between the image and the text?
<IMG SRC=”myimage.gif” HSPACE=40 VSPACE=40 ALIGN=”left”>Text goes here
67. How could you insert exactly 80 pixels of blank space between two
paragraphs of
text?
Create a small image that is all one color, and save it as nothing.gif with that color set to be
transparent. Then put the following tag between the two paragraphs of text:
<IMG SRC=”nothing.gif” WIDTH=1 HEIGHT=80>
68. How would you write the HTML to draw a rule 20 pixels wide?
<HR WIDTH=20>
69. If you have a circular button that links to another page, how do you prevent
a rectangle from appearing around it?
Use the BORDER=0 attribute, like this:
<A HREF=”another_page.htm”><IMG SRC=”circle.gif” BORDER=0></A>
70. What is meant by Stateless Connection?
When a web server receives a HTTP request from a web browser it evaluates the request and
returns the requested document, if it exists, and then breaks the HTTP connection. This
document is preceded by the response header, which has details about how to display the
document that will be sent by the server. Each time a request is made to
the server, it is as if there was no prior connection and each request can yield only a single
document. This is known as Stateless Connection.
UNIT - II
1. Mention the advantages of java/java script a.
Use sending data continuously File storage
Massively parallel computing b.
Smart forms – includes various controls like text box, radio button, textc.
Peer-to-Peer Interaction – used in various client/server model. area control etc. d.
e. Games – Combine the ability to easily include networking in your programs with java’s
powerful graphics and you have the recipe for truly awesome multiplayer games.
Chat – Used in various chat applications. f.
Whiteboards – Java programs are not limited to sending ext and datag. across the
network.
h. A number of programmers have developed whiteboard software that allows users in
diverse locations to draw on their computers
2. What are Style Sheets?
Style sheets are collections of style information that are applied to plain text. Style information
includes font attributes such as type size, special effects (bold,italic,underline), color and
alignment. Style sheets also provide broader formatting instructions by
specifying values for quantities such as line spacing and left and right margins.
3. List down the ways of including style information in a document.
a. 1.Linked Styles -Style information is read from a separate file that is specified in the
<LINK> tag
b. 2.Embedded Styles -Style information is defined in the document head using the
<STYLE> and </STYLE> tags.
c. 3.Inline Styles -Style information is placed inside an HTML tag and applies to all content
between that tag and it companion closing tag.
4. Define cascading.
Cascading refers to a certain set of rules that browsers use, in cascading order, to determine how
to use the style information. Such a set of rules is useful in the event of conflicting style
information because the rules would give the browser a way to determine which style is given
precedence.
5. What are the style precedence rules when using multiple approaches?
Inline styles override both linked style sheets and style information stored in the document head
with <STYLE> tag.
Styles defined in the document head override linked style sheets.
Linked style sheets override browser defaults.
6. Give the syntax to specify a characteristic in linked style sheet.
{Characteristic: value}
Multiple characteristic/value pairs should be separated by semicolons.
7. List down font characteristics permitted in style sheets.
i. 1.font-family
ii. 2.font-size
iii. 3.font-weight
iv. 4.font-style
v. 5.font-variant
8. Write a note on content positioning characteristic \"Visibility\".
Enables the document author to selectively display or conceal positioned content; Possible
values are show or hide.
9. Define scriptlets.
Scriptlets enable you to create small, reusable web applications that can be used in any web
page. Scriptlets are created using HTML, scripting and Dynamic HTML. To include them in an
HTML document use the <OBJECT> tag.
10. What does DHTML refer?
DHTML refers to collection of technologies, which makes HTML documents more dynamic
and interactive.
11. What does data binding mean?
Data binding is DHTML feature that lets you easily bind individual elements in your
document to data from another source such as database or comma delimited text file.
12. What is meant by Plug-in?
A hardware or software module that adds a specific feature or service to a larger system. The
idea is that the new component simply plugs in to the existing system. For example, there are
number of plug-ins for the Netscape Navigator browser that enable it todisplay different types of
audio or video messages. Navigator plug-ins are based on MIME filetypes.
13. MENTION THE TYPES OF SCRIPTING LANGUAGES
• JavaScript is a Scripting language (web site development environment) created
by Netscape.
• Hence JavaScript works best with the Netscape suite of Client and Server products.
• JavaScript is the native scripting language of Netscape Navigator.
• VBScript is the native Scripting language of HTML.
14. SERVER SIDE SCRIPTING
• In Server side scripting the script program is executed at Server Side the required
html program is sent to the client.
• The job of the server is more in server side scripting
15. CLIENT SIDE SCRIPTING
• Here the script program is processed and executed in the client side itself.
• So that it reduces the burden of the server.
16. LIST THE ADVANTAGES OF JAVA SCRIPT
JavaScript is an object-oriented language that allows creation of interactive Web pages
JavaScript allows user entries, which are loaded into an HTML form to be processed as
required
17. ADVANTAGES
a. It is an interpreted language, which requires no compilation steps. b.
Embedded within HTML.
c. Minimal Syntax – easy to learn
d. Quick Development
e. Designed for simple, small programs f.
High performance
g. Procedural Capabilities – support facilities such as condition checking, looping and
h. branching.
i. Designed for programming user events – like VB Java Script is also based on Events. j.
Easy Debugging and Testing
k. Platform Independence/ Architecture Neutral l.
SYNTAX OF JAVASCRIPT PROGRAM
m. <HTML>
n. <HEAD>
o. <SCRIPT language = “JavaScript”>
p. … body of the script program
q. </SCRIPT>
r. </HEAD>
s. <BODY>
t. <SCRIPT language = “JavaScript”>
u. body of the program.
v. </SCRIPT>
w. </BODY>
x. </HTML>
18. WHAT IS DENSE ARRAYS?
• A dense array is an array that has been created with each of its elements being assigned a
specific value.
• Dense arrays are used exactly in the same manner as other arrays.
• Dense arrays are declared and initialized at the same time
Array Methods
Join() – returns all elements of the array joined together as a single string.
Reverse() – reverses the order of the elements in the array.
19. LIST COMPARISION OPERATORS & STRING OPERATORS IN JAVA
• = = equal (perform type conversion before testing for equality.
• = = = strictly equal (do not perform type conversion before testing for equality
STRING OPERATORS
Currently Java Script supports only one string concatenation (+)
operator. EXAMPLE
“ab” + “cd” produces “abcd”
20. LIST THE VARIOUS DIALOG BOXES IN JAVA SCRIPT
Dialog boxes are used to display small windows. This is also used to get input from user. a.
SYNTAX
b. alert(“message”);
c. alert(“Click here to continue”)
d. prompt(“Enter your name”, name)
e. Alert is only used to display some information
f. Prompt is used to display information along with some input value
g. Confirm dialog box, causes program execution to halt until user action takes place.
h. The user action can be either OK or CANCEL.
i. OK – returns true
j. CANCEL – returns false
21. MENTION THE VARIOUS JAVA SCRIPT OBJECT MODELS .
• Math Object
• String Object
• Date Object
• Boolean and Number Object
• Document Object
• Window Object
• List Attributes.
29. HOW TO INTRODUCE STYLE IN HTML PROGRAM?
<HTML>
<HEAD>
<STYLE Type = “text/css”>
predefined tag name {attribute name1:attribute value1; attribute name2:attribute
value2; ……attribute name-n:attribute value-n}
<STYLE>
</HEAD>
<BODY>
write the body of program
</BODY> </HTML>
30. What are Style Sheets?
Style sheets are collections of style information that are applied to plain text. Style information
includes font attributes such as type size, special effects (bold,italic,underline), color and
alignment. Style sheets also provide broader formatting instructions by
specifying values for quantities such as line spacing and left and right margins.
31. List down the ways of including style information in a document.
1. Linked Styles -Style information is read from a separate file that is specified in the
<LINK> tag
2. Embedded Styles -Style information is defined in the document head using the
<STYLE> and </STYLE> tags.
3. Inline Styles -Style information is placed inside an HTML tag and applies to
all content between that tag and it companion closing tag.
32. What are the style precedence rules when using multiple approaches?
Inline styles override both linked style sheets and style information stored in the document head
with <STYLE> tag.
33. Give the syntax to specify a characteristic in linked style sheet.
{Characteristic: value}Multiple characteristic/value pairs should be separated by
semicolons.
34. List down font characteristics permitted in style sheets.
1.font-family
2.font-size
3.font-weight
4.font-style
35. Write a note on content positioning characteristic \"Visibility\".
Enables the document author to selectively display or conceal positioned content; Possible
values are show or hide.
.
UNIT- 3
• XML documents contain only data, not formatting instructions, so applications that
process XML documents must decide how to manipulate or display the document’s data.
4. WHAT DO YOU MEAN BY DTD IN XML?
• DTD means Document Type Definition.
• DTD file is similar to CSS file, because DTD also contains only styles.
• DTD contains various styles which are to be applied in XML document .
• Like .CSS file .DTD file also should be linked with XML program.
Styles in XML program should be save with .xsl (Xml Style Sheet Language) extension.
5. Define XML.
• XML is a meta-markup language that provides a format for describing structured data.
This facilitates more structured declarations of content and more meaningful search results across
multiple platforms.
6. Define DTD.
• A DTD is a set of rules that specifies how to use XML markup. It contains specifications for
each element, including what the element\'s attributes are, what values the attributes can take
on and what elements can be contained in others.
7. What are the XML rules for distinguishing between the content of a document
and
the XML markup element?
1. The start of XML markup elements is identified by either the less than symbol (<) or
the ampersand (&) character
2. Three other characters, the greater than symbol (>), the apostrophe or single quote
(‘) and the double quotation marks (“) are used by XML for markup.
3. To use these special characters as content within your document, you must use
the corresponding general XML entity.
8. What are the different XSLT elements?
• Stylesheet
• Value-of
• For-each
• Sort
• Text
9. What is VoiceXML?
VoiceXML is an emerging standard for speech-enabled applications.Its XML syntax defines
elements to control a sequence of interaction dialogs between a user and an implementation
platform. VoiceXML uses XML text to drive voice dialogs.
10. What is XQuery?
XQuery is a W3C initiative to define a standard set of constructs for querying and searching
XML documents. XQuery brings database query processing to XML.
11. What is XForm?
XForm is an XML approach that overcomes the limitations of HTML forms. XForm includes a
variety of buttons, scrollbars and menus. It generates XML form data as output. XForm\'s model
has the capability to work with the variety of user interfaces.
12. What is XPath?
Xpath is used to navigate XML tree structures. XPath gets its name from its use of a path
notation to navigate through the hierarchical tree structure of an XML document. It is an
important XML technology due to its role in providing a common syntax and semantics for
functionality in both XSLT and XPointer.
13. what are complex types?
complex types are an important aspects of xml schema that allow application developers to
define application-specific datatypes that can be checked by programs that check XML
document for validity. XML schema divides complex types into two categories: those with
simple content & those with complex content.
14. What all are the presentation technologies?
CSS - cascading syle sheets
XSL - provides users with ability to describe how xml data & document are to be formated.
Xforms - it is a GUI toolkit for creating user interfaces & delivering the results in XML.
Xhtml - it is used yo replace HTML with more flexable approach to display webcontent.
VoiceXML - it is an emerging standard for speech enabled application.
15. what are all the Transformation techniques?
XSLT - it is an XML- based languages used to transform XML documents into others format
such as HTML for web display.
XLINK - highlighting that element or taking the user directly to that point in the document.
XPATH - xpath gets its name from its use of a payh notation to navigate through the
hierarchical tree structure of an XML document XQUERY - it is w3c initiative to define a
standard set of constructs for querying & searching XML document.
16. .Explain any two XForm implementations?
X-Smiles - it is a java based XML browser.it implements a large part of X-forms & uses
Xform
together with XSL-FO on user interface side. Mozquito Xforms preview - is an XML
based Web developement s/w that implements Xforms & gives current Web browser the
ability to send,receive & process XML document.
17. what are the Importants of SAX?
SAX is an event driven.
SAX supports processing pipelines.
SAX requires programmers to maintain state.
18. What is metadata?
Literally data about data. XML element and attribute names are considered
metadata in that they may be used to describe the data contained in a document.
Metadata isn’t needed but it certainly helps.
19. What is DTD? How is it different from XML?
DTD stands for Document Type Definition
DTD is a description of the structure & the elements and attributes that define a class of
XML document.
DTD can be declared both internally in a XML document and as an external reference.
DTD Xml Schema
Dtd is used to define the structure of an xml document.
Xml schema is used to define the structure of an xml document.
Data type for elements limited to text. 2. Numerous predefined data types available.
Complex data types cannot be defined. 3. Ability to define complex type that map to
application data structure.
Dtd document is stored as “filename.dtd” 4.Xml schema document is stored as
“filename.xml”
20. What is XML? How it is different from HTML?
Xml is the text based make up language that stores the data in a structured format using
meaningful tags. It allows computers to store and exchange data in a format that can be
interpreted by any other computer with different hardware or software specification.
XML
HTML
.xml stands for Extensible markup language
HTML stands for Hyper Text Mark Up
Language.2.Several languages are derived from xml & wml
HTML can be derived from xml.
Xml uses indefinite, user defined,
meaningful set of tags which can be used to include XML data in the webpage.
HTML uses a fixed set of tags which can be used to specify the appearance of the webpage.
21. Define Directives.
• Directives are JSP elements that provide global information about an entire JSP page,
22. Write down the various attributes for the page directives in JSP.
• The page directive defines information that will be globally available for that Java
Server Page,
• language
• extends
• import
• session
• buffer
• contenttype
23. What is a Hidden Comment?
A comments that documents the JSP page but is not sent to the client. The JSP engine ignores a
hidden comment, and does not process any code within hidden comment tags. A hidden
comment is not sent to the client, either in the displayed JSP page or the HTML page source. The
hidden comment is useful when you want to hide or \"comment out\" part of your JSP page.
You can use any characters in the body of the comment except the closing --%>
combination. If you need to use --%> in your comment, you can escape it by typing --%\\>.
JSPSyntax
<%-- comment --%>
Examples
<%@ page language=\"java\" %>
<html>
The jspInit()- The container calls the jspInit() to initialize te servlet instance.It is called
before any other method, and is called only once for a servlet instance.
The _jspservice()- The container calls the _jspservice() for each request, passing it the
request and the response objects.
The jspDestroy()- The container calls this when it decides take the instance out of service.
It is the last method called n the servlet instance.
32. What is a output comment?
A comment that is sent to the client in the viewable page source.The JSP engine handles an
output comment as uninterpreted HTML text, returning the comment in the HTML output
sent to the client. You can see the comment by viewing the page source from your Web
browser.
JSP Syntax
<!-- comment [ <%= expression %> ] -->
Example 1
<!-- This is a commnet sent to client on
<%= (new java.util.Date()).toLocaleString() %>-->
Displays in the page source:
<!-- This is a commnet sent to client on January 24, 2004 -->
33. Define ASP.
Active Server Pages (ASP) is a server-side scripting technology that can be used to
create dynamic and interactive web applications.
34. What are the ASP objects?
1.Application -It manages your web application.
2.Session -It manages and tracks individual user sessions.
3.Server -It controls behavior of your web server
4.Response -It transmits information from the web server to web browser
5.Request -It retrieves information from the browser for processing at the server.
35. What is global.asa file?
The global.asa file is a Active Server Application file you can track and manage the
application and session events, variables and objects. When you start the application the server
will load the global.asa file into memory.
36. Define response object and list its methods.
The response object transmits information from the web server to browser.
Methods are:
1.Write
2.BinaryWrite
3.Redirect
4.AppendToLog
5.AddHeader
6.Clear
7.Flush
37. Define JSP.
Java Server Pages (JSP) are simple technology used to generate dynamic HTML on the
server side.
38. Define Directives.
Directives are JSP elements that provide global information about an entire JSP page,
39. Write down the various attributes for the page directives in JSP.
The page directive defines information that will be globally available for that Java Server
Page,
1. language
2. extends
3. import
4. session
5. buffer
6. contenttype
40. Define XML.
XML stands for EXtensible Markup Language