IP Lab Coding329
IP Lab Coding329
No:20609104329
PROGRAM:
[Link]
<html>
<head>
<title>WEB PAGE</title>
</head>
<frameset rows="18%,*,5%" bordercolor="RED">
<frame src="[Link]"/>
<frameset cols="20%,*">
<frame src="[Link]" name="f2"/>
<frame src="[Link]" name="f3"/>
</frameset>
<frame src="[Link]"/>
</frameset>
<body>
</body>
</html>
[Link]
<html>
<head>
<title>Frame1</title>
</head>
<body bgcolor="INDIYA">
<center>
<font color="black" size="5" face="Monotype Corsiva">
CS2358 INTERNET PROGRAMMING LAB [Link]
[Link]
<html>
<body bgcolor=”indiga”>
<br><br>
<center>
<b><i>Click Here</i></b><br><br>
<a href="[Link]" target="f3"><h3><font color=black>Introduction</font></h3></a>
<a href="[Link]" target="f3"><h3><font color=black>ContactUs</font></h3></a>
<a href="[Link]" target="f3"><h3><font color=black>FeedBack</font></h3></a>
<a href="[Link]" target="f3"><h3><font color=black>Album</font></h3></a>
</center>
</body>
</html>
CS2358 INTERNET PROGRAMMING LAB [Link]
[Link]
<html>
<head>
<title>Album</title>
</head>
<body>
<p align="right">CopyRights@Maamallan Institute Of Technology</p>
</body>
</html>
[Link]
<html>
<head>
<title>Introduction</title>
</head>
<body bgcolor="facbdefgh">
<br> <br><br>
<font color="black" face="Courier New">Maamallan Institute of Technology was formed by
our belowed chairmen [Link] M.A,B.L,Phd., </font>
</body>
</html>
[Link]
<html>
<head>
<title>feedback</title>
</head>
<body>
<center>
CS2358 INTERNET PROGRAMMING LAB [Link]
<option>Canada</option>
<option>Pakistan</option>
<option>Bangaladesh</option>
</select>
</td>
</tr>
<tr>
<td>Hobbies</td>
<td>
<input type="checkbox" name="chkplaying" />playing
<input type="checkbox" name="chkreading" />Reading
<input type="checkbox" name="chkpainting"/>Painting
</td>
</tr>
<tr>
<td>Feed back</td>
<td><textarea name="ta"></textarea></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" name="btnSave" value="Save" />
</td>
</tr>
</table>
</center>
</body>
</html>
CS2358 INTERNET PROGRAMMING LAB [Link]
[Link]
<html>
<head>
<title>Album</title>
</head>
<body>
<font size="12">My Favorite Picture<font>
<img src="[Link]" width="200" height="150"/>
</body>
</html>
[Link]
<html>
<head>
<title>Biodata</title>
</head>
<body>
<center>
<table border="1">
<tr>
<td width="25%"> Name </td>
<td width="75%"> MAAMALLAN INSTITUTE OF TECHNOLOGY</td>
</tr>
<tr>
<td>Address </td>
<td>Maamallan Nagar,Vada Mangalam,<br />Sriperumpudhur. </td>
</tr>
<tr>
<td>Website</td>
CS2358 INTERNET PROGRAMMING LAB [Link]
<td>[Link]</td>
</tr>
<tr>
<td>Eemail</td>
<td>maamallancollege@[Link]</td>
</tr>
</table>
</center>
</body>
</html>
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
CS2358 INTERNET PROGRAMMING LAB [Link]
[Link] MAPPING
PROGRAM:
[Link]
<html>
<head>
<title> World Information </title>
</head>
<body>
<map name="world">
<img height=300 width=800 src = "..\..\images\[Link]" ismap usemap=#world>
<area name="asia" shape="rect" coords="520,20,730,185" href="[Link]">
<area name="measia" shape="circle" coords="480,125,30" href="[Link]">
<area name="samerica" shape = "circle" coords="235,200,55" href="[Link]">
<area name="africa" shape="circle" coords="420,180,55" href="[Link]">
<area name="namerica" shape = "rect" coords="55,15,325,180" href="[Link]">
<area name="europe" shape = "rect" coords="335,40,495,85" href="[Link]">
<area name="australia" shape="rect" coords="615,185,750,275" href="[Link]">
</map>
<h3> General information about our world <h3>
<small><i>
<ul>
<li> Most populated country : China Population 1,307,000,000</li>
<li>world's tallest mountain, Mt Everest in Nepal 29,025 ft. (8.850 m)</li>
<li>world's lowest point, found in the Dead Sea, Israel/Jordan, at 1,286 ft (392m)
below sea level</li>
<li>world's deepest lake Lake Baykal, Siberia, Russia, 5369 ft (1637 m)</li>
<li>worlds longest river nile river 4,160 miles (6,693 km) in length</li>
<li>worlds largest desert sahara desert approximately 3,500,000 sq. miles (9,065,000
sq. km)</li>
CS2358 INTERNET PROGRAMMING LAB [Link]
<li>World's longest coast line: coast line in Canada longest at 243792 km (151485
miles)</li>
<li>Worlds's largest city: Tokyo, Japan (35327000 )</li>
</ul>
</i></small>
</body>
</html>
[Link]
<html>
<head>
<title>AFRICA</title>
</head>
<body>
<h3 align=center>Africa includes 53 individual countries</h3>
<img align="left" src="..\..\images\[Link]" height=320 width=320></img><br>
<table border=0>
<tr>
<th align=left>Continent Size:</th>
<td align=left>30,065,000 sq km (11,608,000 sqm)</td>
</tr>
<tr>
<th align=left>Percent of Earth's Land:</th>
<td align=left>20.2%</td>
</tr>
<tr>
<th align=left>Total Population:</th>
<td>877,500,000</td>
</tr>
<tr>
CS2358 INTERNET PROGRAMMING LAB [Link]
<td align=right>
<small><i>58,317,930</i></small>
</td>
</tr>
<tr>
<td><small><i>South Africa</i></small></td>
<td align=right>
<small><i>44,448,470</i></small>
</td>
</tr>
<tr>
<td><small><i>Sudan</i></small></td>
<td align=right>
<small><i>39,148,162</i></small>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
PROGRAM:
<html>
<head>
<title>INTERNAL CSS</title>
<style type="text/css">
body
{
COLOR:red;
FONT-FAMILY: 'Arial';
BACKGROUND: yellow;
}
p
{
MARGIN-LEFT:25 px;
COLOR:BLUE;
}
ul
{
MARGIN-LEFT:35px;
COLOR:'green';
FONT-FAMILY: 'VERDANA';
}
</style>
</head>
<body>
<p align=center>
CS2358 INTERNET PROGRAMMING LAB [Link]
<strong><u> PG COURSES</u></strong>
</p>
<ul>
<li>MCA</li>
<li>MBA</li>
</ul>
</body>
</html>
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
[Link]
body
{
background:YELLOW;
FONT-FAMILY:'Elephant';
}
p
{
MARGIN-LEFT:25px;
COLOR:green;
}
CS2358 INTERNET PROGRAMMING LAB [Link]
[Link]
<html>
<head>
<title>this is PG course</title>
</head>
<body>
<li>MCA</li>
<li>MBA</li>
</body>
</html>
[Link]:
<html>
<head>
<title>this is UG course</title>
</head>
<body>
<li>CSE</li>
<li>IT</li>
<li>ECE</li>
<li>MECH</li>
</body>
</html>
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
PROGRAM:
<html>
<head>
<title>Validating Form Controls</title>
<style type="text/css">
table
{
border:1px solid black;
width:70%;
height:50%;
}
</style>
<script type="text/javascript" language="javascript">
function DoValidation()
{
if([Link]=="")
{
alert("Please Enter the User Name");
[Link]();
return false;
}
if([Link]=="")
{
alert("Please Enter the Password");
[Link]();
return false;
}
else if([Link]=="")
CS2358 INTERNET PROGRAMMING LAB [Link]
{
alert("Please Enter the Confirm Password");
[Link]();
return false;
}
if([Link]<6 || [Link]<6)
{
alert("Password Should have atleast 6 characters");
return false;
}
if([Link] !=[Link])
{
alert("Confirm Pwd Should same as ur password");
[Link]();
return false;
}
if([Link] =="")
{
alert("Please Enter the Email.");
[Link]();
return false;
}
else if([Link] !="")
{
if([Link]('@')<=0)
{
alert("Your email format is incorrect");
[Link]();
return false;
CS2358 INTERNET PROGRAMMING LAB [Link]
}
else if([Link]('.')<=0)
{
alert("Your email format is incorrect");
[Link]();
return false;
}
}
if([Link]=="")
{
alert("Please Enter the Phone No");
[Link]();
return false;
}
else if([Link]!="")
{
if(isNaN([Link]))
{
alert("Please Enter the Phone No Correctly");
[Link]();
return false;
}
else if([Link]!=10)
{
alert("Please Enter the Phone No Correctly 10 digits");
[Link]();
return false;
}
}
CS2358 INTERNET PROGRAMMING LAB [Link]
if([Link]=="")
{
alert("Please Enter the Address");
[Link]();
return false;
}
if([Link]==0)
{
alert("Please Select the Nationality");
[Link]();
return false;
}
if([Link]=="")
{
alert("Please Browse and Upload your Photo");
[Link]();
return false;
}
if([Link]==false)
{
alert("Please Accept the terms and condition");
[Link]();
return false;
}
else
{
alert("Your REcords saved Corrctly");
return false;
}
CS2358 INTERNET PROGRAMMING LAB [Link]
}
function sel()
{
alert([Link][[Link]].value);
}
</script>
</head>
<body>
<form name="frm">
<table align="center">
<tr>
<td>User Name :</td>
<td><input type="text" name="txtName" /></td>
</tr>
<tr>
<td>Password :</td>
<td><input type="password" name="txtPwd" /></td>
</tr>
<tr>
<td>Confirm Password :</td>
<td><input type="password" name="txtConPwd" /></td>
</tr>
<tr>
<td>E mail:</td>
<td><input type="text" name="txtEmail" /></td>
</tr>
<tr>
<td>Phone :</td>
<td><input type="text" name="txtPh" /></td>
CS2358 INTERNET PROGRAMMING LAB [Link]
</tr>
<tr>
<td>Address :</td>
<td><textarea name="txtAddress" cols="15" rows="4"></textarea></td>
</tr>
<tr>
<td>Nationality :</td>
<td><select name="cmbNationality" onchange="sel();">
<option value="Select">Select</option>
<option value="India">India</option>
<option value="US">US</option>
<option value="SL">Sri Lanka</option>
<option value="China">China</option>
<option value="Eng">England</option>
</select>
</td>
</tr>
<tr>
<td>Gender :</td>
<td>
<input type="radio" checked="checked" value="Male" name="rdGender" />Male
<input type="radio" value="FeMale" name="rdGender" />FeMale
</td>
</tr>
<tr>
<td>Photo :</td>
<td><input type="file" name="filePhoto" /></td>
</tr>
<tr>
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
PROGRAM:
/* <applet code=TextApplet height=300 width=400> </applet>*/
import [Link].*;
import [Link].*;
import [Link].*;
repaint();
}
public void paint(Graphics g)
{
[Link](msg,6,100);
}
}
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
PROGRAM:
/* <applet code=palette height=600 width=600>
</applet> */
import [Link].*;
import [Link].*;
import [Link].*;
public class palette extends Applet implements ActionListener,ItemListener
{
Button[] colors;
Checkbox foreground,background;
TextArea workarea;
CheckboxGroup cbg;
Panel buttonpanel,checkpanel,palettepanel;
String colour;
public void init()
{
buttonpanel=new Panel();
[Link](new GridLayout(3,3));
colors=new Button[9];
colors[0]=new Button("RED");
colors[1]=new Button("GREEN");
colors[2]=new Button("BLUE");
colors[3]=new Button("CYAN");
colors[4]=new Button("ORANGE");
colors[5]=new Button("WHITE");
colors[6]=new Button("BLACK");
colors[7]=new Button("YELLOW");
colors[8]=new Button("PINK");
CS2358 INTERNET PROGRAMMING LAB [Link]
for(int i=0;i<9;i++)
{
colors[i].addActionListener(this);
[Link](colors[i]);
}
checkpanel=new Panel();
[Link](new FlowLayout());
cbg=new CheckboxGroup();
foreground=new Checkbox("ForeGround",cbg,true);
background=new Checkbox("BackGround",cbg,false);
[Link](this);
[Link](this);
[Link](foreground);
[Link](background);
workarea=new TextArea(8,40);
[Link](new Font("Garamond",[Link],20));
palettepanel=new Panel();
[Link](new BorderLayout());
[Link](workarea,[Link]);
[Link](checkpanel,[Link]);
[Link](buttonpanel,[Link]);
add(palettepanel);
}
public void itemStateChanged(ItemEvent ie)
{
}
public void actionPerformed(ActionEvent ae)
{
colour=[Link]();
CS2358 INTERNET PROGRAMMING LAB [Link]
if([Link]()==true)
[Link](getColour());
if([Link]()==true)
[Link](getColour());
}
public Color getColour()
{
Color mycolor=null;
if([Link]("RED"))
mycolor=[Link];
if([Link]("GREEN"))
mycolor=[Link];
if([Link]("BLUE"))
mycolor=[Link];
if([Link]("CYAN"))
mycolor=[Link];
if([Link]("ORANGE"))
mycolor=[Link];
if([Link]("WHITE"))
mycolor=[Link];
if([Link]("BLACK"))
mycolor=[Link];
if([Link]("YELLOW"))
mycolor=[Link];
if([Link]("PINK"))
mycolor=[Link];
return mycolor;
}
}
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
PROGRAM:
Html
<html>
<head>
<title> Invoking Servlet From Html </title>
</head>
<body>
<form action = "[Link] method="GET">
<p>Press the button to invoke servlet<p>
<input type="submit" value="Go for it!">
</form>
</body>
</html>
Servlet
[Link]
import [Link].*;
import [Link].*;
import [Link].*;
public class SampleServlet extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException
{
PrintWriter out;
try
{
out= [Link]();
CS2358 INTERNET PROGRAMMING LAB [Link]
[Link]("<html>
<head>
<title> Response From Servlet<title>
</head>
<body>
<h3>This Text Is Generated By Invoked Servlet </h3>
</body>
</html>");
}
catch(IOException ie)
{
[Link]();
}
}
}
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
7 a) ONLINE EXAMINATION
PROGRAM:
[Link]
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[Link]
<%@page language ="java" import="[Link].*"%>
<%@page import="[Link].*"%>
<%@ page import="[Link].*"%>
<%
String SeatNum,Name;
String ans1,ans2,ans3,ans4,ans5;
int a1,a2,a3,a4,a5;
a1=a2=a3=a4=a5=0;
Connection connect=null;
Statement stmt=null;
ResultSet rs=null;
[Link]("[Link]");
String url="jdbc:odbc:MyDsn";
connect=[Link](url);
if([Link]("action")!=null)
{
SeatNum=[Link]("Seat_no");
Name=[Link]("Name");
ans1=[Link]("group1");
if([Link]("True"))
a1=a2;
else
a1=0;
CS2358 INTERNET PROGRAMMING LAB [Link]
ans2=[Link]("group2");
if([Link]("True"))
a2=0;
else
a2=2;
ans3=[Link]("group3");
if([Link]("True"))
a3=0;
else
a3=2;
ans4=[Link]("group4");
if([Link]("True"))
a4=2;
else
a4=0;
ans5=[Link]("group5");
if([Link]("True"))
a5=0;
else
a5=2;
int Total=a1+a2+a3+a4+a5;
stmt=[Link]();
String query= "INSERT INTO Exam(SeatNum,Name,Total) VALUES
("+SeatNum+",'"+Name+"',"+Total+")";
int result=[Link](query);
[Link]();
stmt=[Link]();
query="SELECT * FROM Exam WHERE Name='"+Name+"'";
rs=[Link](query);
%>
CS2358 INTERNET PROGRAMMING LAB [Link]
<html>
<head>
<title>Student Mark List</title>
</head>
<body bgcolor=khaki>
<center>
<h2>Student MarkSheet</h2>
<h3>Name of the College:ABC College of Engineering</h3>
<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td><b>Seat_No</b></td>
<td><b>Name</b></td>
<td><b>Marks</b></td>
</tr>
<%
while([Link]())
{
%>
<tr>
<td><%=[Link](2)%></td>
<td><%=[Link](3)%></td>
<td><%=[Link](4)%></td>
</tr>
<%
}
[Link]();
[Link]();
[Link]();
%>
CS2358 INTERNET PROGRAMMING LAB [Link]
</table>
</center>
<br/><br/><br/>
<table>
<tr>
<td><b>Date:<%= new [Link]().toString()%></b></td>
</tr>
<tr>
<td><b>Signature:X.Y.Z</b></td>
</tr>
</table>
<a href="[Link] here to go back</a>
</body>
</html>
<%
}
Else
{
%>
<html>
<head>
<title>Online Examination</title>
<script language="javascript" type="text/javascript">
function validation(Form_obj)
{
if(Form_obj.Seat_no.[Link]==0)
{
alert("Please fill up the seat number");
Form_obj.Seat_no.focus();
CS2358 INTERNET PROGRAMMING LAB [Link]
return false;
}
if(Form_obj.[Link]==0)
{
alert("Please fill up the name");
Form_obj.[Link]();
return false;
}
return true;
}
</script>
</head>
<body bgcolor=lightgreen>
<center><h1>Online Examination</h1></center>
<form action="[Link]" method="post" name="entry" onSubmit="return
validation(this);">
<input type="hidden" value="list" name="action">
<table>
<tr>
<td><h3>Seat Number</h3></td>
<td><input type="tex" name="Seat_no"></td>
</tr>
<tr>
<td><h3> Name</h3></td>
<td><input type="text" name="Name" size=50></td>
</tr>
<hr/>
<tr>
<th>Total Marks :10(Each question carries equal marks)</th>
<td><b>Time:15 min</b></td>
CS2358 INTERNET PROGRAMMING LAB [Link]
</tr>
</table>
<hr/>
<b>[Link] is an open source web server</b><br/>
<input type="radio" name="group1" value="True">True
<input type="radio" name="group1" value="False">False<br>
<b>[Link] modern PC there is no cache memory</b><br/>
<input type="radio" name="group2" value="True">True
<input type="radio" name="group2" value="False">False<br>
<b>[Link]-Berner Lee is the originator of java</b><br/>
<input type="radio" name="group3" value="True">True
<input type="radio" name="group3" value="False">False<br>
<b>[Link] is not a video file extension</b><br/>
<input type="radio" name="group4" value="True">True
<input type="radio" name="group4" value="False">False<br>
<b>[Link] is a stateful protocol</b><br/>
<input type="radio" name="group5" value="True">True
<input type="radio" name="group5" value="False">False<br>
<center>
<input type="submit" value="Submit">
<input type="reset" value="Clear">
</center>
</form>
</body>
</html>
<%
}
%>
CS2358 INTERNET PROGRAMMING LAB [Link]
TABLE DESIGN:
Exam(Table in MS Access)
Table Name:Exam
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT
CS2358 INTERNET PROGRAMMING LAB [Link]
PROGRAM
[Link]
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
public class register extends HttpServlet
{
public void doGet(HttpServletRequest req,HttpServletResponse resp)
{
try
{
[Link]("text/html");
PrintWriter out=[Link]();
[Link]("[Link]");
Connection con=[Link]("jdbc:odbc:student");
Statement stmt=[Link]();
String regno=[Link]("txtreg");
String name=[Link]("txtname");
String age=[Link]("txtage");
int a=[Link](age);
String mark1=[Link]("txtMark1");
String mark2=[Link]("txtMark2");
String mark3=[Link]("txtMark3");
int m1=[Link](mark1);
int m2=[Link](mark2);
int m3=[Link](mark3);
CS2358 INTERNET PROGRAMMING LAB [Link]
[Link]
<html>
<head>
<title>Student Mark List</title>
</head>
<body>
<form method="GET" action="http:\\localhost:8080\examples\servlet\register">
<h1 align="center">Student Mark List</h1>
<table align="center">
<tr>
<td>Enter your Reg no:</td>
<td><input type="text" name="txtreg"/></td>
</tr>
<tr>
<td>Enter your Name:</td>
<td><input type="text" name="txtname"/></td>
</tr>
<tr>
<td>Enter your Age:</td>
<td><input type="text" name="txtage"/></td>
</tr>
<tr>
<td>Enter your Mark1:</td>
<td><input type="text" name="txtMark1"/></td>
</tr>
<tr>
<td>Enter your Mark2:</td>
<td><input type="text" name="txtMark2"/></td>
</tr>
CS2358 INTERNET PROGRAMMING LAB [Link]
<tr>
<td>Enter your Mark3:</td>
<td><input type="text" name="txtMark3"/></td>
</tr>
<tr>
<td colspan="2" align="center"><input value="submit"/></td>
</tr>
</table>
</form>
</body>
</html>
CS2358 INTERNET PROGRAMMING LAB [Link]
TABLE DESIGN:
Student(Table in MS Access)
Table Name:Student
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
[Link]
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="[Link]"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
<cd>
<title>Greatest Hits</title>
<artist>Dolly Parton</artist>
<country>USA</country>
<company>RCA</company>
<price>9.90</price>
<year>1982</year>
</cd>
<cd>
CS2358 INTERNET PROGRAMMING LAB [Link]
<year>1973</year>
</cd>
<cd>
<title>Maggie May</title>
<artist>Rod Stewart</artist>
<country>UK</country>
<company>Pickwick</company>
<price>8.50</price>
<year>1990</year>
</cd>
<cd>
<title>Romanza</title>
<artist>Andrea Bocelli</artist>
<country>EU</country>
<company>Polydor</company>
<price>10.80</price>
<year>1996</year>
</cd>
<cd>
<title>When a man loves a woman</title>
<artist>Percy Sledge</artist>
<country>USA</country>
<company>Atlantic</company>
<price>8.70</price>
<year>1987</year>
</cd>
<cd>
<title>Black angel</title>
<artist>Savage Rose</artist>
CS2358 INTERNET PROGRAMMING LAB [Link]
<country>EU</country>
<company>Mega</company>
<price>10.90</price>
<year>1995</year>
</cd>
<cd>
<title>1999 Grammy Nominees</title>
<artist>Many</artist>
<country>USA</country>
<company>Grammy</company>
<price>10.20</price>
<year>1999</year>
</cd>
<cd>
<title>For the good times</title>
<artist>Kenny Rogers</artist>
<country>UK</country>
<company>Mucik Master</company>
<price>8.70</price>
<year>1995</year>
</cd>
</catalog>
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
SampleServlet .java
import [Link].*;
import [Link].*;
import [Link].*;
public class SampleServlet extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException
{
PrintWriter out;
try
{
out= [Link]();
[Link]("<html> <head> <title> Response From Servlet </title>
</head> <body> <p> <h3> This Text Is Generated By Invoked Servlet
</h3> </body> </html>");
}
catch(IOException ie)
{
[Link]();
}
}
}
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT:
CS2358 INTERNET PROGRAMMING LAB [Link]
STEPS:
1. OpenNetBeansIDECreate a New Project
Now One Solution Explorer Will Open in left Side of the Net Beans Tool
1. [Link]
2. [Link]
CS2358 INTERNET PROGRAMMING LAB [Link]
PROGRAM:
MyWebService
package myp;
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
/**
*
* @author JuanAashish
*/
@WebService()
public class MyWebService
{
/**
* Web service operation
*/
@WebMethod(operationName = "Add")
public Integer Add(@WebParam(name = "a")
int a, @WebParam(name = "b")
int b)
{
//TODO write your implementation code here:
return a+b;
}
/**
CS2358 INTERNET PROGRAMMING LAB [Link]
/**
* Web service operation
*/
CS2358 INTERNET PROGRAMMING LAB [Link]
@WebMethod(operationName = "operation")
public String operation()
{
//TODO write your implementation code here:
return null;
}
}
TABLE DESIGN:
Table: Airline
CS2358 INTERNET PROGRAMMING LAB [Link]
OUTPUT