You are on page 1of 83

IT63 UNIT 1 1. Explain in detail about the basic internet protocols.

WEB TECHNOLOGY

The OSI-ISO model consists of 7 layers and at each layer one or more protocols are used to handle the transmission of data. The layers and the associated protocols are given in the table: Layers 7 6 5 4 3 2 1 Name Application Presentation Session Transport Network Data Link Physical Protocols used SSH, FTP, Telnet HTTP, SNMP, SMTP, POP3 RPC, named pipes, NETBIOS TCP, UDP IP Ethernet Cat-5

TCP - Transmission Control Protocol The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol (IP), and therefore the entire suite is commonly referred to as TCP/IP. TCP provides reliable, ordered delivery of a stream of bytes from a program on one computer to another program on another computer. TCP is the protocol that major Internet applications such as the World Wide Web, email, remote administration and file transfer rely on. Other applications, which do not require reliable data stream service, may use the User Datagram Protocol (UDP), which provides a datagram service that emphasizes reduced latency over reliability. The TCP is widely used for: Safety delivery of data Error detection Assurance of the correct sequencing of data being received. The TCP protocol is a connection oriented protocol because before sending the data this protocol requires that the two computers have established connections. The TCP allows the transmission by breaking the data into stream of IP packets. These IP packets are numbered so that they can be reassembled properly. Along with the data an acknowledgment is also sent/received to know whether the reliable connection is occurred or not. TCP protocol provides the full duplex communication process. The below shown figure shows the operation of a TCP protocol.

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

The TCP protocol ask the destination whether it can make a connection with the destination and if the destination gives the acknowledgement then the connection will be made by sending an acknowledgement. Then the source machine sends the data in the form of packets and if the packet is received then the acknowledgement message is sent back to the source. While sending the data the source maintains a timer and if the destination did not send the acknowledgement within the time limit it again resends the data to the destination until the acknowledgement is send to the source from the destination. TCP also adds concept of a port, which allows TCP to communicate with many different applications on a machine. TCP header contains port number representing an application program on the destination computer. Some port numbers have standard meanings. Example: port 25 is normally used for email transmitted using the Simple Mail Transfer Protocol (SMTP). Other port numbers are available first-come-first served to any application.

Simplified view of communication using TCP/IP Here the port operation is carried out by the TCP protocol.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

Mail server on Host B sends a message to TCP software located on Host B. The TCP software then tells IP software on Host B. Now from Host A the data is send to TCP software on Host A. TCP software attaches the TCP header to the data. The data is then sent to the IP software. IP software attaches the IP header to the data. The encapsulated data with IP and TCP header will then be traversed over the network. It will be sent to the IP software running on the Host A. Host A will remove the IP header and sent the packet to the TCP software. The TCP software running on the Host A will remove the TCP header and send only the data to the mail server. Thus mail server running on the Host A accepts the data sent by mail client on Host B.

IP Internet protocol IP is a network layer protocol which consists of addressing information. Using this information the communication between uniquely addressed computers is possible. The internet protocol decomposes the information into packets of standardized size and then reassembles the data at the destination point. The internet protocol route the packet through the successive network and then to the network. The destination to which the data has to be send will be identified by its IP address. If the source machine wants to send the data to the destination machine, it is necessary to have the IP software to be run on both the machines. The main function of the IP software is to transfer the data from source to destination. When the source wants to send the data to the destination machine then the source calls the IP software running on it. It encapsulates the data to be transferred to destination along with the IP address of source and destination. The IP software running in source creates a packet. This packet consists of data+IP address of source+IP address of destination+header. If the destination is on the same network then the packet is transferred over the network. But if it is on another network then these two networks should get connected together by a gateway. In this case source sends message to the gateway. The gateway selects the computer on one of the network to which it is attached and send the packets to the destination machine.

The packet then travels through the network and then reaches the destination. Such traversing is called routing.
Marthandam College of Engineering and Technology Kuttakuzhi

L.A.ANTO GRACIOUS, Lect/IT

IT63

WEB TECHNOLOGY

Routing The sequence of computer that packet travels through from source to destination is called as its route. UDP User Datagram Protocol UDP is an alternative protocol to TCP that builds on IP. The main feature is the port concept. It does not provide the two-way connection or does not provide guaranteed delivery. Since it is called as unreliable protocol. UDP's stateless nature is also useful for servers answering small queries from huge numbers of clients. Unlike TCP, UDP supports packet broadcast (sending to all on local network) and multicasting (send to all subscribers). Common network applications that use UDP include: the Domain Name System (DNS), streaming media applications such as IPTV, Voice over IP (VoIP), Trivial File Transfer Protocol (TFTP), IP tunneling protocols and many online games. DNS Domain Naming Service The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. Most importantly, it translates domain names meaningful to humans into the numerical identifiers associated with networking equipment for the purpose of locating and addressing these devices worldwide. An often-used analogy to explain the Domain Name System is that it serves as the phone book for the Internet by translating human-friendly computer hostnames into IP addresses. For example, the domain name www.example.com translates to the addresses 192.0.32.10 (IPv4). The Domain Name System makes it possible to assign domain names to groups of Internet resources and users in a meaningful way, independent of each entity's physical location. Because of this, World Wide Web (WWW) hyperlinks and Internet contact information can remain consistent and constant even if the current Internet routing arrangements change or the participant uses a mobile device. Internet domain names are easier to remember than IP addresses such as 208.77.188.166 (IPv4). Users take advantage of this when they recite meaningful Uniform Resource Locators (URLs) and e-mail addresses without having to know how the computer actually locates them. The Domain Name System distributes the responsibility of assigning domain names and mapping those names to IP addresses by designating authoritative name servers for each domain. Authoritative name servers are assigned to be responsible for their particular domains, and in turn can assign other authoritative name. There are two tasks that can be carried out by DNS servers: Accepting and then requesting the programs to convert domain names into IP addresses. Accepting and then requesting the other DNS servers to convert domain names to IP addresses.
Marthandam College of Engineering and Technology Kuttakuzhi

L.A.ANTO GRACIOUS, Lect/IT

IT63

WEB TECHNOLOGY

Host names consist of a sequence of Labels separated by dots, e.g., www.example.org. Final label is top-level domain with 2 standard types: Generic : .com, .edu, .org, etc. Country-code : .us, .ca, etc. Domains are divided into second-level domains, which can be further divided into subdomains, etc. E.g., in www.example.com, example is a second-level domain. A host name plus domain name information is called the fully qualified domain name (FQDN) of the computer. Above, www is the host name, www.example.com is the FQDN. nslookup program provides command-line access to DNS (on most systems). Looking up a host name given an IP address is known as a reverse lookup. Note that single host may have multiple IP addresses (and a single IP address can be associated with multiple domain names). Address (or name) returned is the canonical IP address (or name) specified in the DNS system. Other addresses (or names) are considered aliases. FTP File Transfer Protocol File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one host to another host over a TCP-based network, such as the Internet. FTP is built on client-server architecture and uses separate control and data connections between the client and server. FTP users may authenticate themselves using a clear-text sign-in protocol but can connect anonymously if the server is configured to allow it. In the second age, the first FTP client applications were interactive command-line tools, implementing standard commands and syntax. Graphical user interface clients have since been developed for many of the popular desktop operating systems in use today. There are various issues that must be solved during file transfer. They are: Client must have an authority to download a particular file. The hardware and software on both formats on client and server might be different. The data interpretation and data formats at client and server might be different.

FTP uses two connections between client and server. One connection is used for actual file transfer and the other is used for control information. This separation of data and commands makes the FTP more efficient. HTTP Hyper Text Transfer Protocol The HTTP is a request/response protocol. It is a communication protocol used to transfer the information on local area network and World Wide Web. Its the network protocol used to deliver all files and other data on the World Wide Web, whether they are HTML files, image files or anything else. A browser is a HTTP client because it sends request to an HTTP server which then sends response back to the client. The standard port for HTTP servers to listen on is 80. The get and post are two popular methods used by HTTP protocol. It is also called as a stateless protocol because this protocol is not able to maintain the previous information.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 SNMP Simple Network Management Protocol

WEB TECHNOLOGY

SNMP is a protocol which enables network administrators to manage network devices and to diagnose network problems. The network management system is based on two main elements: a supervisor and agents. SNMP makes use of UDP connections for transferring the SNMP messages. The supervisor is the terminal at which the network administrator request for network management. The agents are found at the level of each interface connecting the managed devices to the network. With the help of these agents informations on the different objects can be collected. SMTP Simple Mail Transfer Protocol It is extensively used for transfer of emails to remote servers. It is an asynchronous protocol because it allows delayed delivery of message. This protocol makes use of port 25. With the help of mail transfer agent and user agent the SMTP sends and receives the email. The mail transfer agent is the interface between email system and local email server. The user agent is user interface client. It allows the user to read email messages by receiving it from the server. POP3 Post Office Protocol Version 3 POP3 is used by local email clients. POP3 makes use of port 110. The POP3 protocol works only at the receivers end and had no work at the senders end. The POP has two parts: receivers POP and server POP. The client opens TCP connection with receivers POP server. This client must be authenticated first by the user name and password. Then the client can receive the emails from the mailbox.

2. Explain in details about some fundamental html elements. HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup language A markup language is a set of markup tags HTML uses markup tags to describe web pages

HTML Tags HTML markup tags are usually called HTML tags HTML tags are keywords surrounded by angle brackets like <html> HTML tags normally come in pairs like <b> and </b> The first tag in a pair is the start tag, the second tag is the end tag Start and end tags are also called opening tags and closing tags

HTML Documents = Web Pages HTML documents describe web pages HTML documents contain HTML tags and plain text
Marthandam College of Engineering and Technology Kuttakuzhi

L.A.ANTO GRACIOUS, Lect/IT

IT63 HTML documents are also called web pages

WEB TECHNOLOGY

The purpose of a web browser (like Internet Explorer or Firefox) is to read HTML documents and display them as web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page: <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html> Example Explained The text between <html> and </html> describes the web page The text between <body> and </body> is the visible page content The text between <h1> and </h1> is displayed as a heading The text between <p> and </p> is displayed as a paragraph

Editing HTML HTML can be written and edited using many different editors like Dreamweaver and Visual Studio. .HTM or .HTML File Extension? When you save an HTML file, you can use either the .htm or the .html file extension. There is no difference; it is entirely up to you. HTML Basic - 4 Examples HTML Headings HTML headings are defined with the <h1> to <h6> tags. Example <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3> HTML Paragraphs HTML paragraphs are defined with the <p> tag. Example <p>This is a paragraph.</p> <p>This is another paragraph.</p>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

HTML Links HTML links are defined with the <a> tag. Example <a href="http://www.w3schools.com">This is a link</a> Note: The link address is specified in the href attribute. HTML Images HTML images are defined with the <img> tag. Example <img src="w3schools.jpg" width="104" height="142" /> Note: The name and the size of the image are provided as attributes. HTML Elements HTML documents are defined by HTML elements. An HTML element is everything from the start tag to the end tag: Start tag * Element content End tag * <p> This is a paragraph </p> <a href="default.htm" > This is a link </a> <br /> * The start tag is often called the opening tag. The end tag is often called the closing tag. HTML Element Syntax An HTML element starts with a start tag / opening tag An HTML element ends with an end tag / closing tag The element content is everything between the start and the end tag Some HTML elements have empty content Empty elements are closed in the start tag Most HTML elements can have attributes Tip: You will learn about attributes in the next chapter of this tutorial. Nested HTML Elements Most HTML elements can be nested (can contain other HTML elements). HTML documents consist of nested HTML elements. HTML Document Example <html> <body>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 <p>This is my first paragraph.</p> </body> </html> The example above contains 3 HTML elements. HTML Example Explained The <p> element:

WEB TECHNOLOGY

<p>This is my first paragraph.</p> The <p> element defines a paragraph in the HTML document. The element has a start tag <p> and an end tag </p>. The element content is: This is my first paragraph. The <body> element: <body> <p>This is my first paragraph.</p> </body> The <body> element defines the body of the HTML document. The element has a start tag <body> and an end tag </body>. The element content is another HTML element (a p element). The <html> element: <html> <body> <p>This is my first paragraph.</p> </body> </html> The <html> element defines the whole HTML document. The element has a start tag <html> and an end tag </html>. The element content is another HTML element (the body element). Don't Forget the End Tag Some HTML elements might display correctly even if you forget the end tag: <p>This is a paragraph <p>This is a paragraph The example above works in most browsers, because the closing tag is considered optional. Never rely on this. Many HTML elements will produce unexpected results and/or errors if you forget the end tag. Empty HTML Elements HTML elements with no content are called empty elements.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

<br> is an empty element without a closing tag (the <br> tag defines a line break). Tip: In XHTML, all elements must be closed. Adding a slash inside the start tag, like <br />, is the proper way of closing empty elements in XHTML (and XML). HTML Tip: Use Lowercase Tags HTML tags are not case sensitive: <P> means the same as <p>. Many web sites use uppercase HTML tags. HTML Headings Headings are important in HTML documents. Headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading. Example <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3> Browsers automatically add some empty space (a margin) before and after each heading. Coding: <html> <body> <h1>This is heading 1</h1> <h2>This is heading 2</h2> <h3>This is heading 3</h3> <h4>This is heading 4</h4> <h5>This is heading 5</h5> <h6>This is heading 6</h6> </body> </html> Output:

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

Headings Are Important Use HTML headings for headings only. Don't use headings to make text BIG or bold. Search engines use your headings to index the structure and content of your web pages. Since users may skim your pages by its headings, it is important to use headings to show the document structure. H1 headings should be used as main headings, followed by H2 headings, then the less important H3 headings, and so on. HTML Lines The <hr /> tag creates a horizontal line in an HTML page. The hr element can be used to separate content: Example <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p> Coding: <html> <body> <p>The hr tag defines a horizontal rule:</p> <hr /> <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 </body> </html> Output:

WEB TECHNOLOGY

HTML Comments Comments can be inserted into the HTML code to make it more readable and understandable. Comments are ignored by the browser and are not displayed. Comments are written like this: Example <!-- This is a comment --> Coding: <html> <body> <!--This comment will not be displayed--> <p>This is a regular paragraph</p> </body> </html> HTML Paragraphs HTML documents are divided into paragraphs. Paragraphs are defined with the <p> tag. Example <p>This is a paragraph</p> <p>This is another paragraph</p>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

Note: Browsers automatically add an empty line before and after a paragraph. Don't Forget the End Tag Most browsers will display HTML correctly even if you forget the end tag: Example <p>This is a paragraph <p>This is another paragraph Coding: <html> <body> <p>This is<br />a para<br />graph with line breaks</p> </body> </html> Output:

HTML Line Breaks Use the <br /> tag if you want a line break (a new line) without starting a new paragraph: Example <p>This is<br />a para<br />graph with line breaks</p> The <br /> element is an empty HTML element. It has no end tag. <br> or <br /> Coding: <html> <body> <p>This is<br />a para<br />graph with line breaks</p> </body>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 </html> Output:

WEB TECHNOLOGY

In XHTML, XML, elements with no end tag (closing tag) are not allowed. Even if <br> works in all browsers, writing <br /> instead works better in XHTML and XML applications. HTML Output - Useful Tips You cannot be sure how HTML will be displayed. Large or small screens and resized windows will create different results. With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code. The browser will remove extra spaces and extra lines when the page is displayed. Any numbers of lines count as one line, and any number of spaces count as one space. HTML Text Formatting Coding: <html> <body> <p><b>This text is bold</b></p> <p><strong>This text is strong</strong></p> <p><big>This text is big</big></p> <p><i>This text is italic</i></p> <p><em>This text is emphasized</em></p> <p><code>This is computer output</code></p> <p>This is<sub> subscript</sub> and <sup>superscript</sup></p> </body> </html> Output:

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

HTML uses tags like <b> and <i> for formatting output, like bold or italic text. These HTML tags are called formatting tags (look at the bottom of this page for a complete reference). Often <strong> renders as <b>, and <em> renders as <i>. However, there is a difference in the meaning of these tags: <b> or <i> defines bold or italic text only. <strong> or <em> means that you want the text to be rendered in a way that the user understands as "important". Today, all major browsers render strong as bold and em as italics. However, if a browser one day wants to make a text highlighted with the strong feature, it might be cursive for example and not bold! HTML Fonts The HTML <font> Tag Should NOT be Used The <font> tag is deprecated in HTML 4, and removed from HTML5. The World Wide Web Consortium (W3C) has removed the <font> tag from its recommendations. In HTML 4, style sheets (CSS) should be used to define the layout and display properties for many HTML elements. The example below shows how the HTML could look by using the <font> tag: Example <p> <font size="5" face="arial" color="red"> This paragraph is in Arial, size 5, and in red text color. </font> </p> <p>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 <font size="3" face="verdana" color="blue"> This paragraph is in Verdana, size 3, and in blue text color. </font> </p> Coding;

WEB TECHNOLOGY

<html> <body> <p> <font size="5" face="arial" color="red"> This paragraph is in Arial, size 5, and in red text color. </font> </p> <p> <font size="3" face="verdana" color="blue"> This paragraph is in Verdana, size 3, and in blue text color. </font> </p> <p>The font element is deprecated in HTML 4. Use CSS instead!</p> </body> </html> Output:

HTML Style Example - Font, Color and Size The font-family, color, and font-size properties defines the font, color, and size of the text in an element: Example <html> <body>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

<h1 style="font-family:verdana;">A heading</h1> <p style="font-family:arial;color:red;font-size:20px;">A paragraph.</p> </body> </html> The font-family, color, and font-size properties make the old <font> tag obsolete. Coding: <html> <body> <h1 style="font-family:verdana;">A heading</h1> <p style="font-family:arial;color:red;font-size:20px;">A paragraph.</p> </body> </html> Output:

HTML Style Example - Text Alignment The text-align property specifies the horizontal alignment of text in an element: Example <html> <body> <h1 style="text-align:center;">Center-aligned heading</h1> <p>This is a paragraph.</p> </body> </html> The text-align property makes the old <center> tag obsolete. Coding: <html> <body> <h1 style="text-align:center;">Center-aligned heading</h1> <p>This is a paragraph.</p>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 </body> </html> Output:

WEB TECHNOLOGY

3. Basic XHTML syntax and semantics XHTML follows the following syntax Documents in XHTML must always be well-formed All XHTML Document can have only one root element that is <html>all other elements should be nested within the root element. There will be only one parent called a root element which can have its children (sub elements) nested within it. Sub elements must be in pairs and correctly nested within their parent element. The basic document structure is: (doctype) <html xmlns="http://www.vyom.co.in/xhtml"> <head> <title>...</title> ... </head> <body>... </body> </html> Notice the (doctype) and the "xmlns" attribute on the opening html tag. You should also include a character set Meta tag in the <head> element. XHTML elements must be properly nested Wrong: <p>This is our site <em>paragraph.</p></em> Right: <p>This is our site <em>paragraph.</em></p> Since XML is case-sensitive. Tag names must be in lowercase.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

Wrong: <PRE>Some preformatted text.</PRE> Right: <pre>Some preformatted text.</pre> All Attributes that are used here must be in lower case Wrong: <a HREF="http://www.vyom.co.in"> Right: <a href="http://www.vyom.co.in"> All elements must be closed This includes elements that traditionally do not contain any content, such as images, form inputs, Meta tags, etc. Wrong: <p>Welcome to vyom. <p>This is our website Right: <p>Welcome to vyom..</p> <p>This is our website.</p> Elements which dont have closing tags must be closed with slash inside the tag. <br> becomes <br /> <hr> becomes <hr /> <input type="text">becomes <input type="text" /> All attributes values must be quoted Wrong: <a href=http://www.vyom.co.in>example link</a> Right: <a href="http://www.vyom.co.in">example link</a> Attribute minimization is forbidden Wrong: <input type="checkbox" checked /> Right: <input type="checkbox" checked="checked" />
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 All image tags should have "alt" attributes. Wrong: <img src="kitten.jpg" /> Right: <img src="kitten.jpg" alt="an evil kitten" /> The "id" attributes and the "name" attribute-

WEB TECHNOLOGY

Element ids which should be unique eventually will replace element names. For now, to ensure backsword-compatibility it is recommended to use both, for example, many of the form fields are accessed by their names. In cascading style sheets and various scripting languages Ids are used. <img src="kitty.jpg" name="kittypic" alt="an evil kitten" /> <img src="kitty.jpg" name="kittypic" alt="an evil kitten" id="kittypic" /> The XHTML DTD defines mandatory elements

4. Briefly explain about the internet. The internet is a global connection of people computers which are linked together by cables and Telephone lines making communication possible among them in a common language. Global connection of interconnected networks. How does internet works? The internet is used to move data between two specific computers. For moving the data between two computers we require - The address of the destination. - A safe mean of moving data in the form of electronic signals There exist a set of rules which governs the sending and receiving of data on the internet. Rules are implemented in two parts in the network software. - Transmission Control Protocol (TCP). - Internet Protocol (IP). It is called TCP/IP Large block of text/ data, the TCP divides into little Data Packets and add some special information like - packet position and Error correction code. To make sure those packets at the destination can reassemble correctly and without any damage to data. The role of IP here is to put destination addressing information on such packets. It is not necessary that all the packets will follow the same path from source to destination. Special machines
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

Routers are used to load balance various paths that exist on networks gateways allows different electronic networks to talk to Internet which TCP/IP Addresses are essential in the internet. The TCP/IP is a mechanism for providing addresses for computers on the internet address has two forms: Person understandable who expressed as words (Domain name) - www.kongu.edu Machine understandable which repressed as numbers - 172.16.2.5. Ex: murali@yahoo.com username@host.subdomain.domain Username - is the name of the Internet account. Host - individual machines at a particular location. Hosts and local networks are grouped together into domains, which are grouped into one or more larger domains. Ex: apartment-> complex -> town -> country.

Sub-domains may corresponds to organizations such as NASA or COMPUSERVE such as India comes a large domain in SUB-DOMAINS com - commercial net - network mil - military org - organization edu - education gov - government int - international Internet Addressing Internet Address consists TWO parts 1. Network Address (Net ID) 2. Host Address (Host ID) The IP address is grouped into 8-bits separated by dots. There four types of internet address each 32 bit long: No. of bits in net ID No. of bits in Host ID Format Range 8 24 N.H.H.H 1 to 126 16 16 N.N.H.H 127 to 191 24 8 N.N.N.H 192 to 223 Multicasting all bits 224 to 239 For Future 240 to 254 LARGE DOMAINS au - Australia usa - USA in - india sg - singapore cn - canada jp -Japan

CLASS A CLASS B CLASS C CLASS D CLASS E

Here N stands for network address and H stands for Host address. In which only CLASS A, B & C are mostly used. These may be used for:
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 Unicast - Single computer Multicast - Set of computers all reside in different location Any-cast - Set of computers all reside in single location.

WEB TECHNOLOGY

What can I do on Internet? Several activities can be performed if you have access to the Internet: To Publish research information To create campus wide information systems Use it for Teaching Use it with ISDN for multimedia conferencing Refer to the pictures of an art gallery Have an electronic copy of classics such as Alice in wonderland Have an electronic copy of journals and magazine from the Internet To meet people around the world To refer the job listings and requirements To get free public domain programs, Movies, songs etc. To send mail at any time

Tools and Services on Internet E-mail - mailbox Mailing List Usenet or Newsgroups File Transfer Protocol (FTP) Telnet (Remote login)

Browsing the internet There are many browsers for the Internet. They are Internet Explorer ( IE ) Netscape Navigator Mosaic etc. Internet Standards There are many standard organizations in the world. The two organizations are: Internet Engineering Task Force(IETF) and World Wide Web Consortium( W3c)

IETF is a relatively informal and it standards include TCP/IP, MIME, SMTP. The W3C, by contrast, is a vendor organization, controlled by its dues-paying member corporations and it standards include HTTP, HTML and XML Internet Principles

TCP/IP UDP
Marthandam College of Engineering and Technology Kuttakuzhi

L.A.ANTO GRACIOUS, Lect/IT

IT63

WEB TECHNOLOGY

IP Addresses Domain Names Domain Name System Ports Sockets URL's

5. Briefly explain about XML XML was designed to transport and store data but HTML was designed to display data. What is XML? XML stands for eXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display data XML tags are not predefined. You must define your own tags XML is designed to be self-descriptive XML is a W3C Recommendation

The Difference between XML and HTML XML is not a replacement for HTML. XML and HTML were designed with different goals: XML was designed to transport and store data, with focus on what data is HTML was designed to display data, with focus on how data looks HTML is about displaying information, while XML is about carrying information.

XML Does Not DO Anything Maybe it is a little hard to understand, but XML does not DO anything. XML was created to structure, store, and transport information. The following example is a note to Tove, from Jani, stored as XML: <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> The note above is quite self descriptive. It has sender and receiver information, it also has a heading and a message body. But still, this XML document does not DO anything. It is just information wrapped in tags. Someone must write a piece of software to send, receive or display it.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 With XML You Invent Your Own Tags

WEB TECHNOLOGY

The tags in the example above (like <to> and <from>) are not defined in any XML standard. These tags are "invented" by the author of the XML document. That is because the XML language has no predefined tags. The tags used in HTML are predefined. HTML documents can only use tags defined in the HTML standard (like <p>, <h1>, etc.). XML allows the author to define his/her own tags and his/her own document structure. XML is Not a Replacement for HTML XML is a complement to HTML. It is important to understand that XML is not a replacement for HTML. In most web applications, XML is used to transport data, while HTML is used to format and display the data. XML is a software- and hardware-independent tool for carrying information. XML is a W3C Recommendation XML became a W3C Recommendation on February 10, 1998. XML is Everywhere XML is now as important for the Web as HTML was to the foundation of the Web. XML is the most common tool for data transmissions between all sorts of applications.

Relationship between SGML, XML, HTML and XHTML.

6. Relative URLs. URLs are used to locate anything, anywhere. Since their scope is so large, they often get very long. It is often the case that we can abbreviate URLs in the form of relative URLs. All the URLs we've looked at until now were absolute URLs. They identified a resource independent of their context. The URL http://WebReference.com/html/ identifies HTML with
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

Style whether it's typed into your browser, scribbled on a napkin in a bar for a friend or just remembered in your head. Relative URLs are a way to identify a resource relative to their context. To give a rough analogy, if you're in your house with some friends and someone asks where your next-door neighbor Mark lives, you'll probably say "Oh, he's next door." You probably wouldn't say "On a planet called Earth, in the United Stated of America, in Acmetown, on 32 Foobar St." if this conversation is taking place in the living room of 31 Foobar St. For one thing, it's a waste of breath. Relative URLs are something like that; they're the equivalent of saying "down the road, turn left, walk on for a few blocks, you can't miss it." They only make sense if they are given within a certain context. And this context is called a Base URL. As we mentioned earlier, relative URLs can only be used with generic URLs like the ones described by the http scheme. The reason for this is that all generic URLs, like those defined by the http scheme, have a pathname. The Base URL of a resource is everything up to and including the last slash in its pathname. Here are some examples: Absolute URL Base URL http://WebReference.com/ http://WebReference.com/ http://WebReference.com/html/ http://WebReference.com/html/ http://WebReference.com/html/about.html http://WebReference.com/html/ http://WebReference.com/foo/bar.html?baz http://WebReference.com/foo/ Table 1: Examples of Base URLs Now, say that in the document http://WebReference.com/html/about.html, I want to refer to the document http://WebReference.com/html/links.html. What I would do is use the relative URL links.html. This will be added to the base URL to form the URL that I want to match. In most cases, figuring the absolute URL from a relative URL is just a matter of concatenating the base URL and the relative URL, as in the example above. There are, however, a few special cases: A directory called .. (two periods) in a relative URL indicates the parent directory, essentially stripping off everything up to the previous slash in the the Base URI. Note that this only has meaning inside the pathname, so you cannot use this notation to go up higher than the root directory. A directory called . (one period) refers to the current directory. A relative URL that begins with / (a slash) always replace the entire pathname of the base URL. A relative URL that begins with // (two slashes) always replaces everything from the hostname onwards. These notations are best illustrated by example, in the following table. The table shows relative URLs which are all assumed to have the base URL http://WebReference.com/html/, and the absolute URLs that they translate into: Relative URI about.html tutorial1/
L.A.ANTO GRACIOUS, Lect/IT

Absolute URI http://WebReference.com/html/about.html http://WebReference.com/html/tutorial1/


Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY tutorial1/2.html http://WebReference.com/html/tutorial1/2.html / http://WebReference.com/ //www.internet.com/ http://www.internet.com/ /experts/ http://WebReference.com/experts/ ../ http://WebReference.com/ ../experts/ http://WebReference.com/experts/ ../../../ http://WebReference.com/ ./ http://WebReference.com/html/ ./about.html http://WebReference.com/html/about.html Table 2: Resolving relative URLs relative to http://WebReference.com/html/

OTHER URL SCHEMES The mailto scheme The mailto scheme is an example of an opaque URI scheme. Mailto URLs identify someone's e-mail address. Their syntax is simple. You have the scheme name, the colon, and then the e-mail address. If you're someone who has a thing for collecting e-mail addresses, you might refer to yourself in the following ways: mailto:stephanos@webreference.com mailto:stephanos@internet.com mailto:sp249@cam.ac.uk mailto:spip@hol.gr mailto:spip@mercator.nrcps.ariadne-t.gr An important note here is that somewhere along the way someone came up with the brilliant idea of including the subject of an e-mail in the URL, like this: mailto:stephanos@webreference.com?subject=Feedback URIs identifies resources, and don't do anything else. A program might process a mailto URL by sending e-mail to the person, but it might do something else instead; add it to your address book, add it to your kill file so you don't see his e-mail, or anything else. There is also a second very important problem with the above syntax: a user agent that doesn't understand it (and there are many) but does understand normal mailto syntax will try to send mail to the address stephanos@webreference.com?subject=Feedback, which is not a valid email address. So even though you might see the above used some times in HTML, don't use it. And if you want to do the world a favor, mail the person who did and tell them not to do it, citing the reasons above. The ftp scheme The ftp scheme is very similar to the http scheme, and is used to locate files available via FTP (File Transfer Protocol). The syntax is very similar to http syntax: ftp://sunsite.unc.edu/pub/Linux/ls-lR.gz The above URL points to the FTP server on sunsite.unc.edu, to the file ls-lR.gz in the /pub/Linux directory. It is also possible to specify a username and optionally, a password for the connection. The syntax is like this:
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

ftp://user@host/path/file ftp://user:password@host/path/file Note that supplying a password like this is sometimes a bad idea. Some people might tell you this is a huge security risk, but this is not really true: a URL like the one above is typed into your browser will only be a risk if someone peeps over your shoulder and sees the password. The password itself is transmitted unencrypted anyway, and can be intercepted in transit. Before you go paranoid about this, remember that if your read your mail through POP (Post Office Protocol), like most people do, then your mail password is also transmitted in the clear. The lesson in this is that if you're going to be paranoid, at least do it for the right reasons. The file scheme The file scheme is used to point to files on your computer. It is slightly tricky, because (most) absolute file URLs aren't really absolute; they're always relative to your computer. However, you can specify the hostname in a file URL. Remember that a URL just tells you where a resource is located, not how to locate it. So this does make sense. If the hostname is omitted, the current host is assumed. If a URL is encountered by a program with a hostname that's different than the one it's working on, it will most likely decide that it cannot access the file, but this has nothing to do with the URL itself. The syntax is again much like the http syntax, only omitting the port numbers, like this: file:///home/stephanos/public_html/myface.jpg file://localhost/temp/install_log.txt Note that the pathname here represents a path name in the local file system, so the slashes are usually replaced by a more appropriate character before the file is accessed. UNIX uses slashes, Windows uses backslashes, Macintosh and other operating systems use other conventions. The news scheme The news scheme is another opaque URL scheme. It is used to refer to Usenet newsgroups or specific messages within these newsgroups. It has two possible syntaxes. One is the name of a Usenet newsgroup, and the other is the message id of a Usenet post. Note that the message id must be entered without the usual angle brackets (< and >). news:comp.infosystems.www.authoring.html news:ba-ciwah-1998Jun4-013702@mud.stack.nl news:* The third example points to all available newsgroups and can be used to refer to Usenet in general. The telnet scheme The telnet scheme has identical syntax to the ftp scheme, with the exception that there is no pathname. Only a hostname, and optionally a port, username and password may be supplied. telnet://stephanos:secret@somehost.internet.com:35/
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

The above indicates a telnet session for user "stephanos" with password "secret" on port 35 of somehost.internet.com.

7. HTML tags. Description Basic <!DOCTYPE> Defines the document type <html> Defines an HTML document <body> Defines the document's body <h1> to <h6> Defines HTML headings <p> Defines a paragraph <br /> Inserts a single line break <hr /> Defines a horizontal line <!--...--> Defines a comment Formatting <acronym> Defines an acronym <abbr> Defines an abbreviation Defines contact information for the author/owner of a <address> <b> Defines bold text <bdo> Overrides the current text direction <big> Defines big text <blockquote> Defines a long quotation <center> Deprecated. Defines centered text <cite> Defines a citation <code> Defines a piece of computer code <del> Defines text that has been deleted from a document <dfn> Defines a definition term <em> Defines emphasized text <font> Deprecated. Defines font, color, and size for text <i> Defines italic text <ins> Defines text that has been inserted into a document <kbd> Defines keyboard input <pre> Defines preformatted text <q> Defines a short quotation <s> Deprecated. Defines strikethrough text <samp> Defines sample output from a computer program <small> Defines smaller text <strike> Deprecated. Defines strikethrough text <strong> Defines strong text <sub> Defines subscripted text <sup> Defines superscripted text
L.A.ANTO GRACIOUS, Lect/IT

Tag

DTD STF STF STF STF STF STF STF STF STF STF STF STF STF STF STF TF STF STF STF STF STF TF STF STF STF STF STF TF STF STF TF STF STF STF

Marthandam College of Engineering and Technology Kuttakuzhi

IT63 <tt> <u> <var> <xmp> <form> <input /> <textarea> <button> <select> <optgroup> <option> <label> <fieldset> <legend> <frame /> <frameset> <noframes> <iframe> <img /> <map> <area /> <a> <link />

WEB TECHNOLOGY Defines teletype text Deprecated. Defines underlined text Defines a variable Deprecated. Defines preformatted text Forms Defines an HTML form for user input Defines an input control Defines a multiline input control (text area) Defines a clickable button Defines a drop-down list Defines a group of related options in a drop-down list Defines an option in a drop-down list Defines a label for an <input> element Groups related elements in a form Defines a caption for a <fieldset> element Frames Defines a window (a frame) in a frameset Defines a set of frames Defines an alternate content for users that do not Defines an inline frame Images Defines an image Defines an image-map Defines an area inside an image-map Links Defines an anchor Defines the relationship between a document and an external resource Lists Defines an unordered list Defines an ordered list Defines a list item Deprecated. Defines a directory list Defines a definition list Defines an item in a definition list Defines a description of an item in a definition list Deprecated. Defines a menu list Tables Defines a table Defines a table caption Defines a header cell in a table Defines a row in a table STF TF STF

STF STF STF STF STF STF STF STF STF STF F F TF TF STF STF STF STF STF

<ul> <ol> <li> <dir> <dl> <dt> <dd> <menu> <table> <caption> <th> <tr>

STF STF STF TF STF STF STF TF STF STF STF STF

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63 <td> <thead> <tbody> <tfoot> <col /> <colgroup> <style> <div> <span> <head> <title> <meta> <base /> <basefont />

WEB TECHNOLOGY Defines a cell in a table Groups the header content in a table Groups the body content in a table Groups the footer content in a table Defines attribute values for one or more columns in a Defines a group of columns in a table for formatting Styles Defines style information for a document Defines a section in a document Defines a section in a document Meta Info Defines information about the document Defines the document title Defines metadata about an HTML document Specifies the base URL/target for all relative URLs in a document Deprecated. Specifies a default color, size, or font for all the text in a document Programming Defines a client-side script Defines an alternate content for users that do not support client-side scripts Deprecated. Defines an embedded applet Defines an embedded object Defines a parameter for an object STF STF STF STF STF STF STF STF STF STF STF STF STF TF

<script> <noscript> <applet> <object> <param />

STF STF TF STF STF

8. HTML forms and frames. HTML FORMS HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select lists, textarea, fieldset, legend, and label elements. The <form> tag is used to create an HTML form: <form> . input elements . </form> HTML Forms - The Input Element
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

The most important form element is the input element. The input element is used to select user information. An input element can vary in many ways, depending on the type attribute. An input element can be of type text field, checkbox, password, radio button, submit button, and more. The most used input types are described below. Text Fields <input type="text" /> defines a one-line input field that a user can enter text into: <form> First name: <input type="text" name="firstname" /><br /> Last name: <input type="text" name="lastname" /> </form> Note: The form itself is not visible. Also note that the default width of a text field is 20 characters. Password Field <input type="password" /> defines a password field: <form> Password: <input type="password" name="pwd" /> </form> Note: The characters in a password field are masked (shown as asterisks or circles). Radio Buttons <input type="radio" /> defines a radio button. Radio buttons let a user select ONLY ONE of a limited number of choices: <form> <input type="radio" name="sex" value="male" /> Male<br /> <input type="radio" name="sex" value="female" /> Female </form> Checkboxes <input type="checkbox" /> defines a checkbox. Checkboxes let a user select ONE or MORE options of a limited number of choices. <form> <input type="checkbox" name="vehicle" value="Bike" /> I have a bike<br /> <input type="checkbox" name="vehicle" value="Car" /> I have a car </form> Submit Button <input type="submit" /> defines a submit button.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

A submit button is used to send form data to a server. The data is sent to the page specified in the form's action attribute. The file defined in the action attribute usually does something with the received input: <form name="input" action="html_form_action.asp" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="Submit" /> </form> If you type some characters in the text field above, and click the "Submit" button, the browser will send your input to a page called "html_form_action.asp". The page will show you the received input. HTML FRAMES With frames, you can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each frame is independent of the others. The disadvantages of using frames are: Frames are not expected to be supported in future versions of HTML Frames are difficult to use. (Printing the entire page is difficult). The web developer must keep track of more HTML documents

The HTML frameset Element The frameset element holds one or more frame elements. Each frame element can hold a separate document. The frameset element states HOW MANY columns or rows there will be in the frameset, and HOW MUCH percentage/pixels of space will occupy each of them. The HTML frame Element The <frame> tag defines one particular window (frame) within a frameset. In the example below we have a frameset with two columns. The first column is set to 25% of the width of the browser window. The second column is set to 75% of the width of the browser window. The document "frame_a.htm" is put into the first column, and the document "frame_b.htm" is put into the second column: <frameset cols="25%,75%"> <frame src="frame_a.htm" /> <frame src="frame_b.htm" /> </frameset> Note: The frameset column size can also be set in pixels (cols="200,500"), and one of the columns can be set to use the remaining space, with an asterisk (cols="25%,*").
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 UNIT 2 1. What are Literals in JavaScript?

WEB TECHNOLOGY

Literals are the way you represent values in JavaScript. These are fixed values that we literally provide in your application source, and are not variables. Examples of literals include: 42 3.14159 "To be or not to be" Integers Integers can be expressed in decimal (base 10), hexadecimal (base 16), or octal (base 8) format. A decimal integer literal consists of a sequence of digits (optionally suffixed as described below) without a leading 0 (zero). An integer can be expressed in octal or hexadecimal rather than decimal. A leading 0 (zero) on an integer literal means it is in octal; a leading 0x (or 0X) means hexadecimal. Hexadecimal integers can include digits (0-9) and the letters a-f and A-F. Octal integers can include only the digits 0-7. Floating Point Literals A floating point literal can have the following parts: a decimal integer, a decimal point ("."), a fraction (another decimal number), an exponent, and a type suffix. The exponent part is an "e" or "E" followed by an integer, which can be signed (preceded by a "+" or "-"). A floating point literal must have at least one digit, plus either a decimal point or "e" (or "E"). Some examples of floating point literals are: 3.1415 -3.1E12 .1e12 2E-12 Boolean Literals The boolean type has two literal values: true and false. String Literals A string literal is zero or more characters enclosed in double (") or single (') quotes. A string must be delimited by quotes of the same type; that is, either both single quotes or double quotes. The following are examples of string literals: "blah" 'blah' "1234" "one line \n another line" Special Characters We can use the following special characters in JavaScript string literals: \b indicates a backspace.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 \f indicates a a form feed. \n indicates a new line character. \r indicates a carriage return. \t indicates a tab character.

WEB TECHNOLOGY

2. Describe JavaScript Variables and Data Types. JavaScript Data Types: One 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 manipulated in a programming language. JavaScript allows working with three primitive data types: Numbers eg. 123, 120.50 etc. Strings of text e.g. "This text string" etc. Boolean e.g. true or false. JavaScript also defines two trivial data types, null and undefined, each of which defines only a single value. In addition to these primitive data types, JavaScript supports a composite data type known as object. JavaScript Variables: Like many other programming languages, JavaScript has variables. Variables can be thought of as named containers. We can place data into these containers and then refer to the data simply by naming the container. Before we use a variable in a JavaScript program, we must declare it. Variables are declared with the var keyword as follows: <script type="text/javascript"> <!-var money; var name; //--> </script> We can also declare multiple variables with the same var keyword as follows: script type="text/javascript"> <!-var money, name; //--> </script>

3. Explain the CSS Box Model in detail. All HTML elements can be considered as boxes. In CSS, the term "box model" is used when talking about design and layout. The CSS box model is essentially a box that wraps around HTML elements, and it consists of: margins, borders, padding, and the actual content. The box model allows us to place a border around elements and space elements in relation to other elements. The image below illustrates the box model:

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

Explanation of the different parts: Margin - Clears 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 box Padding - Clears an area around the content. The padding is affected by the background color of the box Content - The content of the box, where text 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; o top border is dotted o right border is solid o bottom 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 border-style: dotted;
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

o all four borders are dotted

5. Explain CSS Text Properties? Text Color -The color property is used to set the color of the text. The color can be specified by: Name a color name, like red RGB an RGB value, like rgb (255, 0, 0) Hex a hex value, like #ff0000 -The default color for a page is defined in the body selector. Text Alignment -The text-align property is used to set the horizontal alignment of a text. -Text can be centered, or aligned to the left or right, or justified. -When text-align is set to justify, each line is stretched so that every line has equal width, and the left and right margins are straight (like in magazines and newspapers). Text Decoration -The text-decoration property is used to set or remove decorations from text. -The text-decoration property is mostly used to remove underlines from links for design purposes: Text Transformation -The text-transform property is used to specify uppercase and lowercase letters in a text. It can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word. Text Indentation -The text-indentation property is used to specify the indentation of the first line of a text.

6. Explain in details about CSS. CSS stands for Cascading Style Sheets. Styles define how to display HTML elements. Styles were added to HTML 4.0 to solve a problem. External Style Sheets can save a lot of work. External Style Sheets are stored in CSS files. CSS Syntax A CSS rule has two main parts: a selector, and one or more declarations:

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

The selector is normally the HTML element you want to style. Each declaration consists of a property and a value. The property is the style attribute you want to change. Each property has a value. CSS Example A CSS declaration always ends with a semicolon, and declaration groups are surrounded by curly brackets: p {color:red;text-align:center;} To make the CSS more readable, you can put one declaration on each line, like this: Example p { color:red; text-align:center; } CSS Comments Comments are used to explain your code, and may help you when you edit the source code at a later date. Comments are ignored by browsers. A CSS comment begins with "/*", and ends with "*/", like this: /*This is a comment*/ p { text-align:center; /*This is another comment*/ color:black; font-family:arial; } CSS Id and Class The id and class Selectors In addition to setting a style for a HTML element, CSS allows you to specify your own selectors called "id" and "class". The id Selector The id selector is used to specify a style for a single, unique element. The id selector uses the id attribute of the HTML element, and is defined with a "#". The style rule below will be applied to the element with id="para1":
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 Example #para1 { text-align:center; color:red; } The class Selector

WEB TECHNOLOGY

The class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements. This allows you to set a particular style for many HTML elements with the same class. The class selector uses the HTML class attribute, and is defined with a "." In the example below, all HTML elements with class="center" will be center-aligned: Example .center {text-align:center;} In the example below, all p elements with class="center" will be center-aligned: Example p.center {text-align:center;} CSS How To... When a browser reads a style sheet, it will format the document according to it. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style sheet Inline style External Style Sheet An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the <link> tag. The <link> tag goes inside the head section: <head> <link rel="stylesheet" type="text/css" href="mystyle.css" /> </head> An external style sheet can be written in any text editor. The file should not contain any html tags. Your style sheet should be saved with a .css extension. An example of a style sheet file is shown below:
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

hr {color:sienna;} p {margin-left:20px;} body {background-image:url("images/back40.gif");} Do not leave spaces between the property value and the unit (such as margin-left:20 px). Correct way: margin-left:20px Internal Style Sheet An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section of an HTML page, by using the <style> tag, like this: <head> <style type="text/css"> hr {color:sienna;} p {margin-left:20px;} body {background-image:url("images/back40.gif");} </style> </head> Inline Styles An inline style loses many of the advantages of style sheets by mixing content with presentation. To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example shows how to change the color and the left margin of a paragraph: <p style="color:sienna;margin-left:20px">This is a paragraph.</p> Multiple Style Sheets If some properties have been set for the same selector in different style sheets, the values will be inherited from the more specific style sheet. For example, an external style sheet has these properties for the h3 selector: h3 { color:red; text-align:left; font-size:8pt; } And an internal style sheet has these properties for the h3 selector: h3 { text-align:right; font-size:20pt; } If the page with the internal style sheet also links to the external style sheet the properties for h3 will be:
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

color:red; text-align:right; font-size:20pt; The color is inherited from the external style sheet and the text-alignment and the font-size is replaced by the internal style sheet. Multiple Styles Will Cascade into One Styles can be specified: inside an HTML element inside the head section of an HTML page in an external CSS file Tip: Even multiple external style sheets can be referenced inside a single HTML document. Cascading order Generally speaking we can say that all the styles will "cascade" into a new "virtual" style sheet by the following rules, where number four has the highest priority: Browser default External style sheet Internal style sheet (in the head section) Inline style (inside an HTML element)

7. Explain about JavaScript. JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, Chrome, Opera, and Safari. JavaScript was designed to add interactivity to HTML pages. JavaScript is a scripting language. A scripting language is a lightweight programming language. JavaScript is usually embedded directly into HTML pages. JavaScript is an interpreted language. Everyone can use JavaScript without purchasing a license. Java and JavaScript are two completely different languages in both concept and design. Java (developed by Sun Microsystems) is a powerful and much more complex programming language - in the same category as C and C++. JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages. JavaScript can react to events - A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element. JavaScript can read and write HTML elements - A JavaScript can read and change the content of an HTML element JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server. This saves the server from extra processing. JavaScript can be used to detect the visitor's browser - A JavaScript can be used to detect the visitor's
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

browser, and - depending on the browser - load another page specifically designed for that browser. JavaScript can be used to create cookies - A JavaScript can be used to store and retrieve information on the visitor's computer JavaScript = ECMAScript JavaScript is an implementation of the ECMAScript language standard. ECMA-262 is the official JavaScript standard. JavaScript was invented by Brendan Eich at Netscape (with Navigator 2.0), and has appeared in all browsers since 1996. The official standardization was adopted by the ECMA organization (an industry standardization association) in 1997. The ECMA standard (called ECMAScript-262) was approved as an international ISO (ISO/IEC 16262) standard in 1998. The development is still in progress. JavaScript How To The HTML <script> tag is used to insert a JavaScript into an HTML page. Writing to The HTML Document The example below writes a <p> element with current date information to the HTML document: Example <html> <body> <h1>My First Web Page</h1> <script type="text/javascript"> document.write("<p>" + Date() + "</p>"); </script> </body> </html> Note: Try to avoid using document.write() in real life JavaScript code. The entire HTML page will be overwritten if document.write() is used inside a function, or after the page is loaded. However, document.write() is an easy way to demonstrate JavaScript output in a tutorial. Changing HTML Elements The example below writes the current date into an existing <p> element: Example <html> <body> <h1>My First Web Page</h1> <p id="demo"></p> <script type="text/javascript"> document.getElementById("demo").innerHTML=Date();
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 </script> </body> </html>

WEB TECHNOLOGY

Note: To manipulate HTML elements JavaScript uses the DOM method getElementById(). This method accesses the element with the specified id. Examples Explained To insert a JavaScript into an HTML page, use the <script> tag. Inside the <script> tag use the type attribute to define the scripting language. The <script> and </script> tells where the JavaScript starts and ends: <html> <body> <h1>My First Web Page</h1> <p id="demo">This is a paragraph.</p> <script type="text/javascript"> ... some JavaScript code ... </script> </body> </html> The lines between the <script> and </script> contain the JavaScript and are executed by the browser. In this case the browser will replace the content of the HTML element with id="demo", with the current date: <html> <body> <h1>My First Web Page</h1> <p id="demo">This is a paragraph.</p> <script type="text/javascript"> document.getElementById("demo").innerHTML=Date(); </script> </body> </html> Without the <script> tag(s), the browser will treat "document.getElementById("demo").innerHTML=Date();" as pure text and just write it to the page: Some Browsers do Not Support JavaScript Browsers that do not support JavaScript will display JavaScript as page content. To prevent them from doing this, and as a part of the JavaScript standard, the HTML comment tag should be used to "hide" the JavaScript. Just add an HTML comment tag <!-- before the first JavaScript statement, and a --> (end of comment) after the last JavaScript statement, like this: <html>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

<body> <script type="text/javascript"> <!-document.getElementById("demo").innerHTML=Date(); //--> </script> </body> </html> The two forward slashes at the end of comment line (//) is the JavaScript comment symbol. This prevents JavaScript from executing the --> tag. JavaScript Where To JavaScripts can be put in the <body> and in the <head> sections of an HTML page. JavaScript in <body>. The example below writes the current date into an existing <p> element when the page loads: Example <html> <body> <h1>My First Web Page</h1> <p id="demo"></p> <script type="text/javascript"> document.getElementById("demo").innerHTML=Date(); </script> </body> </html> Note that the JavaScript is placed at the bottom of the page to make sure it is not executed before the <p> element is created. JavaScript Functions and Events JavaScripts in an HTML page will be executed when the page loads. This is not always what we want. Sometimes we want to execute a JavaScript when an event occurs, such as when a user clicks a button. When this is the case we can put the script inside a function. Events are normally used in combination with functions (like calling a function when an event occurs). You will learn more about JavaScript functions and events in later chapters. JavaScript in <head> The example below calls a function when a button is clicked: Example <html> <head> <script type="text/javascript"> function displayDate()
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

{ document.getElementById("demo").innerHTML=Date(); } </script> </head> <body> <h1>My First Web Page</h1> <p id="demo"></p> <button type="button" onclick="displayDate()">Display Date</button> </body> </html> Scripts in <head> and <body> You can place an unlimited number of scripts in your document, and you can have scripts in both the body and the head section at the same time. It is a common practice to put all functions in the head section, or at the bottom of the page. This way they are all in one place and do not interfere with page content. Using an External JavaScript JavaScript can also be placed in external files. External JavaScript files often contain code to be used on several different web pages. External JavaScript files have the file extension .js. Note: External script cannot contain the <script></script> tags! To use an external script, point to the .js file in the "src" attribute of the <script> tag: Example <html> <head> <script type="text/javascript" src="xxx.js"></script> </head> <body> </body> </html>

8. Java script variables and operators. JavaScript Variables Variables are "containers" for storing information. JavaScript variables are used to hold values or expressions. A variable can have a short name, like x, or a more descriptive name, like carname. Rules for JavaScript variable names: Variable names are case sensitive (y and Y are two different variables)
Marthandam College of Engineering and Technology Kuttakuzhi

L.A.ANTO GRACIOUS, Lect/IT

IT63

WEB TECHNOLOGY

Variable names must begin with a letter, the $ character, or the underscore character

Example A variable's value can change during the execution of a script. You can refer to a variable by its name to display or change its value. Declaring (Creating) JavaScript Variables Creating variables in JavaScript is most often referred to as "declaring" variables. You declare JavaScript variables with the var keyword: var x; var carname; After the declaration shown above, the variables are empty (they have no values yet). However, you can also assign values to the variables when you declare them: var x=5; var carname="Volvo"; After the execution of the statements above, the variable x will hold the value 5, and carname will hold the value Volvo. Local JavaScript Variables A variable declared within a JavaScript function becomes LOCAL and can only be accessed within that function. (The variable has local scope). You can have local variables with the same name in different functions, because local variables are only recognized by the function in which they are declared. Local variables are deleted as soon as the function is completed. Global JavaScript Variables Variables declared outside a function become GLOBAL, and all scripts and functions on the web page can access it. Global variables are deleted when you close the page. Assigning Values to Undeclared JavaScript Variables If you assign values to variables that have not yet been declared, the variables will automatically be declared as global variables. These statements: x=5; carname="Volvo"; will declare the variables x and carname as global variables (if they don't already exist). JavaScript Arithmetic As with algebra, you can do arithmetic operations with JavaScript variables:
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

y=x-5; z=y+5; You will learn more about the operators that can be used in the next chapter of this tutorial. JavaScript Operators = is used to assign values. + is used to add values. The assignment operator = is used to assign values to JavaScript variables. The arithmetic operator + is used to add values together. y=5; z=2; x=y+z; The value of x, after the execution of the statements above, is 7. JavaScript Arithmetic Operators Arithmetic operators are used to perform arithmetic between variables and/or values. Given that y=5, the table below explains the arithmetic operators: Operator + * / % ++ -Description Addition Subtraction Multiplication Division Modulus Increment Decrement Example x=y+2 x=7 x=y-2 x=3 x=y*2 x=10 x=y/2 x=2.5 x=y%2 x=1 x=++y x=6 x=y++ x=5 x=--y x=4 x=y-- x=5 Result y=5 y=5 y=5 y=5 y=5 y=6 y=6 y=4 y=4

JavaScript Assignment Operators Assignment operators are used to assign values to JavaScript variables. Given that x=10 and y=5, the table below explains the assignment operators: Operator = += -= *= /= %= Example x=y x+=y x-=y x*=y x/=y x%=y Same As x=5 x=x+y x=x-y x=x*y x=x/y x=x%y Result x=15 x=5 x=50 x=2 x=0

The + Operator Used on Strings The + operator can also be used to add string variables or text values together. To add two or more string variables together, use the + operator.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

txt1="What a very"; txt2="nice day"; txt3=txt1+txt2; After the execution of the statements above, the variable txt3 contains "What a verynice day". To add a space between the two strings, insert a space into one of the strings: txt1="What a very "; txt2="nice day"; txt3=txt1+txt2; or insert a space into the expression: txt1="What a very"; txt2="nice day"; txt3=txt1+" "+txt2; After the execution of the statements above, the variable txt3 contains: "What a very nice day" Adding Strings and Numbers The rule is: If you add a number and a string, the result will be a string! Example x=5+5; document.write(x); x="5"+"5"; document.write(x); x=5+"5"; document.write(x); x="5"+5; document.write(x);

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63 UNIT 3

WEB TECHNOLOGY

1. Design a web page to detect the visitors browser name and version? <html> <body> <script type="text/javascript"> document.write("Browser CodeName: " + navigator.appCodeName); document.write("<br /><br />"); document.write("Browser Name: " + navigator.appName); document.write("<br /><br />"); document.write("Browser Version: " + navigator.appVersion); document.write("<br /><br />"); document.write("Cookies Enabled: " + navigator.cookieEnabled); document.write("<br /><br />"); document.write("Platform: " + navigator.platform); document.write("<br /><br />"); document.write("User-agent header: " + navigator.userAgent); </script> </body> </html>

2. Describe Cookies in detail. Cookies are used to store an ID for a shopping session with each subsequent connection, and can look up the current session ID and then use that ID to extract information about that session from a lookup table on the server machine. So, there would really be two tables: one that associates session IDs with user tables, and the user tables themselves that store userspecific data. For example, on the initial request a servlet could do something like the following: String sessionID = makeUniqueString(); HashMap sessionInfo = new HashMap(); HashMap globalTable = findTableStoringSessions(); globalTable.put(sessionID, sessionInfo); Cookie sessionCookie = new Cookie("JSESSIONID", sessionID); sessionCookie.setPath("/"); response.addCookie(sessionCookie); In later requests the server could use the global Table hash table to associate a session id from the jsessionid cookie with the session Info hash table of user-specific data. Using cookies in this manner is an excellent solution and is the most widely used approach for session handling. it is nice that Servlets have a higher-level API that handles all this plus the following tedious tasks: Extracting the cookie that stores the session identifier from the other cookies (there may be many cookies, after all). Determining when idle sessions have expired, and reclaiming them. Associating the hash tables with each request.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 Generating the unique session identifiers.

WEB TECHNOLOGY

3. Explain Sessions in detail? Sessions in servlets is straightforward and involves four basic steps. 1. Accessing the session object associated with the current request. -Call request.getSession to get an HttpSession object, which is a simple hash table for storing user-specific data. 2. Looking up information associated with a session. -Call getAttribute on the HttpSession object, cast the return value to the appropriate type, and check whether the result is null. 3. Storing information in a session. -Use setAttribute with a key and a value. 4. Discarding session data. -Call removeAttribute to discard a specific value. Calls invalidate to discard an entire session. Call logout to log the client out of the Web server and invalidate all sessions associated with that user. Accessing the Session Object Associated with the Current Request Session objects are of type HttpSession, but they are basically just hash tables that can store arbitrary user objects (each associated with a key). The HttpSession object can be implemented by calling the getSession method of HttpServletRequest, as below. HttpSession session = request.getSession();

4. Explain URL Rewriting? URL Rewriting: -URL rewriting is another way to support anonymous session tracking. ie,If the browser does not support cookies, URL rewriting provides with another session tracking alternative. -With URL rewriting, every local URL the user might click on is dynamically modified, or rewritten, to include extra information. -The extra information can be in the form of extra path information, added parameters, or some custom, server-specific URL change. -Due to the limited space available in rewriting a URL, the extra information is usually limited to a unique session ID. Example:
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

For example, the following URLs have been rewritten to pass the session ID 123: http://server:port/servlet/Rewritten original http://server:port/servlet/Rewritten/123 extra path information http://server:port/servlet/Rewritten?sessionid=123 added parameter http://server:port/servlet/Rewritten;$sessionid$123 custom change Advantages: 1. URL rewriting works for all dynamically created documents servlet. 2. Custom URL rewriting can even work for static documents with the right server support. Disadvantages: 1. Using extra path information works on all servers, and it works as a target for forms that use both the GET and POST methods. It doesn't work well if a servlet has to use the extra path information as true path information. 2. Using an added parameter works on all servers too, but it fails as a target for forms that use the POST method, and it can cause parameter naming collisions. 3. Using a custom, server-specific change works under all conditions for servers that support the change. Unfortunately, it doesn't work at all for servers that don't support the change.

5. Explain about JavaScript global function? parseInt(x, [radix]) Parses any string "x" and returns the first valid number (integer) it encounters. If the first character in the string is not a number, white spaces, or a leading minus sign, parseInt() returns NaN instead. You can test for NaN using the isNaN() function below. parseInt() supports an optional 2nd "radix" parameter to specify the base of the number to be parsed (valid range is 2-36). Entering "10" would parse the number in the familiar decimal system, while "16" would be hexadecimal. Without this parameter present, parseInt() assumes any number that begins with "0x" to be radix 16, "0" to be radix 8, and any other number to be radix 10. Examples: parseInt("3 chances") //returns 3 parseInt("I have 3 computers") //returns NaN parseInt("17", 8) //returns 15 parseFloat(x) Parses any string "x" and returns the first valid floating point number it encounters. Use this function to extract numbers with decimals, for example. If the first character in the string is not a number, white spaces, or a leading minus sign, parseFloat() returns NaN instead. You can test for NaN using the isNaN() function below. Example: parseFloat("-3.98 points") //returns -3.98

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63 6. Explain in detail about DOM.

WEB TECHNOLOGY

The DOM is a W3C (World Wide Web Consortium) standard. The DOM defines a standard for accessing documents like HTML and XML: "The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document." The DOM is separated into 3 different parts / levels: Core DOM - standard model for any structured document XML DOM - standard model for XML documents HTML DOM - standard model for HTML documents. The DOM defines the objects and properties of all document elements, and the methods (interface) to access them.

What is the XML DOM? The XML DOM defines the objects and properties of all XML elements, and the methods (interface) to access them. What is the HTML DOM? The HTML DOM is: A standard object model for HTML. A standard programming interface for HTML. Platformand language-independent. The HTML DOM defines the objects and properties of all HTML elements, and the methods (interface) to access them. In other words: The HTML DOM is a standard for how to get, change, add, or delete HTML elements. DOM Nodes According to the DOM, everything in an HTML document is a node. The DOM says: The entire document is a document node. Every HTML element is an element node. The texts in the HTML elements are text nodes. Every HTML attribute is an attribute node. Comments are comment nodes DOM Example Look at the following HTML document: <html> <head> <title>DOM Tutorial</title> </head> <body> <h1>DOM Lesson one</h1> <p>Hello world!</p> </body> </html> The root node in the HTML above is <html>. All other nodes in the document are contained within <html>.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

The <html> node has two child nodes; <head> and <body>. The <head> node holds a <title> node. The <body> node holds a <h1> and <p> node. Text is Always Stored in Text Nodes A common error in DOM processing is to expect an element node to contain text. However, the text of an element node is stored in a text node. In this example: <title>DOM Tutorial</title>, the element node <title>, holds a text node with the value "DOM Tutorial". However, in the HTML DOM the value of the text node can be accessed by the innerHTML property. The HTML DOM Node Tree The HTML DOM views an HTML document as a tree-structure. The tree structure is called a node-tree. All nodes can be accessed through the tree. Their contents can be modified or deleted, and new elements can be created. The node tree below shows the set of nodes, and the connections between them. The tree starts at the root node and branches out to the text nodes at the lowest level of the tree:

Node Parents, Children, and Siblings The nodes in the node tree have a hierarchical relationship to each other. The terms parent, child, and sibling are used to describe the relationships. Parent nodes have children. Children on the same level are called siblings (brothers or sisters). In a node tree, the top node is called the root. Every node, except the root, has exactly one parent node. A node can have any number of children. A leaf is a node with no children. Siblings are nodes with the same parent. The following image illustrates a part of the node tree and the relationship between the nodes:

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

Look at the following HTML fragment: <html> <head> <title>DOM Tutorial</title> </head> <body> <h1>DOM Lesson one</h1> <p>Hello world!</p> </body> </html> From the HTML above: The <html> node has no parent node; it is the root node. The parent node of the <head> and <body> nodes is the <html> node. The parent node of the "Hello world!" text node is the <p> node and: The <html> node has two child nodes; <head> and <body> The <head> node has one child node; the <title> node The <title> node also has one child node; the text node "DOM Tutorial" The <h1> and <p> nodes are siblings, and both child nodes of <body> First Child - Last Child From the HTML above: The <head> element is the first child of the <html> element, and the <body> element is the last child of the <html> element. The <h1> element is the first child of the <body> element, and the <p> element is the last child of the <body> element

7. Explain in details about Servlet with example. A Servlet is a java based server side web technology. As the name implies, it serves a client request and receives a response from the server. Technically speaking a Servlet is a Java class
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

in Java EE that conforms to the Java Servlet API, a protocol by which a Java class may respond to requests. They are not tied to a specific client-server protocol, but are most often used with the HTTP protocol. Therefore, the word "Servlet" is often used in the meaning of "HTTP Servlet".[2] Thus, a software developer may use a servlet to add dynamic content to a Web server using the Java platform. The generated content is commonly HTML, but may be other data such as XML. Servlets are the Java counterpart to non-Java dynamic Web content technologies such as CGI and ASP.NET. Servlets can maintain state in session variables across many server transactions by using HTTP cookies, or URL rewriting. To deploy and run a Servlet, a Web container must be used. A Web container (also known as a Servlet container) is essentially the component of a Web server that interacts with the servlets. The Web container is responsible for managing the lifecycle of servlets, mapping a URL to a particular servlet and ensuring that the URL requester has the correct access rights. The servlet API, contained in the Java package hierarchy javax.servlet, defines the expected interactions of the Web container and a servlet. A Servlet is an object that receives a request and generates a response based on that request. The basic servlet package defines Java objects to represent servlet requests and responses, as well as objects to reflect the servlet's configuration parameters and execution environment. The package javax.servlet.http defines HTTP-specific subclasses of the generic servlet elements, including session management objects that track multiple requests and responses between the Web server and a client. Servlets may be packaged in a WAR file as a Web application. Servlets can be generated automatically from JavaServer Pages (JSP) by the JavaServer Pages compiler. The difference between Servlets and JSP is that Servlets typically embed HTML inside Java code, while JSPs embed Java code in HTML. While the direct usage of Servlets to generate HTML (as shown in the example below) has become rare, the higher level MVC web framework in Java EE (JSF) still explicitly uses the Servlet technology for the low level request/response handling via the FacesServlet. A somewhat older usage is to use servlets in conjunction with JSPs in a pattern called "Model 2", which is a flavor of the model-view-controller pattern. A servlet is a Java component that can be plugged into a Javaenabled web server to provide custom services. These services can include: New features Runtime changes to content Runtime changes to presentation New standard protocols (such as FTP) New custom protocols Advantages over CGI The advantages of using Servlets are their fast performance and ease of use combined with more power over traditional CGI (Common Gateway Interface). Traditional CGI scripts written in Java have a number of disadvantages when it comes to performance: When an HTTP request is made, a new process is created for each call of the CGI script. This overhead of process creation can be very system-intensive, especially when the script does relatively fast operations. Thus, process creation will take more time than CGI script execution. Java Servlets solve this, as a Servlet is not a separate process. Each request to be
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

handled by a Servlet is handled by a separate Java thread within the Web server process, omitting separate process forking by the HTTP daemon. Simultaneous CGI request causes the CGI script to be copied and loaded into memory as many times as there are requests. However, with Servlets, there are the same amount of threads as requests, but there will only be one copy of the Servlet class created in memory that stays there also between requests. Only a single instance answers all requests concurrently. This reduces memory usage and makes the management of persistent data easy. A Servlet can be run by a Servlet engine in a restrictive environment, called a sandbox. This is similar to an applet that runs in the sandbox of the Web browser. This makes a restrictive use of potentially harmful Servlets possible. Life cycle of a Servlet During initialization stage of the Servlet life cycle, the web container initializes the Servlet instance by calling the init() method. The container passes an object implementing the ServletConfig interface via the init() method. This configuration object allows the Servlet to access name-value initialization parameters from the web application. After initialization, the Servlet can service client requests. Each request is serviced in its own separate thread. The Web container calls the service() method of the Servlet for every request. The service() method determines the kind of request being made and dispatches it to an appropriate method to handle the request. The developer of the Servlet must provide an implementation for these methods. If a request for a method that is not implemented by the Servlet is made, the method of the parent class is called, typically resulting in an error being returned to the requester. Finally, the Web container calls the destroy() method that takes the Servlet out of service. The destroy() method, like init(), is called only once in the lifecycle of a Servlet. Three methods are central to the life cycle of a Servlet. These are init( ), service( ), and destroy( ). They are implemented by every Servlet and are invoked at specific times by the server. Let us consider a typical user scenario to understand when these methods are called. Assume that a user enters a Uniform Resource Locator (URL) to a web browser. The browser then generates an HTTP request for this URL. This request is then sent to the appropriate server. The HTTP request is received by the web server. The server maps this request to a particular Servlet. The Servlet is dynamically retrieved and loaded into the address space of the server. The server invokes the init() method of the Servlet. This method is invoked only when the Servlet is first loaded into memory. It is possible to pass initialization parameters to the Servlet so it may configure itself. The server invokes the service() method of the Servlet. This method is called to process the HTTP request.
Marthandam College of Engineering and Technology Kuttakuzhi

L.A.ANTO GRACIOUS, Lect/IT

IT63

WEB TECHNOLOGY

You will see that it is possible for the Servlet to read data that has been provided in the HTTP request. It may also formulate an HTTP response for the client. The Servlet remains in the servers address space and is available to process any other HTTP requests received from clients. The service() method is called for each HTTP request. The server may, at some point, decide to unload the Servlet from its memory. The algorithms by which this determination is made are specific to each server. The server calls the destroy() method to relinquish any resources such as file handles that are allocated for the Servlet; important data may be saved to a persistent store. The memory allocated for the Servlet and its objects can then be garbage collected.

Example The following example servlet prints how many times its service() method was called. Note that HttpServlet is a subclass of GenericServlet, an implementation of the Servlet interface. The service() method of HttpServlet class dispatches requests to the methods doGet(), doPost(), doPut(), doDelete(), and so on; according to the HTTP request. In the example below method service() is overridden and does not distinguish which HTTP request method it serves. import java.io.IOException; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ServletLifeCycleExample extends HttpServlet { private int count; @Override public void init(ServletConfig config) throws ServletException { super.init(config); getServletContext().log("init() called"); count=0; } @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { getServletContext().log("service() called"); count++; response.getWriter().write("Incrementing the count: Count = "+count); } @Override public void destroy() {
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 getServletContext().log("destroy() called"); } } Usage

WEB TECHNOLOGY

Servlets are most often used to process or store data that was submitted from an HTML form. Provide dynamic content such as the results of a database query. Manage state information that does not exist in the stateless HTTP protocol, such as filling the articles into the shopping cart of the appropriate customer.

8. Getting and Setting Initialization Parameters for a Servlet The Servlet container supports the ability to store startup and configuration information for a Servlet. After the container instantiates the Servlet, it makes this information available to the Servlet instance. This example demonstrates a Servlet that retrieves some initialization parameters in its init() method: // See also The Quintessential Servlet // This method is called by the Servlet container just before this Servlet is put into service. public void init() throws ServletException { getServletContext().log("getinit init"); // Get the value of an initialization parameter String value = getServletConfig().getInitParameter("param1"); // Get all available intialization parameters java.util.Enumeration enum = getServletConfig().getInitParameterNames(); for (; enum.hasMoreElements(); ) { // Get the name of the init parameter String name = (String)enum.nextElement(); // Get the value of the init parameter value = getServletConfig().getInitParameter(name); } // The int parameters can also be retrieved using the servlet context value = getServletContext().getInitParameter("param1"); } The initialization parameters for the Servlet are specified in the deployment descriptor (i.e., web.xml file). Here is an example of a deployment descriptor that specifies two initialization parameters:

<web-app> <servlet> <servlet-name>MyServletName</servlet-name>


L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 <servlet-class>com.mycompany.MyServlet</servlet-class>

WEB TECHNOLOGY

<init-param> <param-name> param1 </param-name> <param-value> value1 </param-value> </init-param> <init-param> <param-name> param2 </param-name> <param-value> value2 </param-value> </init-param> ... </servlet> ... </web-app> Note that the leading and trailing space around the parameter value is trimmed.

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

UNIT 4 1. Explain in detail about Microsoft IIS? Internet Information Services (IIS) is a web server application and set of feature extension modules created by Microsoft for use with Microsoft Windows. It is the world's second most popular web server in terms of overall websites behind the industry leader Apache HTTP Server. The protocols supported in IIS include FTP, FTPS,SMTP,NNTP,and HTTP/HTTPS. The different Versions of IIS are o IIS 1.0, Windows NT 3.51 available as a free add-on o IIS 2.0, Windows NT 4.0 o IIS 3.0, Windows NT 4.0 Service Pack 3 o IIS 4.0, Windows NT 4.0 Option Pack o IIS 5.0, Windows 2000 o IIS 5.1, Windows XP Professional, Windows XP Media Center Edition o IIS 6.0, Windows Server 2003 and Windows XP Professional x64 Edition o IIS 7.0, Windows Server 2008 and Windows Vista IIS is not turned on by default when Windows is installed, but it can be selected from the list of optional features The first Microsoft web server was a research project at European Microsoft Windows NT Academic Centre (EMWAC), part of the University of Edinburgh in Scotland, and was distributed as freeware. However since the EMWAC server was unable to scale sufficiently to handle the volume of traffic going to microsoft.com, Microsoft was forced to develop its own web server, IIS By default IIS 5.1 and lower run websites in-process under the SYSTEM account a default Windows account with 'superuser' rights. IIS 6.0 contain a new kernel HTTP stack (http.sys) with a stricter HTTP request parser and response cache for both static and dynamic content There are various built-in security features from Microsoft

2. Explain XML Namespaces in detail? XML Namespaces provide a method to avoid element name conflicts.In XML, element names are defined by the developer. This often results in a conflict when trying to mix XML documents from different XML applications.This XML carries HTML table information: <table> <tr> <td>Apples</td> <td>Bananas</td> </tr> </table> This XML carries information about a table (a piece of furniture): <table> <name>African Coffee Table</name> <width>80</width> <length>120</length> </table>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

If these XML fragments were added together, there would be a name conflict. Both contain a <table> element, but the elements have different content and meaning. An XML parser will not know how to handle these differences. Solving the Name Conflict Using a Prefix Name conflicts in XML can easily be avoided using a name prefix. This XML carries information about an HTML table, and a piece of furniture: <h:table> <h:tr> <h:td>Apples</h:td> <h:td>Bananas</h:td> </h:tr> </h:table> <f:table> <f:name>African Coffee Table</f:name> <f:width>80</f:width> <f:length>120</f:length> </f:table> In the example above, there will be no conflict because the two <table> elements have different names.

3. Explain the XML HTTPRequest object? The XMLHttpRequest object is used to exchange data with a server behind the scenes. The XMLHttpRequest object is a developer's dream, because we can: Update a web page without reloading the page Request data from a server after the page has loaded Receive data from a server after the page has loaded Send data to a server in the background Create an XMLHttpRequest Object All modern browsers (IE7+, Firefox, Chrome, Safari, and Opera) have a built-in XMLHttpRequest object. Syntax for creating an XMLHttpRequest object: xmlhttp=new XMLHttpRequest(); Old versions of Internet Explorer (IE5 and IE6) uses an ActiveX Object: xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

4. Explain Selecting XML Data: XPath? XPath is used to navigate through elements and attributes in an XML document. XPath is a major element in W3C's XSLT standard - and XQuery and XPointer are both built on XPath expressions. XPath Path Expressions
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

XPath uses path expressions to select nodes or node-sets in an XML document. These paths expressions look very much like the expressions you see when you work with a traditional computer file system. XPath Standard Functions XPath includes over 100 built-in functions. There are functions for string values, numeric values, date and time comparison, node and QName manipulation, sequence manipulation, Boolean values, and more. XPATH is a W3C Recommendation XPath became a W3C Recommendation 16. November 1999. XPath was designed to be used by XSLT, XPointer and other XML parsing software. XPATH SYNTAX XPath uses path expressions to select nodes or node-sets in an XML document. The node is selected by following a path or steps. Predicates Predicates are used to find a specific node or a node that contains a specific value. Predicates are always embedded in square brackets.

5. JavaServer Pages JavaServer Pages (JSP) is a technology that helps software developers serve dynamically generated web pages based on HTML, XML, or other document types. Released in 1999 by Sun Microsystems, JSP is similar to ASP and PHP, but it uses the Java programming language. To deploy and run, a compatible web server with a Servlet container (such as Apache Tomcat) is required. Overview Architecturally, JSP may be viewed as a high-level abstraction of Java Servlets. JSPs are translated into Servlets at runtime; each JSP's Servlet is cached and re-used until the original JSP is modified. JSP allows Java code and certain pre-defined actions to be interleaved with static web markup content, with the resulting page being compiled and executed on the server to deliver an HTML or XML document. The compiled pages (and any dependent Java libraries) use Java byte code rather than a native software format. Like any other Java program, they must be executed within a Java virtual machine (JVM) that integrates with the server's host operating system to provide an abstract platform-neutral environment. Syntax JSP pages use several delimiters for scripting functions. The most basic is <% ... %>, which encloses a JSP scriptlet. A scriptlet is a fragment of Java code that is run when the user
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

requests the page. Other common delimiters include <%= ... %> for expressions, where the value of the expression is placed into the page delivered to the user, and directives, denoted with <%@ ... %>. Java code is not required to be complete (self contained) within its scriptlet element block, but can straddle markup content providing the page as a whole is syntactically correct For example, any Java if/for/while blocks opened in one scriptlet element must be correctly closed in a later element for the page to successfully compile. Markup which falls inside a split block of code is subject to that code, so markup inside an if block will only appear in the output when the if condition evaluates to true; likewise, markup inside a loop construct may appear multiple times in the output depending upon how many times the loop body runs. The following is a valid for loop in a JSP page: <p>Counting to three:</p> <% for (int i=1; i<4; i++) { %> <p>This number is <%= i %>.</p> <% } %> <p>Done counting.</p> The output displayed in the user's web browser is: Counting to three: This number is 1. This number is 2. This number is 3. Done counting. The JSP syntax adds additional tags, called JSP actions, to invoke built-in functionality. Additionally, the technology allows for the creation of custom JSP tag libraries that act as extensions to the standard JSP syntax. Since JSP 2.1, the JSP specification also includes support for the Unified Expression Language, used to access data in Java objects. Comparison with similar technologies JSPs are similar to PHP pages and ASP.NET Web Forms, in that all three add server-side code to an HTML page. While JSPs use the Java language, PHP is itself a programming language, and ASP.NET pages can use any .NET-compatible language (usually C#). JSP 2.0 The new version of the JSP specification includes new features meant to improve programmer productivity. Namely: An Expression Language (EL) which allows developers to create Velocity-style templates (among other things). A faster/easier way to display parameter values. A clear way to navigate nested beans. The Java EE 5 Platform has focused on easing development by making use of Java language annotations that were introduced by J2SE 5.0. JSP 2.1 supports this goal by defining annotations for dependency injection on JSP tag handlers and context listeners. Another key concern of the Java EE 5 specification has been the alignment of its web tier technologies, namely Java Server Pages (JSP), Java Server Faces (JSF), and the Java Server Pages Standard Tag Library (JSTL). The outcome of this effort has been the Unified
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

Expression Language (EL), which integrates the expression languages defined by JSP 2.0 and JSF 1.1. The main key additions to the Unified EL that came out of the alignment work have been: A pluggable API for resolving variable references into Java objects and for resolving the properties applied to these Java objects, support for deferred expressions, which may be evaluated by a tag handler when needed, unlike their regular expression counterparts, which get evaluated immediately when a page is executed and rendered, and support for l-value expression, which appear on the left hand side of an assignment operation. When used as an l-value, an EL expression represents a reference to a data structure, for example: a JavaBeans property that is assigned some user input. The new Unified EL is defined in its own specification document, which is delivered along with the JSP 2.1 specification. Thanks to the Unified EL, JSTL tags, such as the JSTL iteration tags, can now be used with JSF components in an intuitive way. JSP 2.0 introduced a problem in the tag library section on how the JSP version information was represented. The specification itself is inconsistent, sometimes referring to a jsp-version element, and at other times a version attribute on the root element. JSF specifications have gone with the later interpretation; however some JSP implementations still expect the jspversion element. JSP 2.1 leverages the Servlet 2.5 specification for its web semantics and is compatible with Apache Tomcat 6. Similarly JSP 2.2 leverages the Servlet 3.0 specification and is compatible with Apache Tomcat 7.

6. JavaBeans JavaBeans are reusable software components for Java. Practically, they are classes written in the Java programming language conforming to a particular convention. They are used to encapsulate many objects into a single object (the bean), so that they can be passed around as a single bean object instead of as multiple individual objects. A JavaBean is a Java Object that is serializable, has a nullary constructor, and allows access to properties using getter and setter methods. Advantages A Bean obtains all of the benefits of Java's "write once, run anywhere" paradigm. The properties, events, and methods of a Bean that are exposed to another application can be controlled. Auxiliary software can be provided to help configure a Bean. The configuration settings of a Bean can be saved in a persistent storage and can be restored at a later time. A Bean may register to receive events from other objects and can generate events that are sent to it. Disadvantages A class with a nullary constructor is subject to being instantiated in an invalid state. If such a class is instantiated manually by a developer (rather than automatically by some kind of framework), theres a non-zero chance that the developer will not realize that theyve instantiated the class in an invalid state. The compiler cant detect such a problem, and even if its documented, theres no guarantee that the developer will see the documentation. Having to create a getter for every property and a setter for many, most, or all fields, creates an immense amount of boilerplate code.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

JavaBeans API The JavaBeans functionality is provided by a set of classes and interfaces in the java.beans package. Interface AppletInitializer Description Methods in this interface are used to initialize Beans that are also applets. BeanInfo This interface allows the designer to specify information about the events, methods and properties of a Bean. Customizer This interface allows the designer to provide a graphical user interface through which a bean may be configured. DesignMode Methods in this interface determine if a bean is executing in design mode. ExceptionListener A method in this interface is invoked when an exception has occurred. PropertyChangeListener A method in this interface is invoked when a bound property is changed. PropertyEditor Objects that implement this interface allow the designer to change and display property values. VetoableChangeListener A method in this interface is invoked when a Constrained property is changed. Visibility Methods in this interface allow a bean to execute in environments where GUI is not available. JavaBean conventions In order to function as a JavaBean class, an object class must obey certain conventions about method naming, construction, and behaviour. These conventions make it possible to have tools that can use, reuse, replace, and connect JavaBeans. The required conventions are as follows: The class must have a public default constructor (no-argument). This allows easy instantiation within editing and activation frameworks. The class properties must be accessible using get, set, is (used for boolean properties instead of get) and other methods (so-called accessor methods and mutator methods), following a standard naming convention. This allows easy automated inspection and updating of bean state within frameworks, many of which include custom editors for various types of properties. Setters must receive only one argument. The class should be serializable. It allows applications and frameworks to reliably save, store, and restore the bean's state in a fashion independent of the VM and of the platform.

JavaBean Example PersonBean.java: package beans;


L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

/** * Class <code>PersonBean</code>. */ public class PersonBean implements java.io.Serializable { private String name; private boolean deceased; /** No-arg constructor (takes no arguments). */ public PersonBean() { } /** * Property <code>name</code> (note capitalization) readable/writable. */ public String getName() { return this.name; } /** * Setter for property <code>name</code>. * @param name */ public void setName(final String name) { this.name = name; } /** * Getter for property "deceased" * Different syntax for a boolean field (is vs. get) */ public boolean isDeceased() { return this.deceased; } /** * Setter for property <code>deceased</code>. * @param deceased */ public void setDeceased(final boolean deceased) { this.deceased = deceased; } } TestPersonBean.java: import beans.PersonBean; /**
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

* Class <code>TestPersonBean</code>. */ public class TestPersonBean { /** * Tester method <code>main</code> for class <code>PersonBean</code>. * @param args */ public static void main(String[] args) { PersonBean person = new PersonBean(); person.setName("Bob"); person.setDeceased(false); // Output: "Bob [alive]" System.out.print(person.getName()); System.out.println(person.isDeceased() ? " [deceased]" : " [alive]"); } } testPersonBean.jsp; <% // Use of PersonBean in a JSP. %> <jsp:useBean id="person" class="beans.PersonBean" scope="page"/> <jsp:setProperty name="person" property="*"/> <html> <body> Name: <jsp:getProperty name="person" property="name"/><br/> Deceased? <jsp:getProperty name="person" property="deceased"/><br/> <br/> <form name="beanTest" method="POST" action="testPersonBean.jsp"> Enter a name: <input type="text" name="name" size="50"><br/> Choose an option: <select name="deceased"> <option value="false">Alive</option> <option value="true">Dead</option> </select> <input type="submit" value="Test the Bean"> </form> </body> </html>

7. XSLT XSLT (Extensible Stylesheet Language Transformations) is a declarative, XML-based language used for the transformation of XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized (output) by the processor in standard XML syntax or in another format, such as HTML or plain text. XSLT is most often used to convert data between different XML schemas or to convert XML data into web pages or PDF documents.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 Application

WEB TECHNOLOGY

Applications often use XSLT to convert XML data into HTML or XHTML documents for display as a web page. The transformation may happen dynamically either on a client or on a server, or it may be done as part of the publishing process. It is also used to create output for printing or direct video display, typically by transforming the original XML into XSL Formatting Objects to create formatted output which can then be converted to a variety of formats, including PDF, PostScript and PNG. XSLT can also translate XML messages between different XML schemas, or make changes to documents within the scope of a single schema, for example by removing the parts of a message that are not needed. Template rule processing The XSLT language is declarative: rather than listing an imperative sequence of actions to perform in a stateful environment, template rules only define how to handle a node matching a particular XPath-like pattern, if the processor should happen to encounter one, and the contents of the templates effectively comprise functional expressions that directly represent their evaluated form: the result tree, which is the basis of the processor's output. The processor follows a fixed algorithm: assuming a stylesheet has already been read and prepared, the processor builds a source tree from the input XML document. It then starts by processing the source tree's root node, finding in the stylesheet the best-matching template for that node, and evaluating the template's contents. Instructions in each template generally direct the processor to either create nodes in the result tree, or process more nodes in the source tree in the same way as the root node. Output is derived from the result tree. XSLT and Streaming XSLT 1.0 and XSLT 2.0 were not designed to allow XML Streaming of the input to output. The whole input document had to be read into memory before it could be processed. Future implementations, like XSLT 3.0, may allow XML streaming, to reduce latency between the input and the output. It is especially important when transformations are chained together in XML Pipelines, for example in XProc. XSLT and XPath XSLT relies upon the W3C's XPath language for identifying subsets of the source document tree, as well as for performing calculations. XPath also provides a range of functions, which XSLT itself further augments. This reliance upon XPath adds a great deal of power and flexibility to XSLT. XSLT 1.0 uses XPath 1.0. Similarly, XSLT 2.0 relies on XPath 2.0; both specifications were published on the same date. XSLT and XQuery compared For more details on this topic, see XQuery#XQuery and XSLT compared. XSLT capabilities overlap with XQuery, which was initially conceived as a query language for large collections of XML documents. The XSLT 2.0 and XQuery 1.0 standards were developed by separate working groups within W3C, working together to ensure a common approach where appropriate. They share the same data model, type system, and function library, and both include XPath 2.0 as a sublanguage. The two languages, however, are rooted in different traditions and serve the needs of different communities. XSLT was primarily conceived as a
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

stylesheet language whose primary goal was to render XML for the human reader on screen, on the web (as web template language), or on paper. XQuery was primarily conceived as a database query language in the tradition of SQL. Because the two languages originate in different communities, XSLT is stronger in its handling of narrative documents with more flexible structure, while XQuery is stronger in its data handling, for example when performing relational joins.[citation needed] XSLT media types

This section is outdated. Please update this section to reflect recent events or newly available information. Please see the talk page for more information. (November 2010) As of 2009, there is no MIME/Internet media type registered for XSLT. The XSLT 1.0 Recommendation (1999) says "The MIME media types text/xml and application/xml should be used for XSLT stylesheets. It is possible that a media type will be registered specifically for XSLT stylesheets; if and when it is, that media type may also be used." It goes on to use text/xml in an example of how to embed a stylesheet with the xml-stylesheet processing instruction. RFC 3023 points out potential technical problems with text/* types in general, and proposes application/xslt+xml as an ideal media type for XSLT. The XSLT 2.0 Recommendation (January 2007) includes a formal application to register this media type. However, at the time of writing (January 2009) the process of registration has not yet been completed, and RFC 3023 warns that "... this media type should not be used until such registration has been completed." Pre-1.0 working drafts of XSLT used text/xsl in their embedding examples, and this type was implemented and continues to be promoted by Microsoft in Internet Explorer and MSXML. It is also widely recognized in the xml-stylesheet processing instruction by other browsers. In practice, therefore, users wanting to control transformation in the browser using this processing instruction are obliged to use this unregistered media type. XSLT examples Sample of incoming XML document <?xml version="1.0" ?> <persons> <person username="JS1"> <name>John</name> <family-name>Smith</family-name> </person> <person username="MI1"> <name>Morka</name> <family-name>Ismincius</family-name> </person> </persons> Example 1 (transforming XML to XML) This XSLT stylesheet provides templates to transform the XML document: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 <xsl:template match="/persons"> <root> <xsl:apply-templates select="person"/> </root> </xsl:template> <xsl:template match="person"> <name username="{@username}"> <xsl:value-of select="name" /> </name> </xsl:template>

WEB TECHNOLOGY

</xsl:stylesheet> Its evaluation results in a new XML document, having another structure: <?xml version="1.0" encoding="UTF-8"?> <root> <name username="JS1">John</name> <name username="MI1">Morka</name> </root> Example 2 (transforming XML to XHTML) Processing the following example XSLT file <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:output method="xml" indent="yes" encoding="UTF-8"/> <xsl:template match="/persons"> <html> <head> <title>Testing XML Example</title> </head> <body> <h1>Persons</h1> <ul> <xsl:apply-templates select="person"> <xsl:sort select="family-name" /> </xsl:apply-templates> </ul> </body> </html> </xsl:template> <xsl:template match="person"> <li> <xsl:value-of select="family-name"/><xsl:text>, </xsl:text> <xsl:value-of select="name"/> </li>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 </xsl:template> </xsl:stylesheet>

WEB TECHNOLOGY

with the XML input file shown above results in the following XHTML (whitespace has been adjusted here for clarity): <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Testing XML Example</title> </head> <body> <h1>Persons</h1> <ul> <li>Ismincius, Morka</li> <li>Smith, John</li> </ul> </body> </html> This XHTML generates the output below when rendered in a web browser. Rendered XHTML generated from an XML input file and an XSLT transformation. In order for a web browser to be able automatically to apply an XSL transformation to an XML document on display, an XML stylesheet processing instruction can be inserted into XML. So, for example, if the stylesheet in Example 2 above were available as "example2.xsl", the following instruction could be added to the original incoming XML: <?xml-stylesheet href="example2.xsl" type="text/xsl" ?>

8. Simple API for XML SAX (Simple API for XML) is an event-based sequential access parser API developed by the XML-DEV mailing list for XML documents.[1] SAX provides a mechanism for reading data from an XML document that is an alternative to that provided by the Document Object Model (DOM). Where the DOM operates on the document as a whole, SAX parsers operate on each piece of the XML document sequentially. Definition Unlike DOM, there is no formal specification for SAX. The Java implementation of SAX is considered to be normative. It is used for state-independent processing of XML documents, in contrast to SAX that processes the documents state-dependently. Benefits SAX parsers have some benefits over DOM-style parsers. A SAX parser only needs to report each parsing event as it happens, and normally discards almost all of that information once reported (it does, however, keep some things, for example a list of all elements that have not been closed yet, in order to catch later errors such as end-tags in the wrong order). Thus, the minimum memory required for a SAX parser is proportional to the maximum depth of the XML file (i.e., of the XML tree) and the maximum data involved in a single XML event (such as the name and attributes of a single start-tag, or the content of a processing instruction, etc).
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

This much memory is usually considered negligible. A DOM parser, in contrast, typically builds a tree representation of the entire document in memory to begin with, thus using memory that increases with the entire document length. This takes considerable time and space for large documents (memory allocation and data-structure construction take time). The compensating advantage, of course, is that once loaded any part of the document can be accessed in any order. Because of the event-driven nature of SAX, processing documents is generally far faster than DOM-style parsers, so long as the processing can be done in a start-to-end pass. Many tasks, such as indexing, conversion to other formats, very simple formatting, and the like, can be done that way. Other tasks, such as sorting, rearranging sections, getting from a link to its target, looking up information on one element to help process a later one, and the like, require accessing the document structure in complex orders and will be much faster with DOM than with multiple SAX passes. Some implementations do not neatly fit either category: a DOM approach can keep its persistent data on disk, cleverly organized for speed; while a SAX approach can cleverly cache information for later use. Such implementations blur the DOM/SAX tradeoffs, but are often very effective in practice. Due to the nature of DOM, streamed reading from disk requires techniques such as lazy evaluation, caches, virtual memory, persistent data structures, or other techniques (one such technique is disclosed in [US Patent 5,557,722]). Processing XML documents larger than main memory is sometimes thought impossible because some DOM parsers do not allow it. However, it is no less possible than sorting a dataset larger than main memory. Disk space as memory to sidestep this limitation. Drawbacks The event-driven model of SAX is useful for XML parsing, but it does have certain drawbacks. Virtually any kind of XML validation requires access to the document in full. The most trivial example is that an attribute declared in the DTD to be of type IDREF, requires that there be an element in the document that uses the same value for an ID attribute. To validate this in a SAX parser, one must keep track of all ID attributes (any one of them might end up being referenced by an IDREF attribute at the very end); as well as every IDREF attribute until it is resolved. Similarly, to validate that each element has an acceptable sequence of child elements, information about what child elements have been seen for each parent, must be kept until the parent closes. Additionally, some kinds of XML processing simply require having access to the entire document. XSLT and XPath, for example, need to be able to access any node at any time in the parsed XML tree. Editors and browsers likewise need to be able to display, modify, and perhaps re-validate at any time. While a SAX parser may well be used to construct such a tree initially, SAX provides no help for such processing as a whole. XML processing with SAX

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

A parser that implements SAX (i.e., a SAX Parser) functions as a stream parser, with an event-driven API.[1] The user defines a number of callback methods that will be called when events occur during parsing. The SAX events include (among others): XML Text nodes XML Element Starts and Ends XML Processing Instructions XML Comments

Some events correspond to XML objects that are easily returned all at once, such as comments. However, XML elements can contain many other XML objects, and so SAX represents them as does XML itself: by one event at the beginning, and another at the end. Properly speaking, the SAX interface does not deal in elements, but in tags. SAX parsing is unidirectional; previously parsed data cannot be re-read without starting the parsing operation again. There are many SAX-like implementations in existence. In practice, details vary, but the overall model is the same. For example, XML attributes are typically provided as part of the data passed to element events, but can also be provided as separate events. For another, some implementations provide "Init" and "Fin" callbacks for the very start and end of parsing; others don't. Example Given the following XML document: <?xml version="1.0" encoding="UTF-8"?> <DocumentElement param="value"> <FirstElement> Some Text </FirstElement> <?some_pi some_attr="some_value"?> <SecondElement param2="something"> Pre-Text <Inline>Inlined text</Inline> Post-text. </SecondElement> </DocumentElement> This XML document, when passed through a SAX parser, will generate a sequence of events like the following: XML Element start, named DocumentElement, with an attribute param equal to "value" XML Element start, named FirstElement XML Text node, with data equal to "Some Text" (note: text processing, with regard to spaces, can be changed) XML Element end, named FirstElement Processing Instruction event, with the target some_pi and data some_attr="some_value" XML Element start, named SecondElement, with an attribute param2 equal to "something" XML Text node, with data equal to "Pre-Text"
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 XML Element start, named Inline XML Text node, with data equal to "Inlined text" XML Element end, named Inline XML Text node, with data equal to "Post-text." XML Element end, named SecondElement XML Element end, named DocumentElement

WEB TECHNOLOGY

Note that the first line of the sample above is the XML Declaration and not a processing instruction; as such it will not be reported as a processing instruction event. The result above may vary: the SAX specification deliberately states that a given section of text may be reported as multiple sequential text events. Thus in the example above, a SAX parser may generate a different series of events, part of which might include: XML Element start, named FirstElement XML Text node, with data equal to "Some " XML Text node, with data equal to "Text" XML Element end, named FirstElement

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

IT63 UNIT 5 1. Convert an XML file to a DTD file.

WEB TECHNOLOGY

An XML Schema describes the structure of an XML document.The advantages of XML schemas over DTD are -XML Schemas Support Data Types -XML Schemas use XML Syntax -XML Schemas Secure Data Communication -XML Schemas are Extensible A Simple XML Document:note.xml <?xml version="1.0"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> A DTD File The following example is a DTD file called "note.dtd" that defines the elements of the XML document above ("note.xml"): <!ELEMENT note (to, from, heading, body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> The first line defines the note element to have four child elements: "to, from, heading, body". Line 2-5 defines the to, from, heading, body elements to be of type "#PCDATA".

2. Illustrate a WSDL example? This is a simplified fraction of a WSDL document: <message name="getTermRequest"> <part name="term" type="xs:string"/> </message> <message name="getTermResponse"> <part name="value" type="xs:string"/> </message> <portType name="glossaryTerms"> <operation name="getTerm"> <input message="getTermRequest"/> <output message="getTermResponse"/> </operation> </portType> In this example the <portType> element defines "glossaryTerms" as the name of a port, and "getTerm" as the name of an operation.The "getTerm" operation has an input message called "getTermRequest" and an output message called "getTermResponse"The <message> elements define the parts of each message and the associated data types.Compared to traditional programming, glossaryTerms is a function library, "getTerm" is a function with
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

"getTermRequest" as the input parameter, and getTermResponse as the return parameter.

3. Write a script to display a drop down menu? <form name="form1"> <select name="select1" onChange="displaydesc(document.form1.select1, thetext1, 'textcontainer1')"> <option selected value="http://www.javascriptkit.com">JavaScript Kit </option> <option value="http://freewarejava.com">Freewarejava.com</option> <option value="http://wired.com" target="newwin">Wired News</option> <option value="http://www.news.com">News.com</option> <option value="http://www.codingforums.com" target="newwin">Coding Forums</option> </select> <input type="button" value="Go" onClick="jumptolink(document.form1.select1)"><br> <span id="textcontainer1" align="left" style="font:italic 13px Arial"> </span> </form>

4. Explain XML Schema in detail. The following example is an XML Schema file called "note.xsd" that defines the elements of the XML document above ("note.xml"): <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified"> <xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:string"/> <xs:element name="from" type="xs:string"/> <xs:element name="heading" type="xs:string"/> <xs:element name="body" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> 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


L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

A WSDL document describes a web service using these major elements: Element Defines <types> The data types used by the web service <message> The messages used by the web service <portType> The operations performed by the web service <binding> The communication protocols used by the web service A WSDL document can also contain other elements, like extension elements, and a service element that makes it possible to group together the definitions of several web services in one single WSDL document. WSDL Ports The <portType> element is the most important WSDL element. It describes a web service, the operations that can be performed, and the messages that are involved.The <portType> 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.Each 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. For maximum platform neutrality, WSDL uses XML Schema syntax to define data types. WSDL Bindings The <binding> element defines the message format and protocol details for each port.

6. SOAP SOAP is a simple XML-based protocol to let applications exchange information over HTTP. SOAP is a protocol for accessing a Web Service. SOAP stands for Simple Object Access Protocol. SOAP is a communication protocol. SOAP is for communication between applications. SOAP is a format for sending messages. SOAP communicates via Internet. SOAP is platform independent. SOAP is language independent. SOAP is based on XML. SOAP is simple and extensible. SOAP allows you to get around firewalls. SOAP is a W3C recommendation It is important for application development to allow Internet communication between programs. Today's applications communicate using Remote Procedure Calls (RPC) between objects like DCOM and CORBA, but HTTP was not designed for this. RPC represents a compatibility and security problem; firewalls and proxy servers will normally block this kind of traffic. A
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

better way to communicate between applications is over HTTP, because HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this. SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages. SOAP is a W3C Recommendation. SOAP became a W3C Recommendation 24. June 2003. To read more about the SOAP activities at W3C, please read our W3C Tutorial. SOAP Syntax SOAP Building Blocks A SOAP message is an ordinary XML document containing the following elements: An Envelope element that identifies the XML document as a SOAP message. A Header element that contains header information. A Body element that contains call and response information. A Fault element containing errors and status information. All the elements above are declared in the default namespace for the SOAP envelope: http://www.w3.org/2001/12/soap-envelope and the default namespace for SOAP encoding and data types is: http://www.w3.org/2001/12/soap-encoding Syntax Rules Here are some important syntax rules: A SOAP message MUST be encoded using XML. A SOAP message MUST use the SOAP Envelope namespace A SOAP message MUST use the SOAP Encoding namespace A SOAP message must NOT contain a DTD reference A SOAP message must NOT contain XML Processing Instructions Skeleton SOAP Message <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> ... </soap:Header> <soap:Body> ... <soap:Fault> ... </soap:Fault> </soap:Body>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 </soap:Envelope> SOAP Envelope Element

WEB TECHNOLOGY

The SOAP Envelope element is the root element of a SOAP message. The SOAP Envelope Element The required SOAP Envelope element is the root element of a SOAP message. This element defines the XML document as a SOAP message. Example <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> ... Message information goes here ... </soap:Envelope> The xmlns:soap Namespace Notice the xmlns:soap namespace in the example above. It should always have the value of: "http://www.w3.org/2001/12/soap-envelope". The namespace defines the Envelope as a SOAP Envelope. If a different namespace is used, the application generates an error and discards the message. The encodingStyle Attribute The encodingStyle attribute is used to define the data types used in the document. This attribute may appear on any SOAP element, and applies to the element's contents and all child elements. A SOAP message has no default encoding. Syntax soap:encodingStyle="URI" Example <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> ... Message information goes here ... </soap:Envelope>
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

7. XML Schema XML Schema is an XML-based alternative to DTD. An XML schema describes the structure of an XML document. The XML Schema language is also referred to as XML Schema Definition (XSD). The purpose of an XML Schema is to define the legal building blocks of an XML document, just like a DTD. An XML Schema: defines elements that can appear in a document defines attributes that can appear in a document defines which elements are child elements defines the order of child elements defines the number of child elements defines whether an element is empty or can include text defines data types for elements and attributes defines default and fixed values for elements and attributes XML Schemas are the Successors of DTDs We think that very soon XML Schemas will be used in most Web applications as a replacement for DTDs. Here are some reasons: XML Schemas are extensible to future additions XML Schemas are richer and more powerful than DTDs XML Schemas are written in XML XML Schemas support data types XML Schemas support namespaces XML Schema is a W3C Recommendation XML Schema became a W3C Recommendation 02. May 2001. . XML Schemas are much more powerful than DTDs. XML Schemas Support Data Types. One of the greatest strength of XML Schemas is the support for data types. With support for data types: It is easier to describe allowable document content It is easier to validate the correctness of data It is easier to work with data from a database It is easier to define data facets (restrictions on data) It is easier to define data patterns (data formats) It is easier to convert data between different data types XML Schemas use XML Syntax Another great strength about XML Schemas is that they are written in XML. Some benefits of that XML Schemas are written in XML: You don't have to learn a new language
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 You can use your XML editor to edit your Schema files You can use your XML parser to parse your Schema files You can manipulate your Schema with the XML DOM You can transform your Schema with XSLT XML Schemas Secure Data Communication

WEB TECHNOLOGY

When sending data from a sender to a receiver, it is essential that both parts have the same "expectations" about the content. With XML Schemas, the sender can describe the data in a way that the receiver will understand. A date like: "03-11-2004" will, in some countries, be interpreted as 3.November and in other countries as 11.March. However, an XML element with a data type like this: <date type="date">2004-03-11</date> ensures a mutual understanding of the content, because the XML data type "date" requires the format "YYYY-MM-DD". XML Schemas are Extensible. XML Schemas are extensible, because they are written in XML. With an extensible Schema definition you can: Reuse your Schema in other Schemas Create your own data types derived from the standard types Reference multiple schemas in the same document Well-Formed is not Enough A well-formed XML document is a document that conforms to the XML syntax rules, like: it must begin with the XML declaration it must have one unique root element start-tags must have matching end-tags elements are case sensitive all elements must be closed all elements must be properly nested all attribute values must be quoted entities must be used for special characters Even if documents are well-formed they can still contain errors, and those errors can have serious consequences. Think of the following situation: you order 5 gross of laser printers, instead of 5 laser printers. With XML Schemas, most of these errors can be caught by your validating software. XSD XML documents can have a reference to a DTD or to an XML Schema. A Simple XML Document Look at this simple XML document called "note.xml":
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

<?xml version="1.0"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> A DTD File The following example is a DTD file called "note.dtd" that defines the elements of the XML document above ("note.xml"): <!ELEMENT note (to, from, heading, body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> The first line defines the note element to have four child elements: "to, from, heading, body". Line 2-5 defines the to, from, heading, body elements to be of type "#PCDATA". An XML Schema The following example is an XML Schema file called "note.xsd" that defines the elements of the XML document above ("note.xml"): <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified"> <xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:string"/> <xs:element name="from" type="xs:string"/> <xs:element name="heading" type="xs:string"/> <xs:element name="body" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> 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. You will learn more about simple and complex types in the following chapters.
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63 A Reference to a DTD This XML document has a reference to a DTD: <?xml version="1.0"?> <!DOCTYPE note SYSTEM "http://www.w3schools.com/dtd/note.dtd"> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> A Reference to an XML Schema This XML document has a reference to an XML Schema: <?xml version="1.0"?> <note xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com note.xsd"> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>

WEB TECHNOLOGY

8. UDDI UDDI is a platform-independent framework for describing services, discovering businesses, and integrating business services by using the Internet. UDDI stands for Universal Description, Discovery and Integration. UDDI is a directory for storing information about web services. UDDI is a directory of web service interfaces described by WSDL. UDDI communicates via SOAP. UDDI is built into the Microsoft .NET platform UDDI uses World Wide Web Consortium (W3C) and Internet Engineering Task Force (IETF) Internet standards such as XML, HTTP, and DNS protocols. UDDI uses WSDL to describe interfaces to web services Additionally, cross platform programming features are addressed by adopting SOAP, known as XML Protocol messaging specifications found at the W3C Web site. UDDI Benefits
L.A.ANTO GRACIOUS, Lect/IT Marthandam College of Engineering and Technology Kuttakuzhi

IT63

WEB TECHNOLOGY

Any industry or businesses of all sizes can benefit from UDDI. Before UDDI, there was no Internet standard for businesses to reach their customers and partners with information about their products and services. Nor was there a method of how to integrate into each other's systems and processes. Problems the UDDI specification can help to solve: Making it possible to discover the right business from the millions currently online Defining how to enable commerce once the preferred business is discovered Reaching new customers and increasing access to current customers Expanding offerings and extending market reach Solving customer-driven need to remove barriers to allow for rapid participation in the global Internet economy Describing services and business processes programmatically in a single, open, and secure environment

If the industry published an UDDI standard for flight rate checking and reservation, airlines could register their services into an UDDI directory. Travel agencies could then search the UDDI directory to find the airline's reservation interface. When the interface is found, the travel agency can communicate with the service immediately because it uses a well-defined reservation interface. Who is Supporting UDDI? UDDI is a cross-industry effort driven by all major platform and software providers like Dell, Fujitsu, HP, Hitachi, IBM, Intel, Microsoft, Oracle, SAP, and Sun, as well as a large community of marketplace operators, and e-business leaders. Over 220 companies are members of the UDDI community.

L.A.ANTO GRACIOUS, Lect/IT

Marthandam College of Engineering and Technology Kuttakuzhi

You might also like