iwt assignment (theory)

Upload: danish-faizan

Post on 05-Apr-2018

241 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Iwt Assignment (Theory)

    1/26

    Theory Assignment

    Q1. What do you mean by protocol? Describe the various protocols governing theweb applications?Ans 1. When computers communicate with each other there needs to be a common set ofrules and instructions that each computer follows. A specific set of communication rules iscalled a protocol. Protocol usually refers to a set of rules that define an exact format forcommunication between systems. For example the HTTP protocol defines the format forcommunication between web browsers and web servers the IMAPprotocol defines theformat for communication between IMAP email servers and clients and the SSL protocoldefines a format for encrypted communications over the Internet. A uniform set of rulesthat enable two devices to connect and transmit data to one another. Protocols determinehow data are transmitted between computing devices and over networks. They defineissues such as error control and data compression methods. The protocol determines thefollowing: type of error checking to be used, data compression method (if any), how the

    sending device will indicate that it has finished a message and how the receiving devicewill indicate that it has received the message. Internet protocols include TCP/IP (TransferControl Protocol/Internet Protocol), HTTP (Hypertext Transfer Protocol), FTP (File TransferProtocol), and SMTP (Simple Mail Transfer Protocol).

    The various protocols governing the web are as follows :-

    1. HTTP - The Hypertext Transfer Protocol (HTTP) is a networking protocol for distributed,collaborative, hypermedia information systems.[1] HTTP is the foundation of datacommunication for the World Wide Web. It usually works on port 802. FTP - File Transfer Protocol (FTP) is a standard network protocol used to copy a file

    from one host to another over a TCP-based network, such as the Internet. FTP is built ona client-server architecture and utilizes separate control and data connections between theclient and server.[1] FTP users may authenticate themselves using a clear-text sign-inprotocol but can connect anonymously if the server is configured to allow it. It usuallyworks on port 21.3. SMTP - Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail(e-mail) transmission across Internet Protocol (IP) networks. It works on port 25. It ismainly used to send e-mail messages.4. POP - Post Office Protocol (POP) is an application-layer Internet standard protocolused by local e-mail clients to retrieve e-mail from a remoteserver over a TCP/IPconnection. POP and IMAP (Internet Message Access Protocol) are the two most

    prevalent Internet standard protocols for e-mail retrieval. It works on port 110.5. SSL - SSL is an acronym for Secure Sockets Layer. It creates an encrypted linkbetween a web server and a web browser. The link ensures that all data passed betweenthe web server and browser remains private and secure.6. DHCP - The Dynamic Host Configuration Protocol (DHCP) is an auto configurationprotocol used on IP networks. DHCP allows a computer to be configured automatically,eliminating the need for intervention by a network administrator. This prevents twocomputers from accidentally being configured with the same IP address.7. IRC - Internet Relay Chat (IRC) is a form of real-time Internet text messaging (chat) orsynchronous conferencing.[1] It is mainly designed for group communication in discussionforums, called channels,[2] but also allows one-to-one communication via privatemessage[3] as well as chat and data transfer,[4] including file sharing.[5]

  • 7/31/2019 Iwt Assignment (Theory)

    2/26

    Q2 a. What is the difference between static and dynamic web pages?Ans. A dynamic web site is one which is designed to have regularly changing content. Astatic web site is one where all the pages are worked out in advance, and don't change. Astatic website will generally provide consistent, standard information for an extendedperiod of time. Although the website owner may make updates periodically, it is a manualprocess to edit the text, photos and other content and may require basic website design

    skills and software. A dynamic website is one that changes or izes itself frequently andautomatically, based on certain criteria. A dynamic web site costs more to design anddevelop, but it is then flexible and can change and grow along with your organisation. Astatic web-site is cheaper and easier to design.

    Q2 b. What is web? What are the key elements of web design? Discuss some of theimportant features of web design.Ans The web is a distributed document delivery system. It uses the client server model.HTML is the main presentation language of the web. In other words, the web is ahypertext system that runs on top of the internet and is based on three main standards URL, HTTP, HTML.

    Q3 a. What is HTML? What are the benifits of HTML?Ans- The language used to develop web pages is called Hyper Text Markup Language.HTML is the language interpreted by the browser. HTML is a set of special codes that canbe embedded in text to add formatting and linking information. Web pages are also calledHTML documents. HTML is specified as tags in an HTML document.

    There are many benefits of HTML (Hyper Text Markup Language) over other computerlanguages, and here are just a few of them.Its easy to use even for non-programmers.It has a pretty loose syntax.It is supported on all the browsersIt is widely used on all websites.It will cost you nothing.Easy to learn.

    Q3 b. What is a form? How do you create forms in HTML?Ans - An HTML form is a section of a document containing normal content, markup,special elements called controls (checkboxes, radio buttons, menus, etc.), and labels onthose controls. Users generally "complete" a form by modifying its controls (entering text,selecting menu items, etc.), before submitting the form to an agent for processing (e.g., to

    a Web server, to a mail server, etc.) HTML forms are used to pass data to a server. A formcan contain input elements like text fields, checkboxes, radio-buttons, submit buttons andmore. A form can also contain select lists, textarea, fieldset, legend, and label elements.

    The tag is used to create an HTML form:

    .input elements.

    Q3 c. What are menus? How would you create menus?Ans 3c. Menus are the best way to provide access to data. We give the visitors the option

  • 7/31/2019 Iwt Assignment (Theory)

    3/26

    of selecting one of the options provided by us. We use the select tag along with the optiontag to achieve this. For example -

    French FriesHamburgers

    Here the size attribute is used to control the number of items initially visible in the list. Theselected attribute specifies the option to be selected by default.

    Q4 a. What is a list? Explain the various types of lists used in HTML?Ans - A list provides a mechanism for specifying lists of information. All lists must containone or more elements.

    There are three types of lists :-1. Unordered List - An unordered list starts with the tag. Each list item starts

    with the tag. The list items are marked with bullets (typically small black circles). Ex -Coffee

    MilkHow the HTML code above looks in a browser:

    Coffee

    Milk

    2. Ordered List - An ordered list starts with the tag. Each list item starts withthe tag.

    The list items are marked with numbers. Ex -

    CoffeeMilk

    How the HTML code above looks in a browser:

    1. Coffee2. Milk

    3. Definition List - A definition list is a list of items, with a description of eachitem. The tag defines a definition list. The tag is used inconjunction with (defines the item in the list) and (describes the

    item in the list):Coffee- black hot drinkMilk- white cold drink

    How the HTML code above looks in a browser:Coffee

    - black hot drinkMilk

    - white cold drink

    Q4 b. What is frameset? How would you combine various framesets?Ans The splitting of a browser screen into frames is accomplished with the frameset tag.

  • 7/31/2019 Iwt Assignment (Theory)

    4/26

    The Frameset tags require either of the 'rows' or 'cols' attribute depending on whether thescreen has to be divided into rows or columns. Frameset allows us to divide a browserscreen into two or more unique regions. Each region is called a frame.

    Framesets are combined to have both vertical and horizontal frames together. Weneed to insert a frameset within a frameset. Frameset can be nested to any level. Ex-

    Q4 c. How would you create a table? Describe the process of dividing the table intocolumns?Ans - Tables are defined with the tag.A table is divided into rows (with the tag), and each row is divided into data cells (withthe tag). td stands for "table data," and holds the content of a data cell. A tagcan contain text, links, images, lists, forms, other tables, etc. Table Example

    row 1, cell 1row 1, cell 2Ans 8brow 2, cell 1row 2, cell 2

    How the HTML code above looks in a browser:

    row 1, cell1

    row 1, cell 2

    row 2, cell1

    row 2, cell 2

    Q 5a. What is a Cascading Style Sheet? What are the different ways of creating astylesheet? Explain.

    Ans 5a. Cascading Style sheets (CSS) define how to display and present HTML elements.Cascading Style Sheets (CSS) is a style sheet language used to describe the presentationsemantics (the look and formatting) of a document written in amarkup language. Its mostcommon application is to style web pages written in HTML and XHTML, but the languagecan also be applied to any kind ofXML document. Different ways of creating a style sheetare as follows :-

    1. InlineInline styles are when you just insert the type of style you want inside another tag, usingthe style attribute. This is usually the least useful way to use CSS.

    2. Styles can also be placed in the document using the tag. The tag is usuallyplaced in the head section of the document, where it will apply to the whole document.

  • 7/31/2019 Iwt Assignment (Theory)

    5/26

    Example -

    p { color:#009900;font-family:"comic sans ms",sans-serif; }h1 { color:#660000; font-size:12pt; }

    3. External stylesStyles can also be set in an external style sheet which is linked to the page with a tag. For example the style sheet for a site is included like this:

    The advantage of doing this is that the same style sheet can be used in every page onyour site. Your entire site can be updated by changing just this one file.

    Q6 a. Why do we need XML? What are the features of XML? What are theapplications of XML?Ans The main need of XML is that it separates content from presentation. XML tags andattributes are defined to describe content and structure. This cannot be done with HTML inwhich tags and attributes are predefined and describe presentation. It also enablesmeaningful searches and provides a meaningful format for data exchange andcommunication.

    The main features of XML are:-1. Easy data exchange.2. Customized markup languages.3. Self describing data.4. Structured and integrated data.5. Well formed XML documents.6. Supports a wide variety of applications.7. Compatible with SGML.

    The following are some of the many applications for which XML is useful:

    Web publishing: XML allows you to create interactive pages, allows the customer tocustomize those pages, and makes creating e-commerce applications moreintuitive. With XML, you store the data once and then render that content fordifferent viewers or devices based on style sheet processing using an Extensible

    Style Language (XSL)/XSL Transformation (XSLT) processor. Web searching and automating Web tasks: XML defines the type of information

    contained in a document, making it easier to return useful results when searchingthe Web:

    For example, using HTML to search for books authored by Tom Brown is likely toreturn instances of the term 'brown' outside of the context of author. UsingXMLrestricts the search to the correct context (for example, the informationcontained in the tag) and returns only the information that you want. ByusingXML, Web agents and robots (programs that automate Web searches or othertasks) are more efficient and produce more useful results.

    General applications: XML provides a standard method to access information,making it easier for applications and devices of all kinds to use, store, transmit, anddisplay data.

  • 7/31/2019 Iwt Assignment (Theory)

    6/26

    e-business applications: XML implementations make electronic data interchange(EDI) more accessible for information interchange, business-to-businesstransactions, and business-to-consumer transactions.

    Metadata applications: XML makes it easier to express metadata in a portable,reusable format.

    Pervasive computing: XML provides portable and structured information types for

    display on pervasive (wireless) computing devices such as personal digitalassistants (PDAs), cellular phones, and others. For example, WML (WirelessMarkup Language) and VoiceXML are currently evolving standards for describingvisual and speech-driven wireless device interfaces.

    Q6 b. List the advantages of XML over HTML and SGML.Ans The advantages of XML over HTML and SGML are as follows:-

    1. In SGML, the DTD is required to be valid. XML can be delivered with or without aDTD.

    2. XML was designed to maintain the most useful parts of SGML.

    3. XML allows the creation of new or user defined tags. Hence it is Xtensible.4. It enables the creation of new markup languages.5. XML allows storage of data and is useful where implementing a full RDBMS is

    overkill.

    Q6 c. What is DTD? How would you create a DTD?Ans The Document Type Definition (DTD) defines the structure of XML documents. Itallows the creation of valid xml documents. DTD is like grammar to indicate which tags arelegal in XML documents. It defines rules for the following :-

    1. Allowable tags and attributes.2. Which tags are allowed to be nested in other tags.

    3. Which tags and atrributes are mandatory or optional.4. What values are allowed for attributes.5. Number of occurances for tags.6. Entity definitions.

    DTDs are simple text files that can be created with any basic text editor. A DTD can bedeclared inline inside an XML document, or as an external reference. Seen from a DTDpoint of view, all XML documents are made up by the following building blocks:

    Elements

    Attributes

    Entities

    PCDATA CDATA

    These building blocks can be used to create DTDs. Example -

    ]>ToveJani

  • 7/31/2019 Iwt Assignment (Theory)

    7/26

    ReminderDon't forget me this weekend

    The DTD above is interpreted like this:

    !DOCTYPE note defines that the root element of this document is note

    !ELEMENT note defines that the note element contains four elements:"to,from,heading,body"

    !ELEMENT to defines the to element to be of type "#PCDATA"

    !ELEMENT from defines the from element to be of type "#PCDATA"

    !ELEMENT heading defines the heading element to be of type "#PCDATA"

    !ELEMENT body defines the body element to be of type "#PCDATA"

    Q7 a. What is XSL and why is it used?Ans 7a. XSL is a language for expressing style sheets. An XSL style sheet is, like withCSS, a file that describes how to display an XML document of a given type. The termExtensible Stylesheet Language (XSL) is used to refer to a family of languages used totransform and render XML documents. XSL is a language that can transform XML intoHTML, a language that can filter and sort XML data and a language that can format XMLdata, based on the data value, like displaying negative numbers in red. XSL shares thefunctionality and is compatible with CSS (although it uses a different syntax). It also adds:A transformation language for XML documents: XSLT. XSL consists of two parts:

    a method for transforming XML documents

    a method for formatting XML documents

    In order to display XML documents, it is necessary to have a mechanism to describe howthe document should be displayed. One of these mechanisms is Cascading Style Sheets

    (CSS), but XSL (eXtensible Stylesheet Language) is the preferred style sheet language ofXML, and XSL is far more sophisticated than the CSS used by HTML. XSL can be usedfor many XML transformation and reformatting tasks.The transformation and reformatting tasks that you can do with XSL include the following:

    XML to HTML rendering

    XML vocabulary conversion

    XML to plain text conversion

    Simple XML queries

    XSL can be used to define how an XML file should be displayed by transforming the XML

    file into a format that is recognizable to a browser. One such format is HTML. NormallyXSL does this by transforming each XML element into an HTML element.

    XSL can also add completely new elements into the output file, or remove elements. It canrearrange and sort the elements, test and make decisions about which elements todisplay, and a lot more.

    Q7 b. What is SAX? What are the advantages and disadvantages of SAX?Ans - The Simple API for XML (SAX) is a publicly developed standard for the events-based parsing of XML documents. SAX provides a mechanism for reading data from an

    XML document. It allows us to parse and process xml documents. It is an event drivenmodel for processing XML content. The documents are read sequentially and callbacksare made to handlers.

  • 7/31/2019 Iwt Assignment (Theory)

    8/26

    Advantages of SAX:-1. Do not need to process and store the entire document. (Low memory requirement)2. Fast processing.

    Disadvantages of SAX:-

    1. Limited API Every element is processed through the same event handler. There is aneed to keep track of location in the document and in cases, store temporary data.2. Only traverses the document once.

    Q7 c. What is DOM and how does it relate to XML?Ans - The Document Object Model (DOM) is an interface specification maintained by theW3C DOM Workgroup that defines an application independent mechanism to access,parse, or update XML data. In simple terms it is a hierarchical model that allowsdevelopers to manipulate XML documents easily. DOM is a tree representation of an XMLdocument in memory. DOM provides a robust API to easily modify and extract data froman XML document. The objects described in the DOM allow the programmer to read,

    search, modify, add to and delete from an XML document. Furthermore, the DOM API canbe implemented in any programming language.

    Q8 a. What do you mean by XML parsing? Briefly describe the parsers involved withXML.Ans - XML parsing is the process of converting an XML document into an XML DOMobject which can then be manipulated with javascript. An XML Parser is a parser that isdesigned to read XML and create a way for programs to use XML.There are differenttypes, and each has its advantages. The main types of parsers are SAX, DOM and pull.SAX - SAX stands for Simple API for XML. Its main characteristic is that as it reads eachunit of XML, it creates an event that the calling program can use.DOM - DOM stands for Document Object Model. It differs from SAX in that it builds theentire XML document representation in memory. Thus DOM can be very memoryintensive.Pull - SAX is a push parser, since it pushes events out to the calling application. Pullparsers, on the other hand, sit and wait for the application to come calling. Pull parsers areuseful in streaming applications, which are areas where either the data is too large to fit inmemory, or the data is being assembled just in time for the next stage to use it.

    Q8 b. What is the difference between XML and SGML? Explain the structure of an

    XML document.Ans 8b The differences are:-1. XML is a significant version of SGML and was designed to maintain the most

    useful part of SGML.2. XML was designed to be a subset of SGML and as a result many features and

    options were removed from SGML.3. XML is a simpified version of XML.4. SGML requires that a reference to a DTD must be valid. But XML allows for well

    formed data which can be delivered without a DTD.

    Q 9a. What is HTTPS authentication? Describe the issues related to form based

    authentication and HTTPS client authentication.Ans 9a. Hypertext Transfer Protocol Secure (HTTPS) is a combination of the HypertextTransfer Protocol with the SSL/TLS protocol to provide encrypted communication and

  • 7/31/2019 Iwt Assignment (Theory)

    9/26

    secure identification of a network web server. HTTPS connections are often used forpayment transactions on the World Wide Web and for sensitive transactions in corporateinformation systems. The main idea of HTTPS is to create a secure channel over aninsecure network. This ensures reasonable protection from eavesdroppers and man-in-the-middle attacks, provided that adequate cipher suites are used and that the servercertificate is verified and trusted. As opposed to HTTP URLs that begin with "http://" and

    use port 80 by default, HTTPS URLs begin with "https://" and use port 443 by default.HTTP is unsecured and is subject to man-in-the-middle and eavesdropping attacks, whichcan let attackers gain access to website accounts and sensitive information.HTTPS isdesigned to withstand such attacks and is considered secure against such attacks.Everything in the HTTP message is encrypted, including the headers, and therequest/response load.

    Q 9c. Explain ssl and tls with their working and security measures.

    Ans 9c. TLS and SSL are most widely recognized as the protocols that provide secureHTTP (HTTPS) for Internet transactions between Web browsers and Web servers.TLS/SSL can also be used for other application level protocols, such as File TransferProtocol (FTP), Lightweight Directory Access Protocol (LDAP), and Simple Mail TransferProtocol (SMTP). TLS/SSL enables server authentication, client authentication, dataencryption, and data integrity over networks such as the World Wide Web.

    Working - TLS and its predecessor SSL make significant use of certificate authorities.Once your browser requests a secure page and adds the "s" onto "http," the browsersends out the public key and the certificate, checking three things: 1) that the certificatecomes from a trusted party; 2) that the certificate is currently valid; and 3) that thecertificate has a relationship with the site from which it's coming. The browser then usesthe public key to encrypt a randomly selected symmetric key. Public-key encryption takes

    a lot of computing, so most systems use a combination of public-key and symmetric keyencryption. Once the session is finished, each computer discards the symmetric key usedfor that session. Any additional sessions require that a new symmetric key be created, andthe process is repeated.

    Q 10 b. How do you use JDBC to modify a database? Explain with examples.

    Ans 10 b. JDBC is a piece of software that knows how to talk to the actual databaseserver.

    There are seven standard steps in modifying databases:

    1. Load the JDBC driver.2. Define the connection URL.

    3. Establish the connection.4. Create a statement object.5. Execute a query or update.

  • 7/31/2019 Iwt Assignment (Theory)

    10/26

    6. Process the results.7. Close the connection.

    Step 1: Load the JDBC driver

    To load the driver, you need to load the appropriate class. Most database vendors supply

    free JDBC drivers for their databases. Here is an example:try {Class.forName("connect.microsoft.MicrosoftDriver");

    catch(ClassNotFoundException e) {System.err.println("Error loading driver: " + e);

    }

    Step 2: Define the Connection URL

    Once you have loaded the JDBC driver, you need to specify the location of the database

    server. Generally, the url format is: jdbc:vendordb:userinfo plus server host, port numberand database name. Example -

    String host = "dbhost.yourcompany.com";String dbName = "someName";int port = 1234;String oracleURL = "jdbc:oracle:thin:@" + host +":" + port + ":" + dbName;

    Step 3: Establish the connection

    To make the actual network connection, pass the URL, the database username, and thepassword to the getConnection method of the DriverManager class, as illustrated in thefollowing example.

    String username = "user";

    String password = "password";Connection connection =

    DriverManager.getConnection(oracleURL, username, password);

    Step 4: Create a Statement

    A Statement object is used to send queries and commands to the database and is createdfrom the Connection as follows:

    Statement statement = connection.createStatement();

    Step 5: Execute a Query or update

    Once you have a Statement object, you can use it to send SQL queries by using theexecuteQuery method, which returns an object of type ResultSet. Here is an example:

    String query = "insert into tablename values(col1, col2, col3)";

    ResultSet resultSet = statement.executeUpdate(query);

  • 7/31/2019 Iwt Assignment (Theory)

    11/26

    Step 6: Process the Results

    The simplest way to handle the results is to process them one row at a time, using theResultSets next method to move through the table a row at a time.

    while(resultSet.next()) {System.out.println(results.getString(1) + " " +results.getString(2) + " " +results.getString(3));

    }

    Step 7: Close the Connection

    To close the connection explicitly, you should do:

    connection.close();

    Q11 a. What do you mean by JSP? Explain some salient features of JSP.

    Ans 11 a. JavaServer Pages (JSP) is a Java technology that helps software developersserve dynamically generated web pages based on HTML, XML, or other document types.JSP allows Java code and certain pre-defined actions to be interleaved with static webmarkup content, with the resulting page being compiled and executed on the server todeliver an HTML or XML document. JSPs are compiled into servlets by a JSP compiler.The compiler either generates a servlet in Java code that is then compiled by the Javacompiler, or it may compile the servlet to byte code which is directly executable. (JSP)

    technology provides a simplified, fast way to create dynamic web content. JSP technologyenables rapid development of web-based applications that are server- and platform-independent. Some features of JSP are as follows :-

    1. Simplifies the process of development:It allows programmers to insert the Java code directly into the JSP file, making thedevelopment process easier. Although JSP files are HTML files, they use special tagscontaining the Java source code which provides a dynamic ability.2. Portability:The Java feature of write once, run anywhere is applicable to JSP. JSP is platformindependent, making it portable across any platform and therefore, mulit-platform. It is

    possible for the programmer to take a JSP file and move it to another platform, JSPServlet engine or web server.3. Because of Efficiency :As soon as the request is received, the JSP pages gets loaded into the web serversmemory. The following transactions are then carried out within a minimal time period,handling JSP pages with efficiency.4. Reusability:JSP allow component reuse by using JavaBeans and EJBs.5. Robust:JSP offers a robust platform for web development6. Independency of Layers:

    There is a clear separation between presentation and implementation layers. The HTMLon the web browser of the client is displayed as a presentation layer. The JSP on theserver is displayed in the implementation layer.

  • 7/31/2019 Iwt Assignment (Theory)

    12/26

    Q11 b. Explain the difference between JSP and ASP.

    Ans 11b. The major differences are as follows:-

    1. JSP technology uses the Java language for scripting, while ASP pages useMicrosoft VBScript or JScript. The Java language is a mature, powerful, and

    scalable programming language that provides many benefits over the Basic-basedscripting languages.

    2. SP technology adheres to the Write Once, Run AnywhereTM philosophy of theJavaTM architecture. Instead of being tied to a single platform or vendor,JSPtechnology can run on any Web server and is supported by a wide variety oftools from multiple vendors.

    On the other hand ASP uses ActiveX controls for its components, ASP technology isbasically restricted to Microsoft Windows-based platforms. Offered primarily as a feature ofMicrosoft IIS, ASP technology does not work easily on a broader range of Web servers.

    3. JSP technology enables developers to extend the JSP tags available. JSP

    developers can create custom tag libraries, so page authors can access morefunctionality using XML-like tags and depend less on scripting. Such custom tagsare not available with ASP.

    4. JSP provides better error handling. Java throws exceptions when it tries to processinvalid methods or data. In contrast, for VBScript, the programmer must explicitlycheck for invalid data or an invalid result.

    5. JSP uses Java and Java is a strongly-typed language and its variables must havetheir types declared before they are used. For VBScript, declaring variables isstrongly advised but not necessary. The types are not specified for the declaration.

    Q12 a. What is ASP? Write the procedure to run ASP on windows XP operatingsystemAns 12 a. ASP is a web application framework developed and marketed by Microsoft toallow programmers to build dynamic web sites, web applications and web services. Itstands for active server pages. It runs on the IIS (Internet Information services) server. Itdynamically builds documents in response to client requests. ASP files have a .aspextension. It can contain XHTML tags. When a user requests a web-page containing ASP,the web-server will parse code and send the result to the user, so the ASP code will neverreach the user's browser. This is the exact opposite of JavaScript. You can use ASP codeto do a lot of things: dynamically edit, change or add any content to a web-page, accessand query databases, read or write files, connect to remote computers, create images.Here are some of the things we can do with asp: -Dynamically edit, change, or add any content of a Web page

    Respond to user queries or data submitted from HTML forms

    Access any data or databases and return the results to a browser

    Customize a Web page to make it more useful for individual users

    The advantages of using ASP instead of CGI and Perl, are those of simplicity andspeed

    Provide security - since ASP code cannot be viewed from the browser Clever ASP programming can minimize the network traffic

  • 7/31/2019 Iwt Assignment (Theory)

    13/26

    To run ASP scripts, you must have installed Microsoft's IIS (Internet Information Services),which is a web-server included in Windows XP Professional. Follow these steps to installIIS on Windows XP:

    1. On the Start menu, click Settings and select Control Panel2. Double-click Add or Remove Programs3. Click Add/Remove Windows Components

    4. Click Internet Information Services (IIS)5. Click Details6. Select the check box for World Wide Web Service, and click OK7. In Windows Component selection, click Next to install IIS

    After you have installed IIS follow these steps:

    1. Look for a new folder called Inetpub on your hard drive2. Open the Inetpub folder, and find a folder named wwwroot3. Create a new folder, like "MyWeb", under wwwroot4. Write some ASP code and save the file as "test1.asp" in the new folder5. Make sure your Web server is running (see below)

    6. Open your browser and type "http://localhost/MyWeb/test1.asp", to view your firstweb page

    Q13 a. What is CGI? Is it a script or a program?Ans 13 a. The Common Gateway Interface (CGI) is a standard that defines how webserver software can delegate the generation of web pagesto a stand-alone application, anexecutable file. Such applications are known as CGI scripts; they can be written in anyprogramming language, although scripting languages are often used.CGI is a method which is used to exchange data between the server and a web client

    (your browser). CGI is actually a set of standards where a program or script (a series ofcommands) can send data back to the web server where it can be processed. Typically,you use standard HTML tags to get data from a person, then pass that data to a CGIroutine. The CGI routine then performs some action with the data.Some of the more common uses of CGI include:

    Guestbooks

    Email Forms

    Mailing List Maintenance

    A CGI routine can be anything which understands the CGI standard. A popular CGI

    language is called PERL.In a nutshell:

    1. You (the webmaster) specify a form tag which includes the name of the CGI routine.2. You create HTML tags which retrieves data from your visitors.3. When the visitor presses the "submit" button, the CGI routine which was specified in

    the form tag is executed. At this time, the CGI routine "takes control".4. This CGI routine can get data from variable names. It retrieves the data and does

    whatever action is required.5. When the CGI routine finishes, it returns control back to the web client (the

    browser).

    Yes, CGI is a script because it is normally used with Perl language. Normal convention isthat code written in interpreted languages are called scripts while those written in compiledlanguages are called programs. Since perl is an interpreted language CGI can be said to

  • 7/31/2019 Iwt Assignment (Theory)

    14/26

    be a script.

    Q 13 b. How do you integrate CGI with HTML pages? Explain with the help ofexamples.Ans 13 b. CGI scripts can be easily integrated with HTML pages. The CGI script isexecuted when an anchor tag or an image tag refers to the CGI script

    file rather than a normal file. CGI scripts are usually placed in the cgi-bin directory. A CGIscript can also be specified in the action attribute of a form tag. The CGI script will then becalled when the form is submitted. Example - .

    Q13 c. What is a cookie? Write a procedure for creating cookies?

    Ans - A "cookie" is a small piece of information sent by a web server to store on a webbrowser so it can later be read back from that browser. This is useful for having thebrowser remember some specific information.A cookie can be used for authentication,storing site preferences, shopping cart contents, the identifier for a server-based session,

    or anything else that can be accomplished through storing text data. An example is when abrowser stores your passwords and user ID's. A cookie consists of one or more name-value pairs containing bits of information. The cookie is sent as a field in the header of theHTTP response by a web server to a web browser and then sent back unchanged by thebrowser each time it accesses that server.

    Cookies in JavaScript are accessed using the cookie property of the document object. Toset a cookie, we set the document.cookie property to a string containing the properties ofthe cookie that we want to create:

    document.cookie = "name=value; expires=date; path=path;

    domain=domain; secure";

    Example - document.cookie = "username=John;

    expires=15/02/2003 00:00:00";

    This code sets a cookie called username, with a value of "John", that expires on Feb 15th,2003

    To retrieve all previously set cookies for the current document, you again use the

    document.cookie property:

    var x = document.cookie;

    This returns a string comprising a list of name/value pairs, separated by semi-colons, forall the cookies that are valid for the current document.

    Q 14. a. What is Java Beans? What are the elements of JavaBeans?Ans 14 a. JavaBeans are reusable software components for Java thatcan be manipulated visually in a builder tool.[1]

    Practically, they are classes written in the Javaprogramming language conforming to a particular convention.They are used to encapsulate many objects into a single

  • 7/31/2019 Iwt Assignment (Theory)

    15/26

    object (the bean), so that the bean can be passed aroundrather than the multiple individual objects. A JavaBean is a Java Object that isserializable,has a nullary constructor, and allows access to properties using getter and setter methods.In order to function as a JavaBean class, an object class must obey certain conventionsabout method naming, construction, and behavior. These conventions make it possible tohave 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 easyinstantiation within editing and activation frameworks.

    The class properties must be accessible using get, set, is (used for booleanproperties instead of get) and other methods (so-calledaccessor methods andmutator methods), following a standard naming-convention. This allows easyautomated inspection and updating of bean state within frameworks, many of whichinclude custom editors for various types of properties.

    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 ofthe platform.

    Q14 b. Explain how javascript is integrated with various elements of html?

    Ans 14b. Javascript integrates very tightly with the elements of html. Javascript code canbe added directly to the html page using the script tag or indirectly by adding a separatejavascript file. Javascript supports event handling on the various html elements. It cantrigger javascript code by various events. For example, when you pass a cursor over a linkor when you click a button or interact with any other html element. Javascript provides

    several functions like getElementByTagName, getElementById which allow us to traversethe html document. It also has in-built functions which can manipulate the html inside thethe various elements directly. Javascript can also generate dynamic content which canthen be used with the html elements. All html elements can be accessed and manipulatedby javascript code as per the requirement. Javascript provides several functions that allowus to access the values of various tags, be it a form, a link, a table, etc.

    Q15. Explain the working of EJB with a suitable diagram.

    Ans - Enterprise JavaBeans (EJB) is a managed, server-side component architecture formodular construction of enterprise applications.

    The EJB specification is one of several Java APIs in the Java EE specification. EJB is aserver-side model that encapsulates the business logic of an application. The EJBspecification was originally developed in 1997 by IBM and later adopted by SunMicrosystems (EJB 1.0 and 1.1) in 1999. The EJB specification intends to provide astandard way to implement the back-end 'business' code typically found in enterpriseapplications (as opposed to 'front-end' interface code). In a typical J2EE application,Enterprise JavaBeans (EJBs) contain the application's business logic and live businessdata. Although it is possible to use standard Java objects to contain your business logicand business data, using EJBs addresses many of the issues you would find by usingsimple Java objects, such as scalability, lifecycle management, and state management.EJBs themselves will make use of data sources, such as databases and mainframe

    systems, to perform the required business logic. In a Web-centric application, the EJBs willprovide the business logic that sits behind the Web-oriented components, such as servlets

  • 7/31/2019 Iwt Assignment (Theory)

    16/26

    and JSPs. If a Web-oriented application requires a high level of scalability ormaintainability, use of EJBs can help to deliver this.

    Q 15 b. Describe the 5 benefits of EJB architecture to an application developer.

    Ans 15. The benefits are as follows :-1. The major operations of managing transactions, state, multithreading, connectionpooling etc. will be managed by the EJB container. The security is also provided bytheEJB container.2. The EJB architecture is compatible with other APIs like servlets and JSPs.3. The development of EJB applications is easy as the business logic is separated by

    theapplication developer and at the same time the developer can utilize the services oftheEJB container.The isolation of labor in developing, deploying, administering, providersmade it faster to develop an EJB application.4. Application development made easy as the EJBspecification ensures the usability ofbeans developed by others can also be used in a specific application.5. EJB provide developers architectural independence - EJB insulates developers from theunderlying middleware, since the only environment an EJB developer sees is the Javaenvironment. It also helps the EJB server/container vendor to change and makeimprovements on the underlying middleware layer without affecting a users existingenterprise applications.6. It provides Write Once Run anywhere functionality - Since EJB is based on Javatechnology, both the developer and the user are guaranteed that their components areWrite Once, Run Anywhere. As long as an EJB Server faithfully conforms to the EJBspecification, any EJB application should run within that server.

  • 7/31/2019 Iwt Assignment (Theory)

    17/26

    Q 16 a. Explain session beans and define their lifecycle.Ans 16 a. A session bean represents a single client inside the J2EE server. To access anapplication that is deployed on the server, the client invokes the session bean's methods.The session bean performs work for its client, shielding the client from complexity byexecuting business tasks inside the server.

    As its name suggests, a session bean is similar to an interactive session. A session beanis not shared--it may have just one client, in the same way that an interactive session mayhave just one user. Like an interactive session, a session bean is not persistent. (That is,its data is not saved to a database.) When the client terminates, its session bean appearsto terminate and is no longer associated with the client. A Session Bean implements abusiness task and is hosted by an EJB container. A session bean performs operations,such as calculations or database access, for the client. Although a session bean can betransactional, it is not recoverable should a system crash occur. Session bean objectseither can be stateless or can maintainconversational state across methods andtransactions.

    The following figure illustrates the life cycle of a stateful session bean.

    The client initiates the life cycle by invoking the create method. The EJB containerinstantiates the bean and then invokes the setSessionContext and ejbCreate methods in

    the session bean. The bean is now ready to have its business methods invoked.While inthe ready stage, the EJB container may decide to deactivate, or passivate the bean byusing the ejbPassivate method. If a client invokes a business method on the bean while itis in the passive stage, the EJB container activates the bean, moving it back to the readystage, and then calls the bean's ejbActivate method.

    At the end of the life cycle, the client invokes the remove method and the EJB containercalls the bean's ejbRemove method. The bean's instance is ready for garbage collection.

    The following figure shows the lifecycle of a stateless bean.

  • 7/31/2019 Iwt Assignment (Theory)

    18/26

    Its life cycle has just two stages: nonexistent and ready for the invocation of businessmethods.

    Q 16 b. What is the difference between a stateless and stateful session bean?

    Ans 16 b. There are two types of session beans: stateful and stateless.

    Stateful Session Beans

    The state of an object consists of its instance variables. In a stateful session bean, the

    instance variables represent the state of unique client-bean sessions. The interaction ofthe client with bean is called as conversational state. The state is retained for the duration

    of the client-bean session. If the client removes the bean or terminates, the session endsand the state disappears. It is used when the bean needs to hold information about the

    client across method invocations.

    Stateless Session Beans

    A stateless session bean does not maintain a conversational state for a particular client.When a client invokes the method of a stateless bean, the bean's instance variables maycontain a state, but only for the duration of the invocation. When the method is finished,the state is no longer retained.

    Because stateless session beans can support multiple clients, they can offer better

    scalability for applications that require large numbers of clients. Typically, an application

    requires fewer stateless session beans than stateful session beans to support the samenumber of clients. A stateless bean offers better performance.

    Q 17 a. What are event and event handlers? How are events handled in javascript?

    Ans 17 a. An event is something that happens, e.g. a mouse click on a button, an image

    that has loaded. Events usually occur as a result of human interaction with the browser,

    e.g. selecting a document to load, entering form information. Every element on a web page

    has certain events which can trigger a JavaScript. For example, we can use the onClick

    event of a button element to indicate that a function will run when a user clicks on the

    button. We define the events in the HTML tags.

    Examples of events:

    A mouse click

    A web page or an image loading

    Mousing over a hot spot on the web page

  • 7/31/2019 Iwt Assignment (Theory)

    19/26

    Selecting an input field in an HTML form

    Submitting an HTML form

    A keystroke

    Event handlers are JavaScript methods, i.e. functions of objects, that allow us asJavaScript programmers to control what happens when events occur. JavaScript event

    handlers have 'on' before the event name, e.g. onClick, onSubmit, onLoad, onFocus.Event handlers specify what to do when a particular event occurs. Merely the occurance ofan event has no meaning. With the help of event handlers we can detect events andtrigger javascript code.

    For example, the following form has an onSubmit event handler that displays an alertmessage:

    Events in javascript are handled by using various functions like :-

    Event Description

    onblur An element loses focus

    onerror An error occurs

    onfocus An element gains focus

    onload The document has completely loaded

    onreset A form reset command is issued

    onscroll The document is scrolled

    onselect The selection of element has changedonsubmit A form submit command is issued

    onmousedown A mouse button has been pressed

    onmousemove The mouse has been moved

    onmouseout The mouse pointer has left an element

    onmouseoverThe mouse pointer has entered anelement

    onmouseup A mouse button has been released

    onclick A mouse button has been clicked

    ondblclick A mouse button has been double-clicked(clicked twice rapidly)

    Q 17 b. What do you understand by javascript? What are the features of javascript?Ans 17 b. Javascript is a programming language that is used to make web pagesinteractive. It runs on your visitor's computer and so does not require constant downloadsfrom your web site. It is primarily used for client side scripting. It is a object orientedscripting language that is dynamic, interpreted and weakly-typed. It was developed by

    Netscape. It can be used to make web pages more dynamic. It is the most popularscripting language on the internet and runs entirely inside the browser. It can be used tocreate menus, validate forms, swap images, or just about anything else you can think of to

  • 7/31/2019 Iwt Assignment (Theory)

    20/26

    do on a webpage. The features of javascript are as follows:-

    1. Interpreted Language The syntax is completely interpreted by the browser just as itinterprets html tags.2. Platform independence / Architecture Neutral Javascript is completely independent ofthe hardware on which it works. It is a language understood by any javascript enabled

    browser.3. Easy debugging and testing Since scripts are tested line by line, errors are listed asthey are encountered.4. Performance Javascript can be written such that html files are fairly compact and quitesmall.5. Minimal syntax Easy to learn By learning just a few simple rules of syntax, completeapplications can be built with javascript.6. Event handling It supports event based programming. It provides event handlers fornumerous events.7. Quick development It doesn't require time consuming compilations so scripts can bedeveloped in a short amount of time.

    8. Embedded within HTML Javascript doesn't require any special or separate editor forprograms to be written. HTML files with javscript embedded can be executed by anyjavascript enabled browser.

    Q18 a. What are custom tags in JSP? What are the components that make up a taglibrary in JSP?Ans 18 a. A custom tag is a user-defined JSP language element. When a JSP pagecontaining a custom tag is translated into a servlet, the tag is converted to operations onan object called a tag handler. The Web container then invokes those operations when theJSP page's servlet is executed. They are defined in Tag of packagejavax.servlet.jsp.tagtext

    Custom tags have a rich set of features. They can

    1. Be customized via attributes passed from the calling page.2. Access all the objects available to JSP pages.3. Modify the response generated by the calling page.4. Communicate with each other. You can create and initialize a JavaBeans

    component, create a variable that refers to that bean in one tag, and then use thebean in another tag.

    5. Be nested within one another, allowing for complex interactions within a JSP page.

    JSP technology provides a mechanism for encapsulating other types of dynamicfunctionality in custom tags. Custom tags are usually distributed in the form of a tag library,which defines a set of related custom tags and contains the objects that implement thetags.Some examples of tasks that can be performed by custom tags include operations onimplicit objects, processing forms, accessing databases and other enterprise services suchas e-mail and directories, and performing flow control.

    A tag library is a collection of custom tags.

    Q18 b. What are the different types of implicit objects used in jsp? Explain in brief.Ans 18 b.JSP provides certain implicit objects, based on the Servlet API. These objects

    are access using standard variables, and are automatically available for use in our JSPwithout writing any extra code. Since these objects are created automatically by thecontainer and are accessed using standard variables; hence, they are called implicit

  • 7/31/2019 Iwt Assignment (Theory)

    21/26

    objects.

    The implicit objects available in a JSP page are: request, response page, session, application pageContext

    config out exception

    The request ObjectThe request object has request scope, and is an instance of thejavax.servlet.ServletRequest class.It encapsulates the request coming from the Client and being processed by the JSP. It ispassed to the JSP by thecontainer as a parameter of the _jspService( ) method. It has request scope.

    The response objectThe response object has page scope, and is an instance of javax.servlet.ServletResponseIt encapsulates the response generated by the JSP to be send back to the client inresponse to the request. It isgenerated by the container and passed to the JSP as a parameter to the _jspService( )method, where it ismodified by the JSP. It is legal to set HTTP status code and headers in the JSP page onceoutput has been sendto the client, as JSP output streams are buffered by default.

    The pageContext objectsThe pageContext provides a single point of access to many of the page attribute and isconvenient place to putshared data within the page. It is of type javax.servlet.jsp.pageContext and has pagescope.

    The session objectThe session object represents the session created for the requesting client. Session arecreated automatically,and a new session is available even when there is no incoming session (unless, of course,you have used a

    session=false attribute in the page directive, in which case this variable will not beavailable).The session object is of type javax.servlet.http.HttpSession and has session scope.

    The application objectThe application object represents the servlet context, obtained from the servletconfiguration object. It is of typejavax.servlet.ServletContext and has application scope.

    The out objectThe out object is the object that writes into the output stream to the client. To make the

    response object useful,this is a buffered version of the javax.servlet.jsp.JspWriter.The buffer size can be adjustedby the

  • 7/31/2019 Iwt Assignment (Theory)

    22/26

    buffer attribute of the page directive.

    The config objectThe config is the ServletConfig for the JSP page and has page scope. It is of typejavax.servlet.ServletConfig.

    The page objectThe page object is an instance of the pages implementation servlet class that isprocessing the current request.It is of type java.lang.Object, and has page scope. The page object can be thought of as asynonym tothis within the page.

    Q 19 a. Explain the relationship between applet, servlet and JSP?

    Ans 19 a. There are three primary ways to create client interfaces to Javaprograms that are delivered over the Internet: applets, servlets, and Java

    Server Pages (JSP). Applets run withina client browser, while servlets and JSPs run on the Web server machine. Each methodprovides certain advantages anddisadvantages in relation to the others.Applets are better suited for high functionality Intranet and Extranetapplications, where download times are not a factor. Servlets and JSP pages are moreappropriate for Internet andExtranet applications where the majority of the users may accessing the sightthrough a modem connection.

    Applets - Applets are small programs that are downloaded into a JavaEnabled Web Browser. The

    downloaded applet has very limited access to the client machines file systemand network capabilities. These limitations ensure that the applet cantperform any malicious activity on the client's machine, such as deleting filesor installing viruses. By default, adownloaded applet cannot read or write files from the file system, and may usethe network only to communicate back to the server of origin. They greatly enhance userinterface available through a web browser. On the downside, they take a long time todownload.

    Servlet - A servlet is a Java program that runs in conjunction with a WebServer. A servlet is

    executed in response to an HTTP request from a client browser. The servlet executes andthen returns anHTML page back to the browser. Servlets handle multiple requests. Servlets do not run onthe client, all execution takes place onthe server. While, they provide the advantagesof generating dynamic content, they do not levy the same download timerequirement as applets. Since they deliver HTML pages to their clients, the userinterface available through a servlet is limited by what the HTML specificationsupports.

    JSP - JSPs are text

    documents that describe how a server should handle specific requests. A JSP is run by aJSP Server, whichinterprets the JSP and performs the actions the page describes. Frequently, the JSPserver compiles the JSP

  • 7/31/2019 Iwt Assignment (Theory)

    23/26

    into a servlet to enhance performance.The server would then periodically check the JSP for changes. The JSP specification is anextension of the servletspecification. JSPs have the sameadvantages and disadvantages as servlets when compared to applets. It is easy todevelop and maintain when compared to servlets. Initial access is slower than servlets.

    Q 19 b. What is a scriplet? Show the use of jsp scriplets with the help of suitableexamples.

    Ans 19 b. A scriptlet contains Java code that is executed every time a JSP is invoked.When a JSP is translated to a servlet, the scriptlet code goes into the service() method. Ascriptlet is written between the tags and is executed by the container atrequest processing time. It is a piece of java code embedded in jsp code. A scriptlet cancontain any number of language statements, variable or method declarations, orexpressions. According to Sun, you can do the following things with the help of scriplets:-

    6. Declare variables or methods to use later in the file.

    7. Use any of the JSP implicit objects or any object declared with a tag.

    8. Write any other statement that is valid in the page scripting language (if you use theJava programming language, the statements must conform to the Java LanguageSpecification).

    Scriptlets are executed when the JSP engine processes the client request.

    If the scriptlet produces output, the output is stored in the out object, from which you candisplay it.

    Example -

    Hello! The time is now

    Q 19 c. With the help of an example, explain how jsp connects to a database.

  • 7/31/2019 Iwt Assignment (Theory)

    24/26

    Ans 19 c. Enter to database

  • 7/31/2019 Iwt Assignment (Theory)

    25/26

    finally{if(rs!=null) rs.close();if(s!=null) s.close();if(con!=null) con.close();}%>

    Code explanation - The objects of type Connection, ResultSet and Statement areassociated with the Java sql. "con" is a Connection type object variable that will holdConnection type object. "rs" is a ResultSet type object variable that will hold a result setreturned by a databasequery. "s" is a object variable of Statement .Statement Classmethods allow to execute any query.

    Connection to database: The first task of this programmer is to load database driver. Thisis achieved using the single line of code :Class.forName("net.sourceforge.jtds.jdbc.Driver");

    The next task is to make a connection. This is done using: con =java.sql.DriverManager.getConnection(url, id, pass);

    The driver manager class returns the connection object.

    Executing Query or Accessing data from database: This is done using : s =con.createStatement();rs = s.executeQuery(sql);

    Next use the executeQuery() method to execute an sql statement which returns a singleresultset object. Next we simply read the values from the resultset using while(rs.next()).After printing the result we close the connection at the end.

    21. Write short of the following:-a.) E-mail:- Electronic mail, commonly called email or e-mail, is a method of exchangingdigital messages from an author to one or more recipients. Modern email operates acrossthe Internet or other computer networks. An email message consists of three components,the message envelope, the message header, and the message body. The messageheader contains control information, including, minimally, an originator's email address andone or more recipient addresses. Usually descriptive information is also added, such as asubject header field and a message submission date/time stamp. E-mail is sent using theSMTP protocol and can be recieved by POP or IMAP protocols. These days almost all

    email providers provide the ability to use HTML along with plain text for the body of theemails.

    b.) Web Browsers:- A web browser is a software application for retrieving, presenting,and traversing information resources on the World Wide Web. An information resource isidentified by a Uniform Resource Identifier (URI) and may be a web page, image, video, orother piece of content. Although browsers are primarily intended to access the WorldWide Web, they can also be used to access information provided by Web servers inprivate networks or files in file resources to file systems systems. A Web browser is asoftware program that interprets the coding language of the World Wide Web in graphicform, displaying the translation rather than the coding. This allows anyone to browse the

    Web by simple point and click navigation, bypassing the need to know commands used insoftware languages. Mosaic was the first successfull graphical web browser. It enablescomputers users to locate and access web pages. Browsers translates the basic HTML

  • 7/31/2019 Iwt Assignment (Theory)

    26/26

    (Hypertext Mark Up Language) code that allows us to see images, text videos and listen toaudios on websites, along with hyperlinks that let us travel to different web pages. Thebrowser gets in contact with the web server and requests for information. The browserreceives the information and displays it on the computer. Example Mozilla Firefox,Internet Explorer, Opera, Lynx, etc.

    c.) Search Engine:- A web search engine is designed to search for information on theWorld Wide Web. The search results are usually presented in a list of results and arecommonly called hits. The information may consist of web pages, images, information andother types of files. It as an application that searches for, and retrieves, data based onsome criteria, especially one that searches the Internet for documents containing specifiedwords. A search engine is a set of programs which are used to search for informationwithin a specific realm and collate that information in a database. There are three aspectsto a search engine: crawling, indexing, and searching. When a search engine crawls, itlooks for new content which was not present during the last crawl, including updates tofiles and web pages. Then, the programs index the information, pulling out specifickeywords to categorize it. On the Internet, for example, indexing relies heavily on

    keywords in web pages, and meta tags which provide information about the page.Once the information has been indexed, information about how to access it is stored in adatabase.

    d.) Telnet:- Telnet is a protocol that allows you to connect to remote computers (calledhosts) over a TCP/IP network (such as the Internet). You use software called a telnet clienton your computer to make a connection to a telnet server (i.e., the remote host). Onceyour telnet client establishes a connection to the remote host, your client becomes a virtualterminal, allowing you to communicate with the remote host from your computer. In mostcases, you'll need to log into the remote host, which requires that you have an account on

    that system. Telnet has evolved into a new modern version of remote control called 'SSH'.It is a network protocol that allows a user on one computer to log on to another computerthat is part of the same network.

    e.) Gopher:- The Gopher protocol is a TCP/IP Application layer protocol designed fordistributing, searching, and retrieving documents over the Internet. Software using thisprotocol was a predecessor of (and later, an alternative to) the World Wide Web. It is adistributed information system similar to the World-Wide Web, but less versitile andgenerally used only for text files. Gopher is also the name of a gopher client programavailable on most UNIX-based systems. It is a menu-based system used fororganizing andretrieving files and programs on the Internet. Gopher allows access to files found on FTP

    servers, as well as to files normally accessed through Telnet.

    e.) Web Security:- Web security comprises of all the dangers of putting up a Web pageon the internet. It is a major problem in today's world with new viruses being releasedeveryday. Viruses and malware find the web to be a thriving ground for their propagation.Unsuspecting users may be caught off-guard and have their security comprimised leadingto loss of data or even theft like credit card theft. Throughout the history of the internet ithas been seen that the viruses which spread most use the e-mail services provided by theweb to propagate. Hackers can use it to get access to your system and steal or damageyour data. From invasions of privacy to actual hackers cracking web security is a veryimportant aspect. The steps that users can take to improve their web security isawareness (hackers thrive on ignorance of the users), use of a firewall and other internetsecurity packages, encryption, etc.