Internet Technologies Practicals Documentation: Author
Internet Technologies Practicals Documentation: Author
Internet Technologies Practicals Documentation: Author
PRACTICALS
DOCUMENTATION
Author:
D.G.Ramnath
Editor:
Dr.P.Premchand
Dept. of CSE
UCOE, Osmania University
Click on Start
Select Settings and then Control Panel.
Double click the Network icon.
Click the Identification Tab at the top of the window to find
the computer name and workgroup name.
Workstation Name
Workgroup Name
User Login
Password protected? (YES/NO)
Specific
Component
Description
Aim:
To remove and to install a Network Interface Card (NIC) in a PC.
Tasks:
I. Prepare to remove the NIC:
1. Ground yourself by touching something metal, other than
the computer.
2. Turn off your computer and unplug the power cable.
3. Remove the cover and call the teacher over to show her
the NIC.
4. Ground yourself by touching something metal; the case is
OK, if it's not touching the rest of the computer.
II. Remove the network card:
1. Remove the screw holding the card to the case.
2. Handle the top corners of the network card with both
hands and gently rock the card front to rear to remove it
from the expansion slot.
3. Trade network cards with your neighbor.
4. Record the type of card here:
III. Install the network card
1. Again, handle the top corners of the network card with
both hands.
2. Align the tabs of the network card with the slot and gently
rock the card front to rear to insert it into the expansion
slot.
3. Finally, secure the card to the case with a screw.
20. Again on the Configuration tab, click the File and Print
Sharing button. Check the box that says "I want to be able
to give others access to my files" to allow each
workstation to share its Folders.
21. Click on the Access Control tab and verify that that the
"Share Level Access Control" button is selected.
22. Click on the Identification tab and enter a name for your
computer. The Workgroup should be ICE and the
Computer Description is optional.
23. Click OK until all windows are closed and then reboot.
VI. Check out your LAN.
24. Double-click on Network Neighborhood.
25. Record what you see:
26. Double-click on each icon to see what is there.
VII. Share some files.
27. Use Windows Explorer to create a folder to be shared
called "Testfolder".
28. Double-click on My Computer or Network
Neighborhood, select the folder and right click to share it.
Enter the name of the share and click OK.
29. After your neighbors have done the same, create a new
document and save it to their folder. Record the name of
your file and the name of the workstation with which you
shared the file: _________________________
30. Open the file which your neighbor saved to your folder.
Record its name: _________________________
VIII. Find the meanings for the following terms:
31. LAN
32. Ethernet
33. CAT 5 or category 5 cable
34. RJ45 connector
35. Hub
36. Class C IP address
37. Ping
4. Internet Connection
AIM:
Use an Ethernet hub to connect to the Internet and to investigate
HTTP and FTP.
Tasks
1. Connect your workstation to the hub
1. Obtain a CAT 5 straight-through cable from the teacher.
2. Plug the hub or its AC adapter into a power outlet.
3. Plug the straight through cable from workstation the
workstation into any port of the hub, except the first.
2. Try to reach the Internet.
1. Open Internet Explorer.
2. If it asks you to set up the connection, choose the last
option which says that you are already set up.
3. What happens?
3. Check IP address settings.
1. Use the Control Panel and double-click on Network
2. Select the TCP/IP protocol, which matches your NIC,
from the Configuration tab
3. Click on Properties. Check the IP Address and Subnet
mask for your workstation on the IP Address tab.
4. Since you are connecting to the Internet, you can not just
make up your own address. Let the TVDSB's server
assign you a valid address by setting the IP address to
Obtain an IP address automatically.
5. Click OK until you are asked to reboot.
6. Reboot.
4. Try to reach the Internet.
1. Open Internet Explorer.
2. What happens?
1.
2.
3.
4.
5.
Remove WS-FTP.
Remove Hyperterminal
Remove File and printer sharing feature
Remove any files you created.
Remove any files you downloaded
Set the IP address to 192.168.0.1
Set the mask to 255.255.255.0
Set the computer's name to computer.
6.
HTML Programs
To test these programs, copy any of the listed code into the notepad and
save it with suitable name having html extension. Open that html file in
any browser to see its output.
html_lab1: My first program
<html>
<head>
<title>My first program</title></head>
<body bgcolor="yellow">
<h2>Look: Colored Background!</h2>
The content of the body element is displayed in your browser.
</body>
</html>
html_lab2: Headings and Horizontal rule
<html>
<head>
<title>Headings & Horizontal rule</title></head>
<body>
<hr>
<h1>This is heading 1</h1>
<hr size=19 >
<h2>This is heading 2</h2>
<hr size=19 NOSHADE >
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
Don't use heading tags for the
text to display in bold or something like that
</body>
</html>
html_lab3: Adding an image as background
<html>
<head>
<p>
You can also use an image as a link:
<a href="toppage.htm">
<img border="0" src="buttonnext.gif" width="65" height="38"></a>
<!-- The gif image should be available on your system -->
</p>
</body>
</html>
html_lab6: Mixed Frameset
Before writing code for mixed frameset, create three different html
files frame_A, frame_B and frame_C with code depicted in the
following table and place them all in the same directory
frame_A.html
<html>
<body
bgcolor="yellow">
<h2>Frame_A</h2>
</body>
</html>
frame_b.html
<html>
<body
bgcolor="red">
<h2>Frame_B</h2>
</body>
</html>
frame_c.html
<html>
<body
bgcolor="green">
<h2>Frame_C</h2>
</body>
</html>
<body>
<iframe src="http://yahoo.com"></iframe>
<p>Few browsers may not support iframes.</p>
<p> iframe will not be visible for such browser.</p>
</body>
</html>
html_lab8: Simple tables
<html>
<body>
<p>
Each table starts with a table tag.
Each table row starts with a tr tag.
Each table data starts with a td tag.
</p>
<h4>One column:</h4>
<table border="1">
<tr>
<td>1000</td>
</tr>
</table>
<h4>One row and three columns:</h4>
<table border="1">
<tr>
<td>ABC</td>
<td>DEF</td>
<td>GHI</td>
</tr>
</table>
<h4>Two rows and three columns:</h4>
<table border="1">
<tr>
<td>XXXX</td>
<td>YYYY</td>
<td>ZZZZ</td>
</tr>
<tr>
<td>4000</td>
<td>5000</td>
<td>6000</td>
</tr>
</table>
</body>
</html>
html_lab9: Table with different tags
<html>
<body>
<table border="1">
<tr>
<td>
<p>This is a paragraph</p>
<p><i>Another paragraph!</i></p>
</td>
<td>A table inside a table:
<table border="1">
<tr>
<td>AAA</td>
<td>BBB</td>
</tr>
<tr>
<td>CCC</td>
<td>DDD</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>Differentiate
<ul>
<li>Frames</li>
<li>Tables</li>
<li>Iframes</li>
</ul>
</td>
<td><b>HELLO WORLD</b></td>
</tr>
</table>
</body>
</html>
html_lab10: Forms
<html>
<body>
<form>
Username:
<input type="text" name="user">
<br>
Password:
<input type="password" name="password">
</form>
<p>
See the difference between text
and password forms
</p>
</body>
</html>
html_lab11: Forms with mailto option
<html>
<body>
<form
action="MAILTO:[email protected]"
enctype="text/plain">
<h3>This form sends an e-mail to W3Schools.</h3>
Name:<br>
<input type="text" name="name"
value="yourname" size="20">
<br>
Mail:<br>
method="post"
planet.gif
href="venus.htm">
</map>
</body>
</html>
html lab13: Working with style sheets
Step. No1: Create a html file using following code
<HTML> <HEAD>
<TITLE> Style Sheet Demonstration </TITLE>
<LINK rel="stylesheet" href="mystyle.css" type="text/css">
</HEAD>
<BODY>
<H1> Our Exciting Story </H1>
<P> We started to dock at the station before we realized what was
happening. </P>
<P class="warning"> Alien approaching! </P>
<P> The capsule on the weird craft started emitting a beam of some sort.
</P>
<P class="danger"> Destruction imminent! </P>
</BODY> </HTML>
Step. No.2: Create a style sheet mystyle.css with the following code
Place both .html and .css file in the same directory
H1 {
font-family: rockwell, serif;
color: green; }
P.danger {
color: red;
font-weight: bold;
text-decoration: underline; }
P.warning { color: purple; font-weight: bold; }
Step. No.3: Open the html file in the browser.
7. JavaScript programs
To test these programs, copy any of the listed code into the notepad and
save it with suitable name having html extension. Open that html file in
any browser to see its output.
<HTML>
<HEAD><TITLE>Handling Events Example</TITLE></HEAD>
<BODY>
<H1>Handling Events in JavaScript</H1>
<FORM>
<INPUT TYPE="button" VALUE="Click me"
onClick="alert('You clicked me')" >
</FORM>
<SCRIPT LANGUAGE=JavaScript>
function alertUser() { alert("An alert box contains an exclamation
mark");}
function confirmUser() {
var msg = "\n please confirm that you want\n" +
"to test another button?";
if (confirm(msg)) document.write("<h2>You selected OK</h2>");
else document.write("<h2>You selected Cancel</h2>"); }
function promptUser() {
name1=prompt("What is your name?", " ");
document.write("<h2>welcome to this page " + name1 + "</h2>"); }
</SCRIPT></HEAD><BODY>welcome to this page<br>
<FORM>
<INPUT TYPE=button VALUE="Click here to test alert()"
onClick="alertUser()"><BR>
<INPUT TYPE=button VALUE="Click here to test confirm()"
onClick="confirmUser()"><BR>
<INPUT TYPE=button VALUE="Click here to test prompt()"
onClick="promptUser()"></FORM>
<div style="display: block; font-family: Verdana, Geneva, Arial; fontsize: 10px">
This program uses forms along with Javascript!
</div>
</BODY>
</HTML>
else {
document[id].document.open();
document[id].document.write(str);
document[id].document.close();
}
}
function update() {
display("banner", banners[which]);
which++;
if (which == banners.length) { which = 0;};
}
</SCRIPT></HEAD>
<BODY onload=" if (setInterval) { setInterval('update()', 500);}">
<p>An example of a changing text banner</P>
<P><SPAN ID="banner" STYLE="position:absolute;"><I>
<SCRIPT Language=Javascript>
if (setInterval)
{document.write('the banner is loading');}
else
{document.write('Get a new browser');};
</SCRIPT></I></SPAN>
<BR><P>Here is the remainder of the document</P>
</BODY></HTML>
JSlab8: Image links
<HTML><HEAD><TITLE>Image Links</TITLE>
<SCRIPT language=javascript>
function highlight(imgName) {
if (document.images) {
document.images[imgName].src =
onImages[imgName].src;}}
function unhighlight(imgName) {
if (document.images) {
document.images[imgName].src=
offImages[imgName].src;}}
if (document.images) {
var onImages = new Array;
</SCRIPT></HEAD>
<BODY>
<P> <A HREF="subdocs/documents.html"
onMouseOver="highlight('docs')" onMouseOut="unhighlight('docs')">
<IMG SRC="images/docs_off.gif" height=25 width=25 name=docs
border=0
alt=documents></A>
<A HREF="subdocs/tech.html" onMouseOver="highlight('tech')"
// sub directory in current location
onMouseOut="unhighlight('tech')">
<IMG SRC="images/tech_off.gif" height=25 width=25 name=tech
border=0
alt=tech_reports></A> // besure to have images in images directory
</P>
</BODY>
</HTML>
Jslab9: Simple frame
<HTML>
<HEAD>
<TITLE>Simple Frame Ex</TITLE>
</HEAD>
<FRAMESET rows="50%,50%">
<FRAME src= red.html name=frame1> //red.html must be in
current directory
<FRAMESET cols="30%,70%" >
<BODY>
<SCRIPT LANGUAGE="JavaScript">
SetColors()
</SCRIPT>
<PRE>
Explanation: In BODY calls SetColors()
function SetColors()
{
document.fgColor = "white";
document.bgColor = "black";
} </PRE>
<hr>
<font size=+3>This text is displayed in white<br>
<font color=red>This text is displayed in red</font></font>
</BODY>
</HTML>
JSlab11: Using for Input validation
<html>
<head>
<title>Using for Input validation</title>
<script language=JavaScript>
function checkEmpty()
{
/* This function checks all of the fields of the form and notifies the
client which, if any, form fields are empty. It returns a 1 if all the fields
are full, and a 0 otherwise.
*/
var firstname_filled=false;
var lastname_filled=false;
var streetaddress_filled=false;
var city_filled=false;
var phonenumber_filled=false;
var youremail_filled=false;
var blank="";
if (document.myform.firstname.value != blank)
firstname_filled=true;
if (document.myform.lastname.value != blank)
lastname_filled=true;
if (document.myform.streetaddress.value != blank)
streetaddress_filled=true;
if (document.myform.city.value != blank)
city_filled=true;
if (document.myform.phonenumber.value != blank)
phonenumber_filled=true;
if (document.myform.youremail.value != blank)
youremail_filled=true;
if ( (firstname_filled) && (lastname_filled) &&
(streetaddress_filled) &&
(city_filled) && (phonenumber_filled) &&
(youremail_filled) )
{
</BODY>
</HTML>
JSlab13: Using Date object
<HTML>
<HEAD>
<TITLE>Using the Date Object</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function Clock(hours, minutes, seconds) {
this.hours = hours; this.minutes = minutes; this.seconds = seconds;
}
function DisplayClock(Clock) {
var clockdisp=Clock.hours + ":" + Clock.minutes + ":" +
Clock.seconds;
document.write("<BR>The time is:" + clockdisp);
}
</SCRIPT>
</HEAD>
<BODY>
<HR>
<SCRIPT LANGUAGE="JavaScript">
var timenow = new Date;
document.write(timenow);
thisClock = new
Clock(timenow.getHours(),timenow.getMinutes(),timenow.getSeconds()
);
DisplayClock(thisClock);
</SCRIPT>
<br>
<a href="../ ">Return to Main Page</a>
</BODY>
</HTML>
8. Creation and hosting of personal home pages
Day of month: is 24
Year: is 2005
Month: is May
Time: is 3:33:11
Date: is 5/24/2005
Day: is Tuesday
Day Of Year: is 144
Week Of Year: is 22
era: is 1
DST Offset: is 1
Zone Offset: is 0
<p>This JSP page invokes a custom tag that simply echos "Hello,
World!"
The custom tag is generated from a tag file in the /WEB-INF/tags
directory.</p>
<p>Notice that we did not need to write a TLD for this tag. We just
created /WEB-INF/tags/helloWorld.tag, imported it using the taglib
directive, and used it!</p>
<br>
<b><u>Result:</u></b>
<tags:helloWorld/>
</body>
</html>
helloWorld.tag
<%-hello world tag!
--%>
Hello, world!
Writing plugins:
Tomcat 5 provides a framework for implementing tag plugins. The
plugins instruct Jasper, at translation time, to replace tag handler calls
with Java scriptlets. The framework allows tag library authors to
implement plugins for their tags.
Tomcat 5 is released with plugins for several JSTL tags. Note that these
plugins work with JSTL 1.1 as well as JSTL 1.0, though the examples
uses JSTL 1.1 and JSP 2.0. These plugins are not complete (for instance,
some item types not handled in <c:if>). They do serve as examples to
show plugins in action (just examine the generated Java files), and how
they can be implemented.
How to write tag plugins
To write a plugin, you'll need to download the source for Tomcat 5.
There are two steps:
</c:choose>
</c:forEach>
</body>
</html>
jsplab4: expression languages
<html>
<head>
<title>JSP 2.0 Expression Language - Basic Comparisons</title>
</head>
<body>
<h1>JSP 2.0 Expression Language - Basic Comparisons</h1>
<hr>
This example illustrates basic Expression Language comparisons.
The following comparison operators are supported:
<ul>
<li>Less-than (< or lt)</li>
<li>Greater-than (> or gt)</li>
<li>Less-than-or-equal (<= or le)</li>
<li>Greater-than-or-equal (>= or ge)</li>
<li>Equal (== or eq)</li>
<li>Not Equal (!= or ne)</li>
</ul>
<blockquote>
<u><b>Numeric</b></u>
<code>
<table border="1">
<thead>
<td><b>EL Expression</b></td>
<td><b>Result</b></td>
</thead>
<tr>
<td>\${1 < 2}</td>
<td>${1 < 2}</td>
</tr>
<tr>
<td>\${1 lt 2}</td>
<td>${1 lt 2}</td>
</tr>
<tr>
<td>\${1 > (4/2)}</td>
<code>
<table border="1">
<thead>
<td><b>EL Expression</b></td>
<td><b>Result</b></td>
</thead>
<tr>
<td>\${'a' < 'b'}</td>
<td>${'a' < 'b'}</td>
</tr>
<tr>
<td>\${'hip' > 'hit'}</td>
<td>${'hip' > 'hit'}</td>
</tr>
<tr>
<td>\${'4' > 3}</td>
<td>${'4' > 3}</td>
</tr>
</table>
</code>
</blockquote>
</body>
</html>
The output for the program is:
This example illustrates basic Expression Language comparisons. The
following comparison operators are supported:
Numeric
EL Expression
Result
${1 < 2}
true
${1 lt 2}
true
false
false
${4.0 >= 3}
true
${4.0 ge 3}
true
${4 <= 3}
false
${4 le 3}
false
${100.0 == 100}
true
${100.0 eq 100}
true
Alphabetic
EL Expression Result
${'a' < 'b'}
true
false
${'4' > 3}
true