IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks

1.What is the difference between node and host?
A node is any addressable device connected to a network whereas the host is a more
specific descriptor that refers to a networked general-purpose computer rather than a single
purpose device (such as a printer).
2. Define Protocol?
A protocol is a formal set of rules that must be followed in order to communicate. The
protocol determines the following:
1.The type of error checking to be used
.!ata "ompression method# if any
$.%ow the sending device will indicate that it has finished sending a message
&.%ow the receiving device will indicate that it has received a message
3. What are the functions of a browser?
1.Automatic '() completion
.*cript e+ecution
$.,vent %andling
&.*ecure "ommunication
-..lug-in e+ecution
4. Define a Port?
A port is a logical channel to an application running on a host. ie. The applications
running on the host machines are uni/uely identified by port numbers.
5. What do you mean by Well-Known Ports?
.ort numbers can range from 1 to 0--$-# however ports 1 to 11$ are reserved.
reserved ports are referred to as we1l-known ports because the 2nternet Assigned 3umbers
Authority publicly documents the applications that use them.
6. What is W3C?
4orld 4ide 4eb "onsortium (4$")is a standardi5ing organi5ation for web
technologies-web technologies standardi5ed by 4$" are called (ecommendations.
7. Define URI, URL, URN?
1. '(2 ('niform (esource 2dentifier): 2t identifies an ob6ect on the 2nternet.
. '() ('niform (esource )ocator): 2t is a specification for identifying an ob6ect such as
a file# newsgroup# "72 program or e-mail address by indicating the e+act location on
Department of Information Technology @SVS College of Engineering Page 1
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
the internet.
$. '(3 ('niform (esource 3ame): 2t is a method for referencing an ob6ect without
declaring the full path to the ob6ect.
Department of Information Technology @SVS College of Engineering Page 2
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
8. Define URL Encoding?
'() encoding involves replacing all unsafe and nonprintable characters with a percent
sign (8) followed by two he+adecimal digits corresponding to the character9s A*"22 value.
9. List the goals of SGML?
1. To manage the flow of millions of pages.
. :or structuring information e+change
$. :or modeling inter-document linkages
&. :or managing information flows between departments and weapons systems
10. What is a Recommendation?
A (ecommendation is not an actual software product# but a document that specifies
technology;s role# synta+ rules.
11. Define DTD?
A !T! is a set of rules that specifies how to use <=) markup. 2t contains specifications
for each element# including what the element9s attributes are# what values the attributes can
take on and what elements can be contained in others.
12. Name some browsers?
=icrosoft 2nternet e+plorer# 3etscape# 7oogle "hrome# =o5illa :irefo+.
13. Define MIME?
=2=, (=ultipurpose 2nternet =ail ,+tensions) is an open standard for sending
multipart# multimedia data through 2nternet email.
14. What are the sequences of steps for each HTTP request from a client to the server?
1. =aking the connection
. =aking a re/uest
$. The response
&. "losing the connection
15. Define Encapsulation?
.lacing the data inside a package of headers is known as encapsulation.
16. What is meant by Stateless Connection?
4hen a web server receives a %TT. re/uest from a web browser it evaluates the re/uest
and returns the re/uested document# if it e+ists# and then breaks the %TT. 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. ,ach time a re/uest is made to the server# it is as if
there was no prior connection and each re/uest can yield only a single document. This is
known as *tateless "onnection.
17. Name some web servers?
=icrosoft 2nternet 2nformation *ervices (22*)# Apache.
Department of Information Technology @SVS College of Engineering Page 3
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
18. What are the common HTTP request types?
19. What is a GET request?
A get re/uest typically gets information from a server. "ommon use of get re/uests is to
retrieve an %T=) document or an image.
20. What is a POST request?
A post re/uest typically posts or sends data to a server. "ommon use of post re/uests is to
send information to server such as authentication information.
21. Name some Recommendations by W3C?
<%T=)# "**# %T=)# <=).
22. Explain the syntax of <frame> tags in detail?
>frameset rows?@ A# cols?@ AB
>frame name?@ A src?@ AB
>frame name?@ A src?@ AB
>frame name?@ A src?@ AB
23. Name the three flavors of Document Type declaration?
24. What are the three types of list supported by HTML?
25. Define an HTML Form?
An %T=) :orm is used to allow a user to input data on a web page. The value of
the re/uired action attribute specifies a '() to which the information collected on the form
should be sent when the user submits the form.
Department of Information Technology @SVS College of Engineering Page 4
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
1. What are Style Sheets?
*tyle sheets are collections of style information that are applied to plain te+t. *tyle
information includes font attributes such as type si5e# special effects (bold #italic#underline)#
color and alignment. *tyle sheets also provide broader formatting instructions by specifying
values for /uantities such as line spacing and left and right margins.
2. Give the elements to write a script?`
>script type?@te+tD6avascript@B write script here
3. List down the ways of including style information in a document?
1.Linked Styles -*tyle information is read from a separate file that is specified in the
>)23FB tag
2.Embedded Styles -*tyle information is defined in the document head using the
>*TG),B and >D*TG),B tags.
3.Inline Styles -*tyle information is placed inside an %T=) tag and applies to all
content between that tag and it companion closing tag.
4. What is the use of method ParseInt?
.arese2nt converts integer in string format to its corresponding numeric value.
5. Define cascading?
"ascading refers to a certain set of rules that browsers use to determine how to use the
style information. *uch 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.
6. How will you create an array using 1avaScript?
var newarray ? new array (si5e)H
7. What are the style precedence rules when using multiple approaches?
2nline styles override both linked style sheets and style information stored in the
document head with >*TG),B tag
*tyles defined in the document head override linked style sheets.
)inked style sheets override browser defaults.
8. Give some methods of String Object?
concat(string)# inde+Ef(string# start)# last2nde+Ef(string# start)# substr(start# length)#
substring(start# end)# to)owercase()# to'pper"ase()#split(token)
9. List down font characteristics permitted in Style Sheets.
10. Give some methods of Date Object?
get!ate()# gat!ay()# get%ours()# get=onth()# get=inutes()# get*econds()# het:ullGear()
11. Define ScriptletsI
*criptlets enable you to create small# reusable web applications that can be used in any
Department of Information Technology @SVS College of Engineering Page 5
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
web page. *criptlets are created using %T=)# scripting and !ynamic %T=). To include
them in an %T=) document use the >EJK,"TB tag.
12. What are the three values the user defined compare function for sorting array should
1.A negative value if the first argument is less than the second
.Lero if both argument are e/ual
$.A positive value if the first argument is greater than the second
13. Give some methods of Document Object?
write ()# writeln()# cookie
14. Write a script to display the position of mouse click?
>script type ? Mte+tD6avascriptMB
function start()
N alert (event.offset<OM#MOevent.offsetG)H
>body onclick ? Mstart()MB
>pB4elcome to our 4eb pageQ>DpB
15. Give some methods of window object?
Epen (url# name# options)# prompt (message# default)# close()# focus()
16. How will you create an event for an element?
>script type ?@te+tD6avascript@ for?@ob6ectname@ event?@eventname@B
DDcode to handle event
17. What is Margin Collapse?
4hen two consecutive block bo+es are rendered(the first on top of second)#a
special rule called margin collapse is used to determine the vertical separation between the
bo+es. The bottom margin of the first bo+ and the top margin of the second bo+ are
collapsed into a single margin.
18. List the 1avaScript global objects?
escape# eval# is:inite# is3an# parse:loat# parse2nt# un,scape
19.What is Half-Leading?
2f the height of a line bo+ is greater than the character cell height# then the character cells
are vertically centered within the line bo+. The distance between the top of a character cell
and the top of a line bo+ is called half-leading.
20. Define CSS shortcut property?
2t is a property that allows values to be specified for several nonshorthand properties with
a single declaration. ,+ample: line-height property.
Department of Information Technology @SVS College of Engineering Page 6
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
1. What is a DOM?
A !ocument Eb6ect =odel is an application programming interface that defines how
6avascript programs can access and manipulate the %T=) document currently displayed by a
2. What is an Event?
An event in a browser is an occurrence of potential interest. ,+ample events are the
mouse moving over an element. a mouse button being clicked# or a key being pressed. ,ach
type of event has an abbreviated name associated with it.
3. Define Intrinsic Event handling.
Jrowser-based 6ava script programs are the 6ava script functions are
called in response to various user actions# such as clicking a button# or moving the mouse
over a certain element.
4. What is Event listener in DOM?
An event listener is a function that takes a single argument that is an instance of ,vent. A
call to the add,vent)istener () method on a node ob6ect associates an event listener with a
type of event occurring on that node.
5. Differentiate Dynamic document with Static document?
An %T=) document that contains scripting is called a dynamic document
whereas a simple %T=) document without scripting is known as a static document.
6. What are the stages in a Servlet life cycle?
7. What are Servlets?
A small program that runs on a server# the term usually refers to a Kava applet that runs
within a 4eb server environment. This is analogous to a Kava applet that runs within a 4eb
browser environment. Kava servlets are becoming increasingly popular as an alternative to "72
programs. The biggest difference between the two is that a Kava applet is persistent.
8. What do you mean by Server-side?
Eccurring on the server side of a client-server system. :or e+ample# on the 4orld 4ide
4eb# "72 scripts are server-side applications because they run on the 4eb server. 2n contrast#
Kava*cript scripts are client-side because they are e+ecuted by your browser (the client). Kava
applets can be either server-side or client- side depending on which computer (the server or
the client) e+ecutes them.
9. What is a Session?
A collection of %TT. re/uests all associated with a single session 2! is known as a
session. ,ach %TT. re/uest is e+amined by the server to see if it contains a special identifier
known as a session 2!.
10. What are Cookies?
A cookie is a 3ame-value pair that a web server sends to a client machine as part of an
%TT. response# specifically through the *et-"ookie header field. Jrowsers will store the
cookie pairs found in the response in a file on the client machine.
Department of Information Technology @SVS College of Engineering Page 7
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
11. Define a Thread?
A thread is the 6ava R=;s abstract representation of the processing to be performed to
accomplish a particular task# possibly concurrently with other tasks.
12. Give the examples of the types of information that are not part of a thread`s state.
1.2nstance Rariables
."lass variables
$.:iles#databases#other servers and any resource e+ternal to the 6ava R=
13. When the threads are said to be deadlocked?
Ence an application has two or more locks# it is possible to reach a state in which there
are two threads# each holding a lock for which the other is waiting. The threads are said to be
deadlocked and neither will complete e+ecution.
14. What is rollover effect?
An image changes when we place the mouse over it#and changes back when the mouse
moves away from the image.
15. Give the functions of the HTML Intrinsic Event attributes ~onmousedown¨ and
Aonmousedown@-The mouse has been clicked over the element
Aonmouseup@-The mouse has been released over the element.
16. Define a bubbling listener.
A bubbling listener is a listener associated with the ancestor of the target node and that
was created with a call to add,ventlistener() that had its third argument set to false.
17. What are the actions involved in a doGet()method?
1.*et the %TT. "ontent-Type header of the response.
.Ebtain a .rint4riter ob6ect from the %ttp*ervlet(esponse parameter ob6ect.
$.Eutput a valid %T=) document to the .rint4riter ob6ect.
&."lose the .rint4riter ob6ect.
18. Illustrate the general steps to run a servlet.
1."ompile the servlet using an appropriate compiler version.
."opy the resulting .class file to the appropriate directory for our 6ava-servlet
capable server.
$.*tart the server
&.3avigate to the '() corresponding to the servlet.
19. Define a parameter name or value?
A parameter name or value can be composed of any se/uence of S-bit characters#
including control characters and other nonprinting characters. if a name or value contains any
nonalphanumeric characters then the name or value will undergo a transformation known as
url encoding.
20. How to terminate a Session?
The %ttp *ession interface defines a set=a+2nactive2nterval(int interval)method that
takes an integer argument interval representing a number of seconds. if more than interval
Department of Information Technology @SVS College of Engineering Page 8
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
seconds elapse between any two %TT. re/uests to the servlet from the user represented by
this %ttp *ession ob6ect# then the users session will e+pire before the second of these two
re/uests can be processed.
21.Define the function of HttpServletRequest Methods¨StringBuffer getRequestURL( )¨
(eturn a string buffer containing the '() used to access this servlet# e+cluding any
/uery string appended to the '() as well as any 6sessionidpath parameter.
1. Define 1ava Server Pages?
2t can be defined as one instantiation of a class of related technologies that facilitate
separate development of a website;s presentation and logic. The key contribution of these
technologies is to embed program code related to presentation within a document.
2. What is a Scriplet?
A *criplet is a fragment of 6ava code that is embedded within the K*. document.
3. What are the drawbacks of two-step approach in 1SP over direct interpretation?
.!elay during the first time a K*. document is re/uested.
4. Define a Web Application?
To implement larger tasks# a large collection of resources such as *ervlets#K*.
documents# 'tility and *upport Kava "lasses# *tatic %T=) documents# *tyle *heets# Kava*cript
files# 2mages are needed that work together in order to provide what appears to an end user to be
a single software application.. *uch a collection of resources is known as a web application..
5. Write the steps for installing a Web Application?
1."reate a directory under the webapps subdirectory.
..lace the K*. document in the new subdirectory.
$.!eploy the application to the sever.
6. What is meant by deploying the application to the server?
!uring the installation of a web application# after loading the K*. document in the
subdirectory# the server have to be notified that a new web application is available. This step
is known as deploying the application to the server.
7. Define a Deployment Descriptor?
The value to be displayed in the !isplay 3ame field is one of the pieces of information
that can be associated with a web application through an <=) document called a deployment
8. Specify the use of the deployment descriptor element ~login-config¨?
2t defines how the container should re/uest user-name and password information
when a user attempts to access a protected resource.
Department of Information Technology @SVS College of Engineering Page 9
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
9. How a URL pattern is interpreted?
4hen the server receives a re/uest for a '()#it first selects the web application that will
handle this re/uest. 2t chooses the application that has the longest conte+t path matching a
prefi+ of the path portion of the '().
10. Name the three types of information available in a valid 1SP document?
1.K*. markup
.,+pression )anguage(,))e+pressions
$.Template data
11. What are the two contexts by which an EL expression can be invoked?
1.4ithin template data
.4ithin certain attribute values in K*. markup
12. What are the Literals that can be used in a EL?
1.The Jooleans-True and :alse
.!ecimal#2nteger and :loating point
$.(eserved word-3ull
13. Name the reserved words in EL?
1.and .div $.empty
&.e/ -.false S.not U.null
14. What is the function of EL implicit objects pageScope and requestScope?
page*cope-Ralues accessible via calls to page.getAttribute()
re/uest*cope- Ralues accessible via calls to re/uestpage.getAttribute()
15. Name the two types of directives available for use in a 1SP document?
1.Page-The page directive(directive. page element) has a variety of attributes
that may be set.
2.Include-The include directive(directive. include element) imports te+t from another
file into the K*. document at the point at which the directive
16. What is known as a Translation Unit?
A top-level K*. document plus all of the segments it includes either directly or indirectly
through include directives in segments is known as a translation unit# because the translator
effectively assembles all of the te+t from these files into a single K*. document which is then
17. What are the three categories of 1SP element typesI
18. Explain the 1SP action element?
Department of Information Technology @SVS College of Engineering Page 10
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
2t is an element that is translated into 6avaservlet code that performs some action. These
elements provide standard actions ie# the actions that are re/uired by the K*. specification to
be provided by any K*.-compliant container. The K*. tag library mechanism allows
additional action elements to be used within a K*. document# which provide custom actions.
19. Give some 1STL Core actions and their functions.
set-Assign a value to a scoped variable
remove-!estroy a *coped variable
url-"reate a '() with /uery string
forEach-2terate over a collection of items
20. Define a Scoped variable.
2t is a non implicit ,) variable# that is an attribute of one of the page #re/uest #session#or
application ob6ects. The ob6ect containing the attribute is called the scope of the variable and
hence the name scoped variable
21. Define 1avaBeans Technology.
A simple mechanism to call 6ava methods from within a K*. document.K*. provides such
a mechanism through its support for KavaJeans classes.2f a 6ava class is written so as to
conform with certain aspects of the KavaJeans *pecification#the certain methods of this class
can be called from a K*. document.
22. Describe the Model-View-Controller paradigm.
=ost real-world web applications are much larger and may contain a large number of
components such as *ervlets and K*. documents and numerous support files such as
KavaJeans classes. 4hile there are many possible ways of organi5ing the components and
support files for such an application# one approach called the model-view-controller
paradigm is widely used in one form or another in many web applications.
23. Define PHP:Hypertext Preprocessor.
.%. is a .erl-like scripting language that can be embedded in %T=) documents much as
Kava *criplets can be embedded in K*. pages or scripting code in A*.. The synta+>IphpCIB
can be used to embed .%. code which means that an <=) parser will interpret the tags as
<=) processing instructions with target php.
24. Define ColdFusion®.
2t is the technology for embedding program logic in %T=) documents. All program
logic is embedded as <=) elements# so a "old :usion document is <=) compatible. A
"old:usion document may also contain e+pressions enclosed in V characters# which are
evaluated when a "old:usion document is re/uested and replaced with the values obtained.
1. Define a Web Service.
A web service is a server application that uses %TT. to accept and return *EA.
Department of Information Technology @SVS College of Engineering Page 11
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
documents# where the content of the documents is specified by a 4*!) document that uses
embedded <=) *chema markup to define data types.
2. Describe the implementation of Web Service.
A web service servlet accepts %TT. re/uests from clients and provides an %TT.
response for each re/uest received. 2t e+pects that each %TT. re/uest it receives will contain a
*EA. <=) document in the body of the re/uest. This *EA. document specifies an operation
to be performed by the web service and supplies input data for that operation.
3. Define a WSDL.
A 4eb service definition language document for a web service identifies the operations
provided by the web service# what the input data to each operation is# and what output data is
produced by the operation.
4. What is known as the Service Endpoint Interface?
The starting point for writing a web service using the K4*!. 1.$ tools is writing a Kava
interface that specifies the operations that will be provided by the service(essentially an A.2
for the service).This is known as the service endpoint interface.
5. Write the basic rules for service endpoint interface.
1.the interface must e+tend the 6ava.rmi.(emote interface
.,very method in the interface must throw 6ava.rmi.(emote,+ception
$.,very method parameter and every return value must conform to certain restrictions on
the allowed data types
&.The interface must not contain any public static final declarations.
6. Define XML Schema.
<=) schema defines the structure of <=) documents. A key contribution of <=)
schema is its definition of a collection of standard data types. ,ach data type definition
includes a specification of the range of values that can be represented by the data type and
details on how to represent those values as strings.
7. What is a deployment descriptor?
!eployment descriptor specifies various configuration parameters.
8. Define Simple Object Access Protocol.(SOAP).
*EA. is an <=) vocabulary that can be used to communicate data and was originally
designed for communicating structured data that might be found in ob6ect-oriented programs.
9. What is RPC Representation?
(." is the generic term for the type of communication used for web service
operations.The client makes a call to a method or procedure that resides on another
machine.This concept has been implemented in many ways by many programming languages
and operating systems.
10. Define a Struct?
A struct can be thought of as an instance of a class that consists entirely of public
instance variables. 2t is simply a container in which data can be stored in named variables.
Department of Information Technology @SVS College of Engineering Page 12
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
11. What is literal-encoding?
An encoding conforming with the <=) schema contained in the we service;s 4*!)
over *EA. 1.1 encoding of data.A literal encoding is indicated within a 4*!) by specifying
literal for the use attribute of a soap:body element.
12.Name the two operations defined by WSDL 1.1.
13. Define Serialization?
The fle+ibility in converting from an internal form of data to a *EA. representation is
known as seriali5ation and it comes at the price of forcing the software that deseriali5es a
*EA. representation to be prepared to accept *EA. documents in a variety of forms.
14. Describe the 1ava support for SOAP?
Kava provides support for creating and manipulating *EA. documents through *AAK# the
*EA. with Attachments A.2 for Kava technology. This A.2 is included with K4*!.1.$.
15.What are Serializable objects?
4hen an ob6ect is seriali5ed# the data contained within the ob6ect is transformed into a
stream of bytes representing the data. This ob6ect data stream can then be stored in a file#
transmitted over a communications network# or treated like any other stream of data.
16. Name the methods of HttpServletRequest interface?
*tring get.arameter(string name)# stringWX get.arameterRalues(*tring name)#
cookieWX get"ookies()# %ttp*ession get*ession(boolen# create)
17. What are directives?
!irectives are messages to the 6sp container that enables the programmer to specify page
settings# to include content from other resources and to specify custom-tag libraries for use in
18. Name the Header Child Element Attributes in SOAP?
1.must understand
.encoding style
19. What is the use of 1SP?
K*. enable web application programmers to create dynamic content by reusing
predefined components and by interacting with components using server side scripting.
20. Differentiate a Simple type with a Complex type
A simple type is a data type whose values are represented in <=) documents by
character data# while a comple+ type is represented using markup.
21. Define CDATA?
"haracter data("!ATA) is a te+t in a document that should not be parsed by the <=)
parser. Any entities included in the "!ATA block will not be replaced by their value and
Department of Information Technology @SVS College of Engineering Page 13
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
markup (such as %T=) tags) will not be treated as markup.
22. Describe the structure of SOAP element?
2t consists of the following:
1.The *EA. envelope element
.The *EA. header element
$.The *EA. body element
&.The *EA. fault element
23. Define 1AX-RPC?
KA<-(." (Kava A.2 for <=)-Jased (.") is an application program interface (A.2) in
the Kava 4eb *ervices !eveloper .ack (4*!.) that enables Kava developers to include
remote procedure calls ((."s) with 4eb services or other 4eb-based applications. KA<-
(." is aimed at making it easier for applications or 4eb services to call other applications or
4eb services.
24. What is SOAP Envelope element?
The re/uired *EA. ,nvelope element is the root element of a *EA. message. This
element defines the <=) document as a *EA. message.
>I+ml version?M1.1MIB
>soap:,nvelope +mlns:soap?Mhttp:DDwww.w$.orgD111D1Dsoap-
=essage information goes here >Dsoap:,nvelopeB
25. Define the SOAP Fault elementI
The *EA. fault mechanism returns specific information about the error# including a
predefined code# a description# the address of the *EA. processor that generated
1.A *EA. =essage can carry only one fault block
.:ault element is an optional part of *EA. =essage
$.*EA. fault is linked to the -11 to -UU range of status codes.
1. Explain the World Wide Web.
The 4orld 4ide 4eb# the 444# or the 4e b# is the largest# the fastest growing# and
the most popular 2nternet service. 2n addition to te+t# it can display images# animations#
sounds# and videos. To access the 4eb information you need:
(1) A connection to the 2nternet and
() A 4eb browser such as 3etscape or 2nternet ,+plorer.
Web browser
A 4eb browser is a software program that allows you to view or MbrowseM individual
pages on the 4eb. The computer running a 4eb browser is called a client machine (because
it 6ust re/uests and receives data) while the computer called server provides the data it stores.
Web page
Department of Information Technology @SVS College of Engineering Page 14
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
A 4eb page is a single electronic document written in %T=). 4eb pages vary in
content# design# and si5e# depending on the purpose.
Web site
A 4eb site may have one or more related 4eb pages. The first page one sees in a
website is called the home page. This page usually provides an overview of what you will
find in the 4eb site and offers a list of items# which link to other pages on the site or to other
4eb sites.
Home Page
2t is the web page that appears each time your 4eb browser (internet e+plorer). 4e
can choose any page on the web to set as your home page.
%T=) stands for %yperte+t =arkup )anguage and it is the standard computer
language used on the 4orld 4ide 4eb. The %T=) code tells browsers (such as ,+plorer
and 3etscape) how 4eb pages should be presented. 4eb browsers then let you see the 4eb
pages content.
Navigation Buttons
Allow you to move through information on the web (Jack# :orward). Gou can even
stop the transfer of a web page if it is taking a lot of time.
A web page contains a lot of te+t that is highlighted such that when you click
on it can take you to another page. %yperlinks allow you to move through a vast number of
information on the internet by moving from one web page to another.
,ach 4eb page has its own address# or '() ('niform (esource )ocator). The '()
identifies the location of each file on the 444. ,
The internet allows you to e+change electronic mail with people around the
world.,lectronic mail is fast# ine+pensive# and saves paper. The most popular web-based e-
mail services are and www.
Downloading software
Thousands of programs are available on the internet. The internet offers you the
facility of downloading programs.
2. Explain HTTP Request and Response Message?
HTTP Request Message
The client initiates an %TT. session by opening a T". connection to the %TT.
server with which it wishes to communicate. 2t then sends re/uest messages to the server#
each of which specifies a particular type of action that the user of the %TT. client would like
the server to take.
(e/uests can be generated either by specific user action (such as clicking a hyperlink
in a 4eb browser) or indirectly as a result of a prior action (such as a reference to an inline
image in an %T=) document leading to a re/uest for that image.)
%TT. re/uests use a message format that is based on the generic message format
described in the preceding topic# but specific to the needs of re/uests. The structure of this
format is as follows :
Department of Information Technology @SVS College of Engineering Page 15
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
HTTP Response Message
,ach re/uest message sent by an %TT. client to a server prompts the server to send
back a response message. Actually# in certain cases the server may in fact send two
responses# preliminary response followed by the real one. 'sually though# one re/uest yields
one response# which indicates the results of the server9s processing of the re/uest# and often
also carries an entity (file or resource) in the message body.
)ike re/uests# responses use their own specific message format that is based on the
%TT. generic message format. The format# shown is as follows:
3. Explain in detail about various protocols used in web technology?
4. Describe HTML Forms with example.
HTML Input Element
1. Text Fields
2. Password Field
3. Radio Button
4. Check box
5. Differentiate Relative URLs with Absolute URL.
Absolute URL
An Absolute '() is independent or free from any relationship. 4hen we use
an absolute '()# it point directly to a file. %ence# an absolute '() specifies the e+act
location of a fileDdirectory on the internet. 2t also follows that each absolute '() is uni/ue#
which means that if two '()s are identical# they point to the same file.
http:DDwww.webdevelopersnotes.comDimagesDemail.gif specifies an image file
email.gif located in the images directory# under domain
Relative URL
A relative '() points to a fileDdirectory in relation to the present fileDdirectory..artial
internet address which points to a directory or file in relation to the current directory or file.
4hen creating a link in a website9s code# if 6ust a filename is given without any other
modifications# that is an indicator to find that file within the current directory and link to it.
Department of Information Technology @SVS College of Engineering Page 16
IT2353 WEB TECHNOLOGY 2 Marks and 16 Marks
=odifiers can be added to a relative '() which indicate that the file is found in a higher
directory# or code can be added to indicate that the file is in a deeper directory. (elative
'()s are often easier to maintain than absolute '()s.
Using a Absolute URL in an <IMG>tag
Using a Relative URL in an<IMG>tag
>img src?M..DimagesDemail.gifM width?M...M height?M...M DB
1.What are Literals in javascript?
)iterals are the way you represent values in Kava*cript. These are fi+ed values
that we literally provide in your application source# and are not variables. ,+amples of
literals include:
MTo be or not to beM
2ntegers can be e+pressed in decimal (base 11)# he+adecimal (base 10)# or octal (base
S) format. A decimal integer literal consists of a se/uence of digits (optionally suffi+ed as
described below) without a leading 1 (5ero). An integer can be e+pressed in octal or
he+adecimal rather than decimal. A leading 1 (5ero) on an integer literal means it is in octalH
a leading 1+ (or 1<) means he+adecimal. %e+adecimal integers can include digits (1-U) and
the letters a-f and A-:. Ectal integers can include only the digits 1-T.
A floating point literal can have the following parts: a decimal integer# a decimal point
(M.M)# a fraction (another decimal number)# an e+ponent# and a type suffi+. The e+ponent part
is an MeM or M,M followed by an integer# which can be signed (preceded by a MOM or M-M). A
floating point literal must have at least one digit# plus either a decimal point or MeM (or M,M).
*ome e+amples of floating point literals are:
Boolean Literals
The boolean type has two literal values: true and false.
Department of Information Technology @SVS College of Engineering Page 17
String Literals
A string literal is 5ero or more characters enclosed in double (M) or single (9) /uotes.
A string must be delimited by /uotes of the same typeH that is# either both single /uotes or
double /uotes. The following are e+amples of string literals:
Mone line Yn another lineM
Special Characters
we can use the following special characters in Kava*cript string literals:
\b indicates a backspace.
\f indicates a a form feed.
\n indicates a new line character.
\r indicates a carriage return.
\t indicates a tab character.
2.Describe 1avaScript Variables and DataTypes.
1avaScript DataTypes:
Ene of the most fundamental characteristics of a programming language is the set of
data types it supports. These are the type of values that can be represented and
in a programming language.Kava*cript allows to work with three primitive data types:
3umbers eg. 1$# 11.-1 etc.
*trings of te+t e.g. MThis te+t stringM etc.
Joolean e.g. true or false.
Kava*cript also defines two trivial data types# null and undefined# each of which defines
a single value.2n addition to these primitive data types# Kava*cript supports a composite
type known as ob6ect.
1avaScript Variables:
)ike many other programming languages# Kava*cript has variables. Rariables can
be thought of as named containers. 4e can place data into these containers and then refer
to the data simply by naming the container. Jefore we use a variable in a Kava*cript
program# we must declare it. Rariables are declared with the var keyword as follows:
>script type?Mte+tD6avascriptMB
var moneyH
var nameH
4e can also declare multiple variables with the same var keyword as follows:
script type?Mte+tD6avascriptMB
var money# nameH
3.Explain the CSS Box Model in detail.
All %T=) elements can be considered as bo+es. 2n "**# the term Mbo+ modelM is
used when talking about design and layout.The "** bo+ model is essentially a bo+ that
wraps around %T=) elements# and it consists of: margins# borders# padding# and the actual
content.The bo+ model allows us to place a border around elements and space elements in
relation to other elements.The image below illustrates the bo+ model:
,+planation of the different parts:
Margin - "lears an area around the border. The margin does not have a background
color# it is completely transparent
Border - A border that goes around the padding and content. The border is affected
by the background color of the bo+
Padding - "lears an area around the content. The padding is affected by the
background color of the bo+
Content - The content of the bo+# where te+t and images appear
4.Describe the CSS Border Style Properties:
The border-style property can have from one to four values.
border-style:dotted solid double dashed;
otop border is dotted
oright border is solid
obottom border is double
o left border is dashed
border-style:dotted solid double;
o top border is dotted
o right and left borders are solid
o bottom border is double
border-style:dotted solid;
o top and bottom borders are dotted
o right and left borders are solid
o all four borders are dotted
5.Explain CSS Text Properties?
Text Color
-The color property is used to set the color of the te+t. The color can be specified
name Z a color name# like Ared@
(7J Z an (7J value# like Argb(--#1#1)@
%e+ Z a he+ value# like AVff1111@
-The default color for a page is defined in the body selector.
Text Alignment
-The te+t-align property is used to set the hori5ontal alignment of a te+t.
-Te+t can be centered# or aligned to the left or right# or 6ustified.
-4hen te+t-align is set to A6ustify@# each line is stretched so that every line has e/ual
width# and the left and right margins are straight (like in maga5ines and
Text Decoration
-The te+t-decoration property is used to set or remove decorations from te+t.
-The te+t-decoration property is mostly used to remove underlines from links for
design purposes:
Text Transformation
-The te+t-transform property is used to specify uppercase and lowercase letters in a
te+t.2t can be used to turn everything into uppercase or lowercase letters# or
capitali5e the first letter of each word.
Text Indentation
-The te+t-indentation property is used to specify the indentation of the first line of
a te+t.
1. Design a web page to detect the visitor`s browser name and version?
>script type?Mte+tD6avascriptMB
document.write(MJrowser "ode3ame: M O"ode3ame)H
document.write(M>br DB>br DBM)H
document.write(MJrowser 3ame: M O navigator.app3ame)H
document.write(M>br DB>br DBM)H
document.write(MJrowser Rersion: M O navigator.appRersion)H
document.write(M>br DB>br DBM)H
document.write(M"ookies ,nabled: M O navigator.cookie,nabled)H
document.write(M>br DB>br DBM)H
document.write(M.latform: M O navigator.platform)H
document.write(M>br DB>br DBM)H
document.write(M'ser-agent header: M O navigator.userAgent)H
Describe Cookies in detail.
"ookies are used to store an 2! for a shopping session with each subse/uent
connection# and can look up the current session 2! and then use that 2! to e+tract
information about that session from a lookup table on the server machine. *o# there would
really be two tables: one that associates session 2!s with user tables# and the user tables
themselves that store user-specific data. :or e+ample# on the initial re/uest a servlet could do
something like the following:
*tring session2! ? make'ni/ue*tring()H
%ash=ap session2nfo ? new %ash=ap()H
%ash=ap globalTable ? findTable*toring*essions()H
globalTable.put(session2!# session2nfo)H
"ookie session"ookie ? new "ookie(MK*,**2E32!M# session2!)H
2n later re/uests the server could use the global Table hash table to associate a session
id from the 6sessionid cookie with the session 2nfo hash table of user-specific data. 'sing
cookies in this manner is an e+cellent solution and is the most widely used approach for
session handling. it is nice that servlets have a higher-level A.2 that handles all this plus the
following tedious tasks:
[ ,+tracting the cookie that stores the session identifier from the other
cookies (there may be many cookies# after all).
[ !etermining when idle sessions have e+pired# and reclaiming them.
[ Associating the hash tables with each re/uest.
[ 7enerating the uni/ue session identifiers.
3. Explain Sessions in detail?
*essions in servlets is straightforward and involves four basic steps.
1. Accessing the session object associated with the current request.
-"all re/uest.get*ession to get an %ttp*ession ob6ect# which is a simple hash table
storing user-specific data.
. Looking up information associated with a session.
-"all getAttribute on the %ttp*ession ob6ect# cast the return value to the appropriate
type# and check whether the result is null.
$. Storing information in a session.
-'se setAttribute with a key and a value.
&. Discarding session data.
-"all removeAttribute to discard a specific value. "all invalidate to discard an entire
session. "all logout to log the client out of the 4eb server and invalidate all
sessions associated with that user.
Accessing the Session Object Associated with the Current Request
*ession ob6ects are of type %ttp*ession# but they are basically 6ust hash tables that
can store arbitrary user ob6ects (each associated with a key). The %ttp*ession ob6ect can be
implemented by calling the get*ession method of %ttp*ervlet(e/uest# as below.
%ttp*ession session ? re/uest.get*ession()H
4.Explain URL Rewriting?
URL Rewriting:
-'() rewriting is another way to support anonymous session tracking. ie#2f the
browser does not support cookies# '() rewriting provides with another session tracking
-4ith '() rewriting# every local '() the user might click on is dynamically
modified# or rewritten# to include e+tra information.
-The e+tra information can be in the form of e+tra path information# added
parameters# or some custom# server-specific '() change.
-!ue to the limited space available in rewriting a '()# the e+tra information is
usually limited to a uni/ue session 2!.
:or e+ample# the following '()s have been rewritten to pass the session 2! 1$:
http:DDserver:portDservletD(ewritten original
http:DDserver:portDservletD(ewrittenD1$ extra path information
http:DDserver:portDservletD(ewrittenIsessionid?1$ added parameter
http:DDserver:portDservletD(ewrittenH\sessionid$ custom change
1. '() rewriting works for all dynamically created documents servlet.
. "ustom '() rewriting can even work for static documents with the right
server support.
1.'sing e+tra path information works on all servers# and it works as a target for forms
that use both the 7,T and .E*T methods. 2t doesn9t work well if a servlet has to use the
e+tra path information as true path information.
.'sing an added parameter works on all servers too# but it fails as a target for forms
that use the .E*T method# and it can cause parameter naming collisions.
$.'sing a custom# server-specific change works under all conditions for servers that support
the change. 'nfortunately# it doesn9t work at all for servers that don9t support the change.
5.Explain about javascript global function?
parseInt(x, ¡radix])
.arses any string M+M and returns the first valid number (integer) it encounters.
2f the first character in the string is not a number# white spaces# or a leading
minus sign# parse2nt() returns 3a3 instead. Gou can test for 3a3 using the
is3a3() function below.
parse2nt() supports an optional nd Mradi+M parameter to specify the base of
the number to be parsed (valid range is -$0).
,ntering M11M would parse the number in the familiar decimal system# while
M10M would be he+adecimal.
4ithout this parameter present# parse2nt() assumes any number that begins
with M1+M to be radi+ 10# M1M to be radi+ S# and any other number to be radi+
parse2nt(M$ chancesM) DDreturns $
parse2nt(M2 have $ computersM) DDreturns 3a3
parse2nt(M1TM# S) DDreturns 1-
.arses any string M+M and returns the first valid floating point number it
'se this function to e+tract numbers with decimals# for e+ample.
2f the first character in the string is not a number# white spaces# or a leading
minus sign# parse:loat() returns 3a3 instead. Gou can test for 3a3 using the
is3a3() function below.
parse:loat(M-$.US pointsM) DDreturns -$.US
1. Explain in detail about Microsoft IIS?
2nternet 2nformation *ervices (22*) is a web server application and set of feature
e+tension modules created by =icrosoft for use with =icrosoft 4indows.
2t is the world9s second most popular web server in terms of overall websites
behind the industry leader Apache %TT. *erver.
The protocols supported in 22* include :T.# :T.*#*=T.#33T.#
and %TT.D%TT.*.
The different Rersions of 22* are
o 22* 1.1# 4indows 3T $.-1 available as a free add-on
o 22* .1# 4indows 3T &.1
o 22* $.1# 4indows 3T &.1 *ervice .ack $
o 22* &.1# 4indows 3T &.1 Eption .ack
o 22* -.1# 4indows 111
o 22* -.1# 4indows <. .rofessional# 4indows <. =edia "enter ,dition
o 22* 0.1# 4indows *erver 11$ and 4indows <. .rofessional +0& ,dition
o 22* T.1# 4indows *erver 11S and 4indows Rista
22* is not turned on by default when 4indows is installed# but it can be selected
from the list of optional features
The first =icrosoft web server was a research pro6ect at ,uropean =icrosoft
4indows 3T Academic "entre (,=4A")# part of the 'niversity of
,dinburgh in *cotland# and was distributed as freeware. %owever since the
,=4A" server was unable to scale sufficiently to handle the volume of traffic
going to =icrosoft was forced to develop its own web server# 22*
Jy default 22* -.1 and lower run websites in-process under the *G*T,=
account a default 4indows account with 9superuser9 rights.
22* 0.1 contain a new kernel %TT. stack (http.sys) with a stricter %TT. re/uest
parser and response cache for both static and dynamic content
There are various built-in security features from =icrosoft
2. Explain XML Namespaces in detail?
<=) 3amespaces provide a method to avoid element name conflicts.2n <=)# element
names are defined by the developer. This often results in a conflict when trying to mi+ <=)
documents from different <=) applications.This <=) carries %T=) table information:
This <=) carries information about a table (a piece of furniture):
>nameBAfrican "offee Table>DnameB
2f these <=) fragments were added together# there would be a name conflict. Joth contain a
>tableB element# but the elements have different content and meaning.An <=) parser will
not know how to handle these differences.
Solving the Name Conflict Using a Prefix
3ame conflicts in <=) can easily be avoided using a name prefi+.This <=) carries
information about an %T=) table# and a piece of furniture:
>f:nameBAfrican "offee Table>Df:nameB
2n the e+ample above# there will be no conflict because the two >tableB elements have
different names.
3.Explain the XML HTTPRequest object?
The <=)%ttp(e/uest ob6ect is used to e+change data with a server behind the scenes.
The <=)%ttp(e/uest ob6ect is a developer's dream# because we can:
'pdate a web page without reloading the page
(e/uest data from a server after the page has loaded
(eceive data from a server after the page has loaded
*end data to a server in the background
Create an XMLHttpRequest Object
All modern browsers (2,TO# :irefo+# "hrome# *afari# and Epera) have a built-in
<=)%ttp(e/uest ob6ect.
*ynta+ for creating an <=)%ttp(e/uest ob6ect:
+mlhttp?new <=)%ttp(e/uest()H
Eld versions of 2nternet ,+plorer (2,- and 2,0) uses an Active< Eb6ect:
+mlhttp?new Active<Eb6ect(M=icrosoft.<=)%TT.M)H
4.Explain Selecting XML Data: XPath?
<.ath is used to navigate through elements and attributes in an <=) document. <.ath is a
ma6or element in 4$"9s <*)T standard - and <]uery and <.ointer are both built on <.ath
XPath Path Expressions
<.ath uses path e+pressions to select nodes or node-sets in an <=) document. These path
e+pressions look very much like the e+pressions you see when you work with a traditional
computer file system.
XPath Standard Functions
<.ath includes over 111 built-in functions. There are functions for string values# numeric
values# date and time comparison# node and ]3ame manipulation# se/uence manipulation#
Joolean values# and more.
XPATH is a W3C Recommendation
<.ath became a 4$" (ecommendation 10. 3ovember 1UUU. <.ath was designed to be used
by <*)T# <.ointer and other <=) parsing software.
<.ath uses path e+pressions to select nodes or node-sets in an <=) document. The node is
selected by following a path or steps.
.redicates are used to find a specific node or a node that contains a specific value..redicates
are always embedded in s/uare brackets.
1.Convert an XML file to a DTD file .
An <=) *chema describes the structure of an <=) document.The advantages of
<=) schema over !T! are
-<=) *chemas *upport !ata Types
-<=) *chemas use <=) *ynta+
-<=) *chemas *ecure !ata "ommunication
-<=) *chemas are ,+tensible
A *imple <=) !ocument:note.+ml
>I+ml version?M1.1MIB
>bodyB!on9t forget me this weekendQ>DbodyB
A DTD File
The following e+ample is a !T! file called Mnote.dtdM that defines the elements of the <=)
document above (Mnote.+mlM):
>Q,),=,3T note (to# from# heading# body)B
>Q,),=,3T to (V."!ATA)B
>Q,),=,3T from (V."!ATA)B
>Q,),=,3T heading (V."!ATA)B
>Q,),=,3T body (V."!ATA)B
The first line defines the note element to have four child elements: Mto# from# heading# bodyM.
)ine -- defines the to# from# heading# body elements to be of type MV."!ATAM.
2.Illustrate a WSDL example?
This is a simplified fraction of a 4*!) document:
>message name?MgetTerm(e/uestMB
>part name?MtermM type?M+s:stringMDB
>message name?MgetTerm(esponseMB
>part name?MvalueM type?M+s:stringMDB
>portType name?MglossaryTermsMB
>operation name?MgetTermMB
>input message?MgetTerm(e/uestMDB
>output message?MgetTerm(esponseMDB
2n this e+ample the <portType> element defines MglossaryTermsM as the name of a port# and
MgetTermM as the name of an operation.The MgetTermM operation has an input message
called MgetTerm(e/uestM and an output message called MgetTerm(esponseMThe <message>
elements define the parts of each message and the associated data types."ompared to
traditional programming# glossaryTerms is a function library# MgetTermM is a function with
MgetTerm(e/uestM as the input parameter# and getTerm(esponse as the return parameter.
3.Write a script to display a drop down menu?
>form name?Mform1MB
>select name?Mselect1M on"hange?Mdisplaydesc(document.form1.select1# thete+t1#
>option selected value?Mhttp:DDwww.6avascriptkit.comMBKava*cript Fit
>option value?>DoptionB
>option value?Mhttp:DDwired.comM target?MnewwinMB4ired 3ews>DoptionB
>option value?>DoptionB
>option value?Mhttp:DDwww.codingforums.comM target?MnewwinMB"oding
>input type?MbuttonM value?M7oM
>span id?Mte+tcontainer1M align?MleftM style?Mfont:italic 1$p+ ArialMB
4. Explain XML Schema in detail.
The following e+ample is an <=) *chema file called Mnote.+sdM that defines the
elements of the <=) document above (Mnote.+mlM):
>I+ml version?M1.1MIB
>+s:schema +mlns:+s?Mhttp:DDwww.w$.orgD111D<=)*chemaM
>+s:element name?MnoteMB
>+s:element name?MtoM type?M+s:stringMDB
>+s:element name?MfromM type?M+s:stringMDB
>+s:element name?MheadingM type?M+s:stringMDB
>+s:element name?MbodyM type?M+s:stringMDB
The note element is a complex type because it contains other elements. The other elements
(to# from# heading# body) are simple types because they do not contain other elements.
5.Explain the structure of WSDL?
The WSDL Document Structure
A 4*!) document describes a web service using these ma6or elements:
Element Defines
>typesB The data types used by the web service
>messageB The messages used by the web service
>portTypeB The operations performed by the web service
>bindingB The communication protocols used by the web service
A 4*!) document can also contain other elements# like e+tension elements# and a service
element that makes it possible to group together the definitions of several web services in one
single 4*!) document.
WSDL Ports
The <portType> element is the most important 4*!) element. 2t describes a web service#
the operations that can be performed# and the messages that are involved.The >portTypeB
element can be compared to a function library in a traditional programming language.
WSDL Messages
The <message> element defines the data elements of an operation.,ach message can consist
of one or more parts. The parts can be compared to the parameters of a function call in a
traditional programming language.
WSDL Types
The <types> element defines the data types that are used by the web service. :or ma+imum
platform neutrality# 4*!) uses <=) *chema synta+ to define data types.
WSDL Bindings
The <binding> element defines the message format and protocol details for each port.