Ads

Wednesday 24 October 2012

image map


PROGRAMS:

MAIN.HTML:
<html>
<head>
<title><b>INTERNET AND WORLD WIDE</b></title>
<center><title>INDIA MAP</title></center>
</head>
<body>
<h1><b><marquee>WELCOME TO INTERNET LAB</marquee></b></h1>
<body bgcolor=yellow text=red>
<p>
<img src="pic.bmp"="center"width="800"height="600"usemap="#INDIA">
<map name="INDIA">
<area shape="circle"ALT="CHENNAI"coords="250,200,10"HREF="chennai.html">
<area shape="circle"ALT="MUMBAI"coords="160,170,10"HREF="mumbai.html">
<area shape="circle"ALT="KOLKATTA"coords="270,140,20"HREF="kolkatta.html">
<area shape="circle"ALT="DELHI"coords="170,100,20"HREF="delhi.html">
</map></p>
</body>
</html>

CHENNAI:
<html>
<head>
</head>
<body bgcolor=red text=white>
<h1><marquee>WELCOME TO MADRASAPATTINAM</marquee></h1>
<A href="imagemap.html"><strong><FONT color=white>homepage</FONT></strong></a><p></p>
<b><font size=4 face=verdana>CHENNAI IS THE CAPITAL OF TAMILNADU</font></b>
</body>
</html>
           
DELHI:
<html>
<head>
</head>
<body bgcolor=red text=white>
<h1><marquee>WELCOME TO NEWDELHI</marquee></h1>
<A href="imagemap.html"><strong><FONT color=white>homepage</FONT></strong></a><p></p>
<b><font size=4 face=verdana>NEW DELHI IS THE CAPITAL OF INDIA</font></b>
</body>
</html>          
KOLKATTA:

<html>
<head>
</head>
<body bgcolor=red text=white>
<h1><marquee>WELCOME TO KOLKATTA</marquee></h1>
<A href="imagemap.html"><strong><FONT color=white>homepage</FONT></strong></a><p></p>
<b><font size=4 face=verdana>KOLKATTA IS THE BIRTHPLACE OF GANGULY</font></b>
</body>
</html>          


MUMBAI:

<html>
<head>
</head>
<body bgcolor=red text=white>
<h1><marquee>WELCOME TO MUMBAI</marquee></h1>
<A href="imagemap.html"><strong><FONT color=white>homepage</FONT></strong></a><p></p><b><font size=4 face=verdana>AN IMPORTANT BUSINESS PLACE IN INDIA</font></b>
</body>
</html>

Tuesday 23 October 2012

CASCADING STYLESHEET


PROGRAM:

home.html

<html>
<head>
<title>PRIST UNIVERSITY</title>
<link rel="stylesheet" href="D:\j2sdk1.4.1_01\main.css" style="text/css">
</head>
<frameset cols="15%,*" noresize="noresize" name="home">
<frame name="link" src="link.html">
<frame name="display" src="sit.html">
</frameset>
</html>
sit.html

<html>
 <head>
<title> PRIST UNIVERSITY </title>
<link rel="stylesheet" href D:\j2sdk1.4.1_01\main.css " type="text/css">
<style>
 p.important{font-family:"Tahoma"; border:solid; border-width:thin; width:100%;color:blue}          </style>
</head>
<body>
<marquee> <h3>Welcome to PRIST UNIVERSITY </h3> </marquee>    
<p><span class=highlight>Prof.P.Murugesan</span> founded RICST(Ram Institute of Computer Science & Technology) in 1985, way ahead of the IT-wave of the 90′s. This pioneering effort in the agricultural district of Thanjavur gained quick recognition by its affiliation to the Bharathidasan University in 1989 for PGDCA course.
<p>This led to the establishment of Ponnaiyah Ramajayam College in 1994. Since it is Managed by an academician, its PHILOSOPHYalong with its derivatives - VISION, MISSION and GOAL - were predetermined under the umbrella of QUALITY and DISCIPLINE. Rest isHISTORY.</p>
<p><b>PHILOSOPHY</b>
<ul>To receive the students in reverence.</ul>
<ul>To educate them qualitatively.</ul>
<ul>To inculcate in them a sense of self-discipline.</ul>
<ul>To let them go forth with Virtues, Wisdom & Maturity.</ul>
<b>Vision</b>
</p>
<p>To create an aptitude amongst the students towards education as a life long process of formal and practical learning on the platform of assimilation of experiences for ongoing knowledge and skill to be of value to oneself and therefore to the society.</p>
<b>Mission</b>
<p>To create and sustain an educational environment in which each student is taught to believe in himself/herself, to create his/her own opportunities and to be a team player so that he/she creates in himself/herself an unending thirst for knowledge and skill.</p>
<b>Goal</b>
<p>To encourage, nurture and develop inborn capabilities of each student into a belief that nothing is impossible including permanent faith in positive attitude to learning and effectively applying what is learnt, so that they are prepared to make their career a successful one, their life a satisfying one and contribute to the benefit of the society by their Virtues, Wisdom and Maturity.</p>
<b>Quality Commitment</b>
<ul>Inculcating Discipline</ul>
<ul>Employing Committed & skilled Personnel</ul>
<ul>Promoting clear systems and procedures</ul>
<ul>Continuous improvement in teaching skills</ul>
<ul>Continuous upgrading in infrastructure</ul>
<ul>planned Operation.</ul>  
<p><span class=underline><b>Growth of the Institution:</b></span><br>
<ul>•   1986 Ram Institute of Computer Science & Technology blossoms.</ul>
<ul>•   1994 Establishment of Ponnaiyah Ramajayam College.</ul>
<ul>•   2000 Establishment of PR Engineering College.</ul>
<ul>•   2003 Upgradation of Ponnaiyah Ramajayam College as Research Institution.</ul>
<ul>•   2004 Establishment of Colleges of Education.</ul>
<ul>•   2005 Establishment of Ponnaiyah Ramajayam Polytechnic College, Thanjavur.</ul>
<ul>•   2005 DSIR Recognition for Ponnaiyah Ramajayam College.</ul>
<ul>•   2006 Establishment of Ponnaiyah Ramajayam College of Engineering & Technology.</ul>
<ul>•   2006 Establishment of Ponnaiyah Ramajayam Polytechnic College, Kumbakonam.</ul>
<ul>•   2008 Deemed University status conferred for PRIST.</ul>
<ul>•   2008 PRIST Chennai Campus blossoms.</ul>
<ul>•   2008 Establishment of Centre for Research and Development in PRIST.</ul>
<ul>•   2008 Establishment of Centre for Distance Education in PRIST.</ul>
<ul>•   2009 PRIST Campuses at Pondicherry, Tiruchirappalli and Kumbakonam blossom.</ul>
<ul>•   2012 Establishment of PRIST – Madurai Campus</ul>
</p></body>
</html>   

link.html

<html>
<link rel="stylesheet" href D:\j2sdk1.4.1_01\main.css ">
<body>
 <ul>
<li><bullet><a href="sit.html" target="display">Home Page</a></bullet></li>
<li><a href="department.html" target="display">Departments</a></li>
<li><a href="course.html" target="display">Courses</a></li></ul>
</body>
</html>
main.css

BODY{FONT-SIZE: 1em;
MARGIN-LEFT: 5%;
COLOR: #099669;
TEXT-INDENT: 3em;
MARGIN-RIGHT: 5%;
FONT-STYLE: italic;
FONT-FAMILY: verdana, sans serif}
H1{COLOR: #000099;
FONT-FAMILY: tahoma}
H2{COLOR: #000099;
 FONT-FAMILY: tahoma}
H3{
COLOR: #000099;
FONT-FAMILY: tahoma}
H4
{COLOR: #000099;
FONT-FAMILY: tahoma}
H5
{COLOR: #000099;
FONT-FAMILY: tahoma}
H6
{COLOR: #000099;
FONT-FAMILY: tahoma}
TH#1{
FONT-SIZE: 2em;
TEXT-TRANSFORM: uppercase;
COLOR: maroon;
FONT-FAMILY: Arial, 'Arial Black', 'Arial Greek';
TEXT-ALIGN: center}
SPAN.underline{
TEXT-DECORATION: underline}
SPAN.highlight
{
COLOR: white;
 BACKGROUND-COLOR: transparent}

servlet


PROGRAM:
Servlet Code:
import java.io.*;
import java.util.*;
import javax.servlet.*;
public class PostParam extends GenericServlet
{
public void service(ServletRequest request,ServletResponse response) throws ServletException,IOException
{
PrintWriter pw = response.getWriter();
Enumeration e = request.getParameterNames();
while(e.hasMoreElements())
{
String pname = (String)e.nextElement();
pw.print(pname + " = ");
String pvalue = request.getParameter(pname);
pw.println(pvalue);
}
pw.close();
}}
HTML CODE:
<HTML>
<head>
 <TITLE>INVOKING SERVLET FROM HTML</TITLE>
</head>
<BODY>
<CENTER>
<FORM name = "PostParam" method = "Post" action="http://localhost:8080/servlets-examples/servlet/PostParam">
<TABLE>
<tr>
<td><B>Employee </B> </td>
<td><input type = "textbox" name="ename" size="25"
value=""></td>
</tr>
<tr>
<td><B>Phone </B> </td>
<td><input type = "textbox" name="phoneno" size="25"
value=""></td>
</tr>
</TABLE>
<INPUT type = "submit" value="Submit">
</FORM>
</CENTER>
</body>
</html>

CHAT APPLICATION


PROGRAM

Server Side
import java.io.*;
import java.net.*;
class Server
{
public static DatagramSocket serversocket;
public static DatagramPacket dp;
public static BufferedReader dis;
public static InetAddress ia;
public static byte buf[]=new byte[1024];
public static int cport=789,sport=790;
public static void main(String a[])throws IOException
{
serversocket=new DatagramSocket(sport);
dp=new DatagramPacket(buf,buf.length);
dis=new BufferedReader(new InputStreamReader(System.in));
ia=InetAddress.getLocalHost();
System.out.println("Server is waiting for data from client");
while(true){
serversocket.receive(dp);
String s=new String(dp.getData(),0,dp.getLength());
System.out.println(s);
}}}

Client Side
import java.io.*;
import java.net.*;
class Client{
public static DatagramSocket clientsocket;
public static BufferedReader dis;
public static InetAddress ia;
public static byte buf[]=new byte[1024];
public static int cport=789,sport=790;
public static void main(String a[])throws IOException{
clientsocket = new DatagramSocket(cport);
dis=new BufferedReader(new InputStreamReader(System.in));
ia=InetAddress.getLocalHost();
System.out.println("Client is sending data to Server ");
while(true){                            
String str=dis.readLine();
buf=str.getBytes();
clientsocket.send(new DatagramPacket(buf,str.length(),ia,sport));
}}}