Professional Documents
Culture Documents
Ip Record
Ip Record
No :1
Cascading Style Sheets AndEmbedded StyleSheets
Date:
AIM :-
ALGORITHM :-
Step 3: Given the inline style sheet using p.class1 withBackground color black bottom
size=12em.
RESULT:-
Thus the Web page was created with Cascading Style Sheetand Embedded
Style Sheet.
Ex.No :2
AIM:-
ALGORITHM:-
1.About Departmnt2.Faculty
HOME PAGE:-
<html>
<head>
<h3>
<center>Department of Computer Science</ center></h3></head>
<ul type="disc">
<li><a href="Dept.html">About Department</a></li>
<li><a href="Faculty.html">Faculty</a></li>
<li><a href="Courses.html">Courses Offfered</a></li>
<li><a href="Syllabus.html">Syllabus</a></li>
<li><a href="Studstrength.html">Student Sudstrength</a></li></ul>
</html>
DEPARTMENT :-
<html>
<head><center><h4>ABOUT DEPORTMENT</center></h4></head>
<a href="Homepage.html">Home page</a>
<p>This Department was start in 1993-94</p>
</head>
</html>
FACULTY :-
<html>
<head><center><h4>Faculty</center></h4></head>
<a href="Homepage.html">HomePage</a>
<table border=3 align=center>
<tr><th>S.no</th><th>Name</th><th>Qualification</th><th>Design</th>
</tr>
<tr>
<td>1</td><td>S.Thirumal</td><td>MCA.,M.Phil</td><td>Head ofDepartment</td>
</tr>
<tr>
<td>2</td><td>K.Vijayalakshmi</td><td>Msc.,M.Phil</td><td>Assistant Professor</td>
</tr>
<tr>
<td>3</td><td>V.Meenakshi</td><td>MCA.,M.Phil</td><td>Assistant Professor</td>
</tr>
<tr>
<td>4</td><td>T.G.Babu</td><td>MCA.,M.Phil</td><td>Assistant Professor</td>
</tr>
<tr>
COURSES OFFERED:-
<html>
<head><h4><center>Courses Offered</h4></head>
<a href="Homepage.html">Home Page</a>
<h5>UG Courses</h5>
<table border=3 align=center>
<tr>
<th>S.No</th><th>Course Name</th><th>Duration</th><th>Total no of
student</th><th>Shift</th>
</tr>
<tr>
<td>1</td><td>B.sc(cs)</td><td>3years</td><td>40</td><td>1</td>
</tr>
<tr>
<td>2</td><td>BCA</td></td><td>3years</td><td>40</td><td>1</td>
</tr>
<tr>
<td>3</td><td>Bsc(cs)</td><td>3years</td><td>40</td><td>2</td>
</tr>
<tr>
<td>4</td><td>BCA</td><td>3years</td><td>40</td><td>2</td>
</tr>
</table>
<h5>PG COURSES</h5>
<table border=3 align=center>
<tr>
<th>S.No</th><th>Course Name</th><th>Duration</th><th>Total no of
student</th><th>shift</th>
</tr>
<tr>
<td>1</td><td>Msc(CS)</td><td>2years</td><td>26</td><td>1</td>
</tr>
<tr>
<td>2</td><td>Msc(IT)</td><td>2years</td><td>26</td><td>1</td>
</tr
</table>
</html>
SYALLABUS :-
<html>
<head><h4><center>SYALLABUS</center></h4></head>
<a href="Homepage.html">Home Page</a>
<table border=2>
<tr>
<th>Year/Semester</th>
<th>Subject</th>
<th>Paper</th>
<th>Title of the paper</th>
</tr>
<tr>
<td rowspan=7> 1 Year /1 Semester</td>
<td>Main</td>
<td>Paper 1</td>
<td>Principles Of Communication System</td>
</tr>
<tr>
<td>Main</td>
<td>Paper 2</td>
<td>Object Oriented Programming</td>
</tr>
<tr>
<td>Main</td>
<td>Paper 3</td>
<td>Database Management System</td>
</tr>
<tr>
<td>Main</td>
<td>Practical 1</td>
<td>Object Oriented Programming Lab</td>
</tr>
<tr>
<td>Main</td>
<td>Practical 2</td>
<td>Database Management System Lab</td>
</tr>
<tr>
<td>Main</td>
<td>Practical 3</td>
<td>Visual Programming Lab</td>
</tr>
<tr>
<td>Elective</td>
<td>Paper 1</td>
<td>(To Choose 1 out of 3)<br> A)Computer Architecture<br>
B)Discrete Mathematics<br> C)Operating System</td>
</tr>
<tr>
<td rowspan=7> 1 Year /2 Semester</td>
<td>Main</td>
<td>Paper 4</td>
<td>Visual Programming</td>
</tr>
<tr>
<td>Main</td>
<td>Paper 5</td>
<td>Computer Network</td>
</tr>
<tr>
<td rowspan=1>Compulsory Paper</td>
<td>Human Right</td>
</tr>
<tr>
<td>Main</td>
<td>Practical 1</td>
<td>Object Oriented Programming Lab</td>
</tr>
<tr>
<td>Main</td>
<td>Practical 2</td>
<td>Database Management System Lab</td>
</tr>
<tr>
<td>Main</td>
<td>Practical 3</td>
<td>Visual Programming Lab</td>
</tr>
<tr>
<td>Elective</td>
<td>Paper 1</td>
<td>(To Choose 1 out of 3)<br> A)E_Commerce<br> B)Software Engineering<br>
C)Network</td>
</tr>
</html>
STUDENT STRENGTH:-
<html>
<head>
<h4><center>Student Strength</h4>
<a href="Homepage.html">Home Page</a>
<h5>UG Student Strength</h5>
<table border=2 align=center>
<tr>
<th>Shift 1</th>
<th>Boys</th>
<th>Girls</th>
<th>Total</th>
</tr>
<th>B.Sc Student</th>
<tr>
<td>1 year</td><td>13</td><td>18</td>
</tr>
<tr>
<td>2 year</td><td>14</td><td>17</td>
</tr>
<tr>
<td>3 year</td><td>19</td><td>20</td>
</tr>
<tr>
<td colspan=2></td><td>Total</td><td>101</td>
</tr>
<tr>
<th>BCA Student</th>
</tr>
<tr>
<td>1 year</td><td>13</td><td>18</td>
</tr>
<tr>
<td>2 year</td><td>14</td><td>17</td>
</tr>
<tr>
<td>3 year</td><td>15</td><td>19</td>
</tr>
<tr>
<td colspan=2></td>
<td>Total</td>
<td>62</td>
</tr>
<tr>
<th>Shift 2</th>
<th>Boys</th>
<th>Girls</th>
<th>Total</th>
</tr>
<tr>
<th>B.Sc Student</th>
</tr>
<tr>
<td>1 year</td>
<td>14</td>
<td>18</td>
</tr>
<tr>
<td>2 year</td>
<td>15</td>
<td>17</td>
</tr>
<tr>
<td>3 year</td>
<td>19</td>
<td>20</td>
</tr>
<td colspan=2</td>
<td>Total</td>
<td>103</td>
</tr>
<th>BCA Student</th>
<tr>
<td>1 year</td>
<td>14</td>
<td>18</td>
</tr>
<tr>
<td>2 year</td>
<td>15</td>
<td>17</td>
</tr>
<tr>
<td colspan=2></td>
<td>Total</td>
<td>63</td>
</tr>
</table>
<h5>PG Student Strength</h5>
<table border=2 align=center>
<tr>
<th>Year</th>
<th>Boys</th>
<th>Girls</th>
<th>Total</th>
</tr>
<tr>
<th>M.Sc(CS)Student</th>
</tr>
<tr>
<td>1 Year</td>
<td>14</td>
<td>13</td>
</tr>
<tr>
<td>2 Year</td>
<td>15</td>
<td>16</td>
</tr>
<tr>
<td colspan=2></td>
<td>Total</td>
<td>58</td>
</tr>
<th>M.Sc(IT)Student</th>
</tr>
<tr>
<td>1 Year</td>
<td>14</td>
<td>17</td>
</tr>
<td>2 Year</td>
<td>9</td>
<td>9</td>
</tr>
<tr>
<td colspan=2></td>
<td>Total</td>
<td>49</td>
</tr>
</table></center>
</html>
OUTPUT:-
RESULT:-
AIM:-
ALGORITHM:-
RESULT:-
Thus the webpage was created for Order from using HTML Form Element.
Ex.No :4
Validating ClientSide Data
Date:
AIM:-
ALGORITHM:-
Step 2: Create the user name for Textbox1 and password forPassword1.
Step 3: Create the button for add data and clear data.
Step 4: When we add the data function add() will be called.In the function we are
checking for user name and Password.
Thus the webpage was created to validating the data in clientside by using
JavaScript.
Ex.No :5
Screen Saver Animation
Date:
AIM:-
ALGORITHM:-
Step 1: Create a webpage for display the Image’s using revealtrans Transition.
Step 2: It gives the fade in,fade out image method for revealtrans .
Step 3: When we call the function hide p1() to hide p3() and show P1() to show p3() based
on the Index value.
Step 4: Set the duration time for image’s using display theContinuously.
<body>
<a href="#" onclick="play()">
<script>
function play()
{
var audio = document.getElementById("audio");
audio.play();
}
</script>
<div id="panda"></div>
<div id="street"></div>
</a>
</body>
</html>
Pandapro.css
body
{
background: url(https://git.io/JUW4t);
background-size: cover;
overflow: hidden;
}
#panda
{
position:relative;
top:300px;
background: url(https://git.io/JUW4L);
width:250px;
height:330px;
animation:walking_animation 1s steps(12) infinite,move_forward 8s linear infinite;
}
@keyframes walking_animation
{
0%{background-position:0px;}
100%{background-position:3000px;}
}
@keyframes move_forward
{
0%{transform:translateX(-100px);}
100%{transform:translateX(1366px);}
#street
{
position:relative;
top:600px;
border-bottom:5px groove green;
}
OUTPUT: -
RESULT:-
AIM:-
To Create a webpage to display the text file contents using Data Binding concept in
DHTML.
ALGORITHM:-
<html>
<head>
<title>Dynamic RecordSet Viewing</title>
<object id="Colors" classid="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83">
<Param name="DataURL" value="htmlstandardcolor.txt"/>
<Param name="UseHeader" value="TRUE"/>
<Param name="TextQualifier" value="@"/>
<Param name="FieldDelim" value="|"/>
</object>
<script type="text/javascript"> var recordSet=Colors.recordset; function update()
{
h1Title.style.color=colorRGB.innerText;
}
function move(whereTo)
{
switch(whereTo)
{
case "first": recordSet.MoveFirst(); update();
break;
case "previous": recordSet.MovePrevious();if(recordSet.BOF) recordSet.MoveLast();
update();
break;
case "next": recordSet.MoveNext(); if(recordSet.EOF) recordSet.MoveFirst(); update();
break; case "last":
recordSet.MoveLast();update();
break;
}
}
</script>
<style type="text/css">
input{background-color:khaki;color:green;font-weight:bold}
</style>
</head>
<body style="background-color:white">
<h1 style="color:black" id="h1Title"> This is valar's web page</h1>
<span style="position:absolute;left:200;width:270;border-style:groove;text-align:Center;
background-color:cornsilk;padding:10">
<strong>Color Name:</strong>
<span id="ColorName" style="font-family:monospace"datasrc="#Colors"
datafld="ColorName">ABC
</span><br/>
<strong>Color RGB value:</strong>
<span id="colorRGB" style="font-family:monospace"datasrc="#Colors"
datafld="ColorHexRGBValue">ABC</span><br/>
<input type="button" value="First" onclick="move('first');"/>
<input type="button" value="Previous" onclick="move('previous');"/>
<input type="button" value="Next" onclick="move('next');"/>
<input type="button" value="Last" onclick="move('last');"/>
</span>
</body>
</html>
htmlstandardcolor.txt
@ColorName@|@ColorHexRGBValue@@aqua@|@#00FFF@ @black@|@#000000@
@blue@|@#0000FF@ @fuchsia@|@#FF00FF@ @gray@|@#808080@
@green@|@#008000@ @lime@|@#00ff00@ @maroon@|@#800000@
@navy@|@#000080@ @olive@|@#808000@ @purple@|@#800080@
@red@|@#FF0000@ @silver@|@#C0C0C0@ @teal@|@#008080@
@yellow@|@#FFFF00@
OUTPUT:-
RESULT:-
AIM:-
ALGORITHM:-
Step 2: To create a menubar “File” and menu item such as “New”, “Open”,”Close” and
“Quit”.
import java.io.*;
import java.awt.event.*;
import java.applet.*;
/*<applet code="menu" width=500 height=500>
</applet>*/
class SampleDialog extends Dialog implements ActionListener
{
SampleDialog(Frame parent,String title)
{
super(parent,title,false);
setLayout(new FlowLayout());
setSize(300,200);
add(new Label("press this button"));
Button b=new button("cancel"); add(b);
b.addActionListener(this);
}
public void actionPerformed(ActionEvent ae)
{
dispose();
{
public void paint(Graphics g)
{
g.drawString("this is in the dialog box",10,70)
}
}
class MenuFrame extends Frame
{
String msg="";
CheckboxMenuItem debug,test;
MenuFrame(String title)
{
super(title);
MenuBar mbar=new MenuBar();
setMenuBar(mBar);
Menu file=newMenu("File");
MenuItem item1,item2,item3,item4; f
ile.add(item1=new MenuItem("New..."));
file.add(item2=new MenuItem("Open.."));
file.add(item3=new MenuItem("Close..."));
file.add(new MenuItem("-"));
file.add(item4=new MenuItem("Quit..."));
mbar.add(file);
Menu edit=new Menu("Edit");
MenuItem item5,item6,item7;
edit.add(item5=new MenuItem("Cut..."));
edit.add(item6=new MenuItem("Copy..."));
edit.add(item7=new MenuItem("Paste..."));
edit.add(new MenuItem("-"));
Menu sub=new Menu("Special",true);
MenuItem item8,item9,item10; sub.add(item8=new MenuItem("First..."));
sub.add(item9=new MenuItem("Second.."));
sub.add(item10=new MenuItem("Third..."));
edit.add(debug);
test=new CheckboxMenuItem("Testing"); edit.add(test);
mbar.add(edit);
MyMenuHandler handler=new MyMenuHandler(this); item1.addActionListener(handler);
item2.addActionListener(handler);
item3.addActionListener(handler);
item4.addActionListener(handler);
item5.addActionListener(handler);
item6.addActionListener(handler);
item7.addActionListener(handler);
item8.addActionListener(handler);
item9.addActionListener(handler);
item10.addActionListener(handler);
debug.addItemListener(handler);
test.addItemListener(handler);
MyWindowAdapter adapter=new MyWindowAdapter(this);
addWindowListener(adapter);
}
public void paint(Graphics g)
{
g.drawString(msg,10,200);
if(debug.getStatic()) g.drawString("Debug is on",10,220);
else
g.drawString("Debug is off",10,220);
if(test.getState()) g.drawString("Testing is on",10,240);
else
g.drawString("Testing is off",10,240);
}
}
class MyWindowAdapter extends WindowAdapter
{
MenuFrame menuFrame;
public MyWindowAdapter(MenuFrame menuFrame)
{
this.menuFrame=menuFrame
}
public void WindowClosing(WindowEvent we)
{
menuFrame.dispose();
}
}
class MyMenuHandler implements ActionListener,ItemListener
{
MenuFrame menuFrame;
public MyWindowAdapter(MenuFrame menuFrame)
{
this .menuFrame=menuFrame
}
public void ActionPerformed(ActionEvent ae)
{
String msg="";
String arg=(String)ae.getActionCommand();
if(arg.equals("New..."))
{
msg+="New...";
SampleDialog d=new SampleDialog(menuFrame,"New Dialog box");
d.setVisible(true);
}
else
if(arg.equals("Open...")) msg+="Open...";
else
if(arg.equals("Close...")) msg+="Close";
else
if(arg.equals("Quit...")) msg+="Quit...";
else
if(arg.equals("Edit...")) msg+="Edit...";
else
if(arg.equals("Cut...")) msg+="Cut...";
else
if(arg.equals("Copy...")) msg+="Copy...";
else
if(arg.equals("Paste...")) msg+="Paste...";
else
if(arg.equals("First...")) msg+="First...";
else
if(arg.equals("Second...")) msg+="Second...";
else
if(arg.equals("Third...")) msg+="Third...";
else
if(arg.equals("Debug...")) msg+="Debug...";
else
if(arg.equals("Testing...")) msg+="Testing...";
menuFrame.msg=msg; menuFrame.repaint();
}
public void itemStateChanged(ItemEvent ie)
{
menuFrame.repaint();
}
}
public class menu extends Applet
{
Frame f;
public void init()
{
f=new MenuFrame("Menu Demo");
int width=Integer.parseInt(getParameter("width"));
int height=Integer.parseInt(getParameter("height"));
setSize(width,height);
f.setSize(width,height);
f.setVisible(true);
}
public void start()
{
f.setVisible(true);
}
public void stop()
{
f.setVisible(false);
}
}
OUTPUT:
RESULT:-
AIM:-
To design a webpage for library management using Java Applet and JDBC.
ALGORITHM:-
Step 1: Create a database for general library information with the field
Bookno,Bookname,Author,Editon and availability.
APPLICATION SIDE:-
Step 2: Get the data from database using the statementexecuteQurey(“select * from lib”)
.
import java.sql.*;
import java.sql.DriverManager.*;
import java.lang.*;
import java.lang.String.*;
import java.applet.*;
class Mydata
{
int bookno;
String bookname, author, edition, availability;
Connection conn;
Statement stmt;
ResultSet res;
Mydata()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:db","scott","tiger");
}
catch(Exception e)
{
System.out.println("Connection error");
}
}
void MyOut()
{
try
{
stmt=conn.createStatement();
res=stmt.executeQuery("select * from lib1");
System.out.println(" ------------------------ ");
System.out.println("\n bookno \tbookname\t author\t edition\t avilability\n");
System.out.println(" ----------------------");
while(res.next())
{
bookno=res.getInt(1);
bookname=res.getString(2);
author=res.getString(3);
edition=res.getString(4);
availability=res.getString(5);
System.out.println(bookno+"\t\t"+bookname+"\t\t"+author+"\t\t"+edition+"\
t\t"+availability);
}
res.close();
stmt.close();
conn.close();
}
catch(SQLException e)
{
System.out.println("Reading error");
}
}
}
class report1
{
public static void main(String args[])
{
Mydata m=new Mydata(); m.MyOut();
}
}
OUTPUT:-
RESULT:-
Thus the webpage for library management was desiged using Java Applet and
JDBC.
Ex.No :9
Implementation of RMI/RPC
Date:
AIM:-
ALGORITHM:-
Step 1:Write an interface program with method AddServerIntf that finds the sum of 2
values.
Step 2:Write an Implementation program to define the AddServerIntf with a method
AddServerImpl method.
Step 3:Write a server program rmiserver in which the instance of the implementation is
created.
Step 4:Create a register by issuing the ―start rmiregistry command at the command
prompt.
Step 5:Compile using the rmi compiler the implementation program for creation of the
stub and skeleton.
Step 6: Bind the implementation object to the registry and name it.
Step 7: Write a client program in which the inputs of two values are obtained from the
command line and the result is displayed.
Step 8:Stop.
Implementation of RMI/RPC
rmiserver.java:-
import java.rmi.*;
import java.rmi.registry.*;
import java.rmi.server.*;
import java.net.*;
import java.io.*;
public class rmiserver
{
public static void main(String args[])throws Exception
{
try
{
implement i=new implement();
Naming.rebind("server",i);
System.out.println("\nServer is ready");
}
catch(Exception e)
{
System.out.println("Exception:"+e);
}
}
}
interface.java:-
import java.rmi.*;
import java.rmi.server.*;
public interface inter extends Remote
{
public void fact(int n)throws RemoteException;
}
rmiclient.java:-
import java.rmi.*;
import java.rmi.registry.*;
import java.net.*;
import java.io.*;
public class rmiclient
{
public static void main(String args[])throws RemoteException
{
try
{
String host="rmi:/server";
inter a=(inter)Naming.lookup(host);
System.out.println("enter any number:");
DataInputStream dis=new DataInputStream(System.in);
int n=Integer.parseInt(dis.readLine());
a.fact(n);
}
catch(Exception e)
{
System.out.println("exception:"+e);
}
}
}
implement.java:-
import java.rmi.server.*;
import java.rmi.registry.*;
import java.rmi.*;
import java.io.*;
public class implement extends UnicastRemoteObject implements inter
{
public implement() throws RemoteException
{
}
public void fact(int n)throws RemoteException
{
int f=1;
for(int i=1;i<=n;i++) f=f*i;
System.out.println("the factorial of"+n+"is"+f);
}}
OUTPUT:
SERVER:
CLIENT:
RESULT:-
Thus the above program has been executed successfully.
Ex.No :10
ON-QUIZ Using Java Server Page
Date:
AIM:-
ALGORITHM:-
Step:4 We can check the given data is equal to correct answer thenthe mark is to be
assigned otherwise the result is zero.
Step:5 Finally the web page is to be displayed using the above statement.
ON_QUIZ Using Java Server Page
Onlinequiz.html
<html>
<head>
<title>Quiz</title>
</head>
<body bgcolor="white">
<marquee bgcolor="green">
<font color="yellow">
<h2>  Quiz from Expert Group</h2>
</font>
</marquee>
<br>
<form method="post" action="http://localhost:8085/Onlinequiz.jsp"> 1.find out the
connection?
<input type="radio"name="r1" value="cable">cable
<input type="radio"name="r1" value="protocol">protocol
<input type="radio"name="r1" value="port">port
<br>
2. find out the Output device?
<input type="radio"name="r2" value="pendrive">pendrive
<input type="radio"name="r2" value="speaker">speaker
<input type="radio"name="r2" value="keyboard">keyboard
<br>
3. find out the Input device?
<input type="radio"name="r3" value="projector">projector
<input type="radio"name="r3" value="mouse">mouse
<input type="radio"name="r3" value="printer">printer
<br>
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>
Onlinequiz.jsp
AIM:-
ALGORITHM:-
Step 5: Run the program for Appache Tomcat7.0. Step 6: Stop the program.
Request Page Header Details
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class req extends HttpServlet
{
public void doGet(HttpServletRequest req,HttpServletResponse res)throws
IOException,ServletException
{
printHeader(req,res);
}
public void doPost(HttpServletRequest req,HttpServletResponse res)throws
IOException,ServletException
{
printHeader(req,res);
}
public void printHeader(HttpServletRequest req,HttpServletResponse res)throws
IOException,ServletException
{
String header=null;
String head="<html><head><title>Header Information</title></head><body>";
String foot="</body></html>";
res.setContentType("text/html");
PrintWriter pw=res.getWriter();
Enumeration enumeration=req.getHeaderNames();
pw.println(head);
pw.println("<h2>Header Information</h2>/");
//pw.println("<B>RequestMethod:</B>"
//+req.getMethod()++"<BR>\n"+"<B>Request
Protocol:</B>"+req.getProtocol()+"<BR><BR>\n");pw.println("<table>");
while(enumeration.hasMoreElements())
{
header=(String)enumeration.nextElement();
if(header!=null)
{
pw.println("<tr><td><b>"+header+"</td>");
pw.println("<td>"+req.getHeader(header)+"</td></tr>");
}
}
pw.println("</table><br>");pw.println(foot);
}
}
OUTPUT:
RESULT:-
AIM:-
ALGORITHM:-
RESULT:-