Você está na página 1de 19

MAHAKAL INSTITUTE OF TECHNOLOGY

AICTE Approved, NBA Accredited, ISO 9001-2000 Certified


BEHIND AIR STRIP UJJAIN (MP)

Department of Computer Science & Engineering


WEB ENGINEERING (CS-802) LAB - MANUAL Student Name: - .. Enrollment No: - . Branch/Year/Semester:-.
Affiliated to Rajiv Gandhi Prodyogiki Vishwavidyalaya Bhopal (MP)

INDEX
S.No 1 2 3 4 5 6 7 8 Name of Algorithm To Study Web servers and web Browsers Write the introduction of ASP, PHP and XML Create a web page purely in HTML code Create a web page to show application of CSS file Study of JavaScript and applying java script to validate form Create a web page using HTML, java script, CSS file Create a web page to show application of form controls a) Write a code in ASP to format the text with HTML tags. b) Write a code to reverse the string. c) Write a code to check is user is connected or not Create an XML document template to describe the result of student in an examination. a. Write the code in PHP by using Loop statements any 2 b.Write the code in PHP using Mathematical operations, String functions (any one). Date Sign Remark

9 10

Lab manual
Total number of Experiments: 10 S.No 1 2 Name of Algorithm To Study Web servers and web Browsers Write the introduction of ASP What are the strengths of XML technology Write short note on conditional statement and Iterations in PHP. What is the file extension of PERL, write the code using FOR and WHILE loop. e) What CGI scripts are? Create a web page purely in HTML code Create a web page to show application of CSS file Study of JavaScript and applying java script to validate form Create a web page using HTML, java script, CSS file Create a web page to show application of form controls a) Write a code in ASP to format the text with HTML tags. b) Write a code to reverse the string. c) Write a code to check is user is connected or not Create an XML document template to describe the result of student in an examination. 1) Write the code in PHP by using Loop statements any 2 2) Write the code in PHP using Mathematical operations, String functions (any one). a) b) c) d) Days needed to complete

3 4 5 6 7 8

9 10

Distribution of lab hours: Explanation of experiment: Performance of experiment: File checking: Attendance:

1Hour 40 Min. 15 Min. 55 Min. 10 Min. 05 Min.

PROGRAM NO: - 1
Unit/Topic: Web Server and Browser

PROBLEM DEFINITION:
Study of web server and web Browser.

OBJECTIVE:
To understand working of web server and browser.

THEORY: Web Server:


A web server can mean two things - a computer on which a web site is hosted and a program that runs on such a computer. So the term web server refers to both hardware and software. We'll look at each of these individually. A web site is a collection of web pages. And web pages are digital files, typically written using HyperText Markup Language (HTML). For a web site to be available to everyone in the world at all times, it need to be stored or "hosted" on a computer that is connected to the internet. Such a computer is known as a web Server. Hardware: There are several requirements for a Server computer - it needs to be fast, have a large storage capacity hard disk and lots of RAM. But the most important is having a permanent internet address also known as an I.P. (Internet protocol) address Software: A web server program is software that runs on the web site hosting Server computer. Its main purpose is to serve web pages; which means it waits for requests from web browsers (also known as clients) and responds by sending the required data back.

Role of Web Server: Web servers - the computer or the program - have a vital role on the Internet. The Server machine hosts the web site while the server program helps deliver the web pages and their associated files like images and flash movies. The process of loading a web site/page in a web browser starts with the user either entering the URL in the address bar or clicking on a link. You should know that each web page has a unique address (or URL) on the internet; which means the same page cannot exist in two places. The browser now needs to send out a request for the web page. Behind the scenes, the URL of the requested web page is resolved into an I.P. address, which in English means, converted to an I.P. addresses - something that computers understand. The I.P. address points to the location of the web site host and the request is forwarded to Server computer and passed on to the server software. The server software now takes up and hunts for the requested web page on the hard disk. On finding the file, it sends back a response and the web page file to the browser which then starts displaying the page. A typical web page not only has text but also embedded multimedia elements like images and Flash animation. These "extra" files are separate from the actual web page and need to be sent one by one for the browser to display the web page correctly. ONLY the web browser determines how a web page is displayed; the web server has no control over this. The job of a web server ends once it processes the request from a browser and sends the required information.

Web Browser:
A Web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier (URI) and may be a web page, image, video, or other piece of content. Hyperlinks present in resources enable users to easily navigate their browsers to related resources.

Web Browser Features:


ActiveX: ActiveX is a technology used by Microsoft Internet Explorer on Microsoft Windows systems. ActiveX allows applications or parts of applications to be utilized by the web browser. A web page can use ActiveX components that may already reside on a Windows system, or a site may provide the component as a downloadable object. This gives extra functionality to traditional web browsing, but may also introduce more severe vulnerabilities if not properly implemented. Plug-ins: Plug-ins are applications intended for use in the web browser. Netscape has developed the NPAPI standard for developing plug-ins, but this standard is used by multiple web browsers, including Mozilla Firefox and Safari. Plug-ins are similar to ActiveX controls but cannot be executed outside of a web browser. Adobe Flash is an example of an application that is available as a plug-in. Cookies: Cookies are files placed on your system to store data for specific web sites. A cookie can contain any information that a web site is designed to place in it. Cookies may contain information about the sites you visited, or may even contain credentials for accessing the site. Cookies are designed to be readable only by the web site that created the cookie. Session cookies

are cleared when the browser is closed, and persistent cookies will remain on the computer until the specified expiration date is reached. JavaScript: JavaScript is a scripting language that is used to make web sites more interactive. There are specifications in the JavaScript standard that restrict certain features such as accessing local files.

INPUT SET: OUTPUT SET: NOTES:

NAME OF FACULTY: SIGNATURE: DATE:

PROGRAM NO: - 2 PROBLEM DEFINITION:


a) b) c) d) e)

Unit/Topic: Web Applications

Write the introduction of ASP What are the strengths of XML technology Write short note on conditional statement and Iterations in PHP. What is the file extension of PERL, write the code using FOR and WHILE loop. What CGI scripts are?

OBJECTIVE:
To understand basics technologies for Web Applications

INPUT SET:

OUTPUT SET:

NOTES:

NAME OF FACULTY: SIGNATURE: DATE:

PROGRAM NO: - 3 PROBLEM DEFINITION:


To create a web page purely in HTML .

Unit/Topic: HTML

OBJECTIVE:
To understand basic and use of HTML tags.

INPUT SET:

OUTPUT SET:

NOTES:

NAME OF FACULTY: SIGNATURE: DATE:

PROGRAM NO: - 4 PROBLEM DEFINITION:


To create a web page to show application of CSS file

Unit/Topic: Cascading style sheet

OBJECTIVE:
To understand concept of CSS (Cascading style sheet)

INPUT SET:

OUTPUT SET: NOTES:

NAME OF FACULTY: SIGNATURE: DATE:

PROGRAM NO: - 5 PROBLEM DEFINITION:


Study of JavaScript and applying java script to validate form

Unit/Topic: JavaScript

OBJECTIVE:
Study of java script and validation.

THEORY:
What is JavaScript?

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 put dynamic text into an HTML page - A JavaScript statement like this: document.write("<h1>" + name + "</h1>") can write a variable text into an HTML page 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 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 Interpreted language -JavaScript is an interpreted language (means that scripts execute without preliminary compilation)

To insert a JavaScript into an HTML page, we use the <script> tag. Inside the <script> tag we use the type attribute to define the scripting language.So, the <script type="text/javascript"> and </script> tells where the JavaScript starts and ends: <html><body> <script type="text/javascript"> . </script> </body> </html>

JavaScript Functions To keep the browser from executing a script when the page loads, you can put your script into a function. A function contains code that will be executed by an event or by a call to the function. You may call a function from anywhere within a page (or even from other pages if the function is embedded in an external .js file). Functions can be defined both in the <head> and in the <body> section of a document. However, to assure that a function is read/loaded by the browser before it is called, it could be wise to put functions in the <head> section. <script type="text/javascript"> function displaymessage() { alert("Hello World!"); } </script>

Events
By using JavaScript, we have the ability to create dynamic web pages. Events are actions that can be detected by JavaScript. 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 The <form> tag supports the following event attributes: Attribute onclick ondblclick onmousedown onmousemove onmouseout onmouseover onmouseup onkeydown onkeypress onkeyup onreset onsubmit Description Script to be run on a mouse click Script to be run on a mouse double-click Script to be run when mouse button is pressed Script to be run when mouse pointer moves Script to be run when mouse pointer moves out of an element Script to be run when mouse pointer moves over an element Script to be run when mouse button is released Script to be run when a key is pressed Script to be run when a key is pressed and released Script to be run when a key is released Script to be run when a form is reset Script to be run when a form is submitted

JavaScript Form Validation JavaScript can be used to validate data in HTML forms before sending off the content to a server. Form data that typically are checked by a JavaScript could be:

has the user left required fields empty? has the user entered a valid e-mail address? has the user entered a valid date? has the user entered text in a numeric field?

Browser Detection Almost everything in this tutorial works on all JavaScript-enabled browsers. However, there are some things that just don't work on certain browsers - especially on older browsers. So, sometimes it can be very useful to detect the visitor's browser, and then serve up the appropriate information. The best way to do this is to make your web pages smart enough to look one way to some browsers and another way to other browsers. The Navigator object contains information about the visitor's browser name, version, and more.The Navigator object contains all information about the visitor's browser. We are going to look at two properties of the Navigator object:

appName - holds the name of the browser appVersion - holds, among other things, the version of the browser

<script type="text/javascript"> var browser=navigator.appName; var b_version=navigator.appVersion; var version=parseFloat(b_version); document.write("Browser name: "+ browser); document.write("<br />"); document.write("Browser version: "+ version); </script>

INPUT SET:

OUTPUT SET:

NOTES:

NAME OF FACULTY: SIGNATURE: DATE:

PROGRAM NO: - 6 PROBLEM DEFINITION:


To create a web page using HTML, java script, CSS file

Unit/Topic: Web Page

OBJECTIVE:
Implementation of web page using HTML, java script and CSS

INPUT SET: OUTPUT SET: NOTES:

NAME OF FACULTY: SIGNATURE: DATE:

PROGRAM NO: - 7 PROBLEM DEFINITION:


To create a web page to show application of form controls

Unit/Topic: Form Controls

OBJECTIVE:
Implementation form controls in HTML page.

INPUT SET: OUTPUT SET: NOTES:

NAME OF FACULTY: SIGNATURE: DATE:

PROGRAM NO: - 8 PROBLEM DEFINITION:


a) b) c) d) Write a code in ASP to format the text with HTML tags. Write a code to reverse the string. Interact with a user in a form that uses get and post method Return session id number

Unit/Topic: ASP

OBJECTIVE:
To understand the code of ASP by using format code, get and post method.

INPUT SET: OUTPUT SET: NOTES:

NAME OF FACULTY: SIGNATURE: DATE:

PROGRAM NO: - 9 PROBLEM DEFINITION: OBJECTIVE:


To understand the creation of XML document.

Unit/Topic: XML

a) Create an XML document template to describe the result of student in an examination.

INPUT SET: OUTPUT SET: NOTES:

NAME OF FACULTY: SIGNATURE: DATE:

PROGRAM NO: - 10 PROBLEM DEFINITION:


1) Write the code in PHP by using Loop statements.

Unit/Topic: PHP

2) Write the code in PHP using Mathematical operations, String functions (any one).

OBJECTIVE:
Understanding concept of PHP.

INPUT SET: OUTPUT SET: NOTES:

NAME OF FACULTY: SIGNATURE: DATE:

Você também pode gostar