Web Technology Lab: Installing Apache Tomcat and Java Servlets, Lab Reports of Web Design and Development

This document consists of session tracking programs, XML files and jsp files.

Typology: Lab Reports

2019/2020

Uploaded on 11/10/2020

Niveditha_M
Niveditha_M 🇮🇳

5

(1)

2 documents

1 / 30

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
IT8511-WEB TECHNOLOGY LABORATORY Department of IT 2020-2021
EX.NO: 1 IMAGE MAPPING USING HTML
AIM: To write the HTML code to perform the image mapping.
ALGORITHM:
1. Start.
2. Write the code for tnmap.html.
3. Perform mapping using <map> tag.
4. Insert hyperlink using <a href> tag.
5. Display results.
6. Stop.
PROGRAM:
tnmap.html
<!DOCTYPE html>
<html>
<head><title>TAMIL NADU</title></head>
<body>
<map name="tamilnadu">
<area href="erode.html" shape="circle" coords="78,78,10">
<area href="salem.html" shape="circle" coords="60,90,10">
<area href="kovai.html" shape="circle" coords="50,120,10">
</map>
<img src="tnmap.png" border="1" usemap="#tamilnadu" height="600">
</body></html>
erode.html
<!DOCTYPE html>
<html>
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e

Partial preview of the text

Download Web Technology Lab: Installing Apache Tomcat and Java Servlets and more Lab Reports Web Design and Development in PDF only on Docsity!

EX.NO: 1 IMAGE MAPPING USING HTML

AIM: To write the HTML code to perform the image mapping. ALGORITHM:

  1. Start.
  2. Write the code for tnmap.html.
  3. Perform mapping using tag.
  4. Insert hyperlink using tag.
  5. Display results.
  6. Stop. PROGRAM: tnmap.html

TAMIL NADU

erode.html

ERODE This is the Erode district in Tamilnadu. Erode was the largest distinct by area in the state before the formation of Tripura district.They are six taluks in this district. They are:

Andiyur Bhavani Erode Gobichetipalayam Perundurai Sathyamangalam

HOME

salem.html

SALEM

This is the Salem district in Tamilnadu. Salem is surrounded by hills and is known for mango cultivation.They are eleven taluks in this district They are:

Coimbatore north Coimbatore south Kinathukadavu Madukkarai Mettupalayam Perur Pollachi Sulur Valparai

HOME

OUTPUT:

EX.NO:2 APPLYING INLINE CASCADING STYLE SHEETS TO A WEB PAGE

AIM: To write a html code for cascading style sheets. ALGORITHM:

  1. Start.
  2. Create a simple HTML page.
  3. Create internal CSS using

internal.html:

INTERNAL STYLE

text-align: center; } h2{ color: red; font-size: 40px; text-align: center; } p{ color: #800000; font-size: 30px; text-align: center; } pre{ color: blue; font-size: 30px; text-align: center; } OUTPUT: inline.html:

internal.html: external.html: RESULT : Thus the above cascading style sheets has been executed and implemented successfully.

window.alert("Plz enter ur name"); return false; } if (document.f1.pwd.value=="") { window.alert("Plz enter a password"); return false; } if (document.f1.cpwd.value=="") { window.alert("Plz enter your password again"); return false; } if (document.f1.pwd.value!=document.f1.cpwd.value) { window.alert("Password mismatch"); return false; } if(document.f1.address.value=="") { window.alert("Plz enter ur addr"); return false(); } if(document.f1.country.selectedIndex==0)

window.alert("Plz select your country"); return false; } if ((document.f1.rdo[0].checked==false)&&(document.f1.rdo[1].checked==false)) { window.alert("Plz select ur gender"); return false; } }

REGISTREATION FORM

NAME:

PASSWORD:

reg.html:

SUCCESS!!

REGISTRATION SUCCESSFULL !!!

OUTPUT:

RESULT: Thus the above html code with client side validation using Javascript has been executed and implemented successfully.

  • The only think you have to do here is to fill a “User Name”, provide a “Password” for it and eventually tick on the checkbox for “Create shortcuts for all users”. Leave everything as is. Normally you don’t need to change anything. Click on Next.
  1. Tomcat uses an environment variable named JAVA_HOME to indicate the location of the JAVA directory.
  2. Additionally it uses another environment variable named CATALINA_HOME to indicate the location of Tomcat’s Jakarta level directory.
  3. In Windows XP (or equivalent) go to:
  4. Control Panel→System→Advanced→Environment Variables
  5. Click on the New button to add the following as seen with the screen grab attached: Just these two need to be added to whatever you have already.

settings. CATALINA_HOME c:\tomcat6\apache-tomcat-6.0. JAVA_HOME c:\program files\java\jdk1.6 5. 5 .Save the modifications and re - boot your computer to apply the new environment variable

  1. This can be tested from the command prompt (Start (^)  Run and type cmd ) by typing ECHO followed by a space and then the variable enclosed inside a pair of % characters (e.g. ECHO % JAVA_HOME%).
  2. Starting and Stopping the server: This is done via two batch files (^) – startup and shutdown They can be found in the Tomcat bin folder. It is recommended you create a shortcut for each and place on your desktop. Start the server by running the startup batch file (^) – you should get a display like this:
  3. Next test that the server can run a JSP page.
  • In the webapps\ROOT^ folder you will find an index.jsp file.
  • The ROOT folder is where the JSP pages need to live.
  • Open your web browser and in offline mode type the following in the url text box: ·http://localhost:8080/index.jsp If the following page appears then you have successfully installed Tomcat: