Вы находитесь на странице: 1из 51

1.

Develop static pages of an online Book Store by only using HTML (the pages should
resemble:www.amazon.com). The website should consist the following pages.
a. Home Page
b. Registration and User Login
c. Books Catalog
HomePage.html
Home page
Main.html:

<html>
<head>
<title>
Amazon</title>
</head>
<body bgcolor="cyan"> <center>
<strong><h1>Welcome to AMAZON</h1></strong>
<form method="post" action="login.html" target=_blank >
<h4>for books</h4><input type="submit" value="click here">
</form>
</center>
</body>
</html>
Registration and user Login
Registration.html
<html>
<head>
<title> form</title>
</head>
<body bgcolor=blue text=white>
<h1 align=center>creat your email id </h1>
<marquee><h2>this is google web page </h2></marquee>
<pre>
<form>
<b>
<h3>
first name <input type="text"></input><br>
second name <input type="text"></input><br>
email id <input type="text"></input><br>
password<input type="password"><br>
conform password <input type="password"><br>
gender
<input type="radio"name="radio"
value="radio">female</input>
<input type="radio"name="radio"
value="radio">male</input>
dateofbirth <br>
Y.Kiran Kumar

Page 1

day<input type="date"size="2"
></input>month<select name=month>
<option>jan
<option>feb
<option>mar
<optin>apr
<option>may
<option>june
<option>july
<opiton>aug
<option>sep
<option>oct
<option>nov
<option>dec
</select></input>year<select name=year>
<option>1986
<option>1987
<option>i988
</select></input>
select your country:<select name =country>
<option> usa
<option> india
<option> africa
</select><br>
area of interrest ::<br><br>
entertainment<input type="check box" value ="c1"></input>
games
<input type="check box" value="c2"></input>
select your qusetion<select name=question>
<option>what is your pet name?
<option>what is your favorite food ?
<option>what is your aim?
answer
comment:

</select><br>
<input type="text"><br>

<text area></text area>


<br>
<input type="reset" name ="reset" value ="reset"></input>
<input type="submit" name="submit" value="submit"></input>
</h3>
</input>
</b>
</form>
</body>
</html>
Y.Kiran Kumar

Page 2

Output:

Login.html:
<html>
<head>
<title>
login page</title>
</head>
<body bgcolor="cyan"> <center>
<strong><h1> AMAZON </h1></strong></center>
<right>
<table align="right">
<tr>
<td><h4>user name</td>
<td><input type="text" ></td>
<td></td>
</tr>
<tr>
<td><h4>password</td>
<td><input type="password"></td>
<td></td>
</tr>
Y.Kiran Kumar

Page 3

<tr>
<td>
<form method="post" action="catalog.html" >
<input type="submit" value="submit" >
</form>
</td>
<td>
<form method="post" action="userpro.html" >
<input type="submit" value="register" >
&nbsp;&nbsp;
<input type="reset" value="reset"></form></td>
</tr>
</table>
</body>
</html>
Books catalog
Catalog.html:
<html>
<head>
<title>
books catalog</title>
</head>
<body bgcolor="cyan">
<center><h1>AMAZON</h1></center>
<form method="post" action="shopping.html">
<left>
<table>
<tr>
<td><b><h3>frontend books</td>
<td></td></tr>
<tr>
<td></td>
<td><h4>C&Ds</td>
</tr>
<tr>
<td></td>
<td><h4>Ads</td>
</tr>
<tr>
<td></td>
<td><h4>JAVA
</td></tr>
<tr>
<td><b><h3>backend books</td>
<td></td>
</tr>
<tr>
Y.Kiran Kumar

Page 4

<td></td>
<td><h4>Oracle</td>
</tr>
<tr>
<td></td>
<td><h4>Ms SQL Server
</td></tr>
<tr>
<td></td>
<td><h4>MySql </td>
</tr>
</table>
</h4>
<center>
<b>for buy one of these books
<br>
</b><input type="submit" value="click here">
</center>
</form>
</body>
</html>
Main.html:

Y.Kiran Kumar

Page 5

Login.html:

Catalog.html:

2. Design and develop a Feedback form using JavaScript.


<html>
<head>
<title>feed back form</title>
Y.Kiran Kumar

Page 6

<script type="text/javascript">
FUNCTION CALSCORE()
{
var SCORE=0;
IF(document.feedback.q1[0].CHECKED)
SCORE=SCORE+5;
IF(document.feedback.q1[0].CHECKED)
SCORE=SCORE+5;
IF(document.feedback.q1[1].CHECKED)
SCORE=SCORE+3;
IF(document.feedback.q1[2].CHECKED)
SCORE=SCORE+2;
IF(document.feedback.q1[3].CHECKED)
SCORE=SCORE+1;
IF(document.feedback.q2[0].CHECKED)
SCORE=SCORE+5;
IF(document.feedback.q2[1].CHECKED)
SCORE=SCORE+3;
IF(document.feedback.q2[2].CHECKED)
SCORE=SCORE+2;
IF(document.feedback.q2[3].CHECKED)
SCORE=SCORE+1;
IF(document.feedback.q3[0].CHECKED)
SCORE=SCORE+5;
IF(document.feedback.q3[1].CHECKED)
SCORE=SCORE+3;
IF(document.feedback.q3[2].CHECKED)
SCORE=SCORE+2;
IF(document.feedback.q3[3].CHECKED)
SCORE=SCORE+1;
IF(document.feedback.q4[0].CHECKED)
SCORE=SCORE+5;
IF(document.feedback.q4[1].CHECKED)
SCORE=SCORE+3;
IF(document.feedback.q4[2].CHECKED)
SCORE=SCORE+2;
IF(document.feedback.q4[3].CHECKED)
SCORE=SCORE+1;
IF(document.feedback.q5[0].CHECKED)
SCORE=SCORE+5;
IF(document.feedback.q5[1].CHECKED)
SCORE=SCORE+3;
IF(document.feedback.q5[2].CHECKED)
SCORE=SCORE+2;
IF(document.feedback.q5[3].CHECKED)
SCORE=SCORE+1;
Y.Kiran Kumar

Page 7

window.alert("totalscore" +SCORE);
}
</script>
</head>
<body>
<h1><p style ="color ;pink;margin:20px">
<center>feed back form</center>
</p>
</h1>
<form name="feedback" onsubmit="CALSCORE()">
lecture name:<input type=text name=n2 size=10 value=" "><br>
subject:<input type=text name=n2 size=10 value=" "><br>
1.communication skills<br>
<input type=radio name=q1>excelent
<input type=radio name=q1>very good
<input type=radio name=q1>good
<input type=radio name=q1>average<br><br>
2.subject knowledge<br>
<input type=radio name=q2>excelent
<input type=radio name=q2>very good
<input type=radio name=q2>good
<input type=radio name=q2>average<br><br>
3.clarification of doubts.<br>
<input type=radio name=q3>excelent
<input type=radio name=q3>very good
<input type=radio name=q3>good
<input type=radio name=q3>average<br><br>
4.other knowledge.<br>
<input type=radio name=q4>excelent
<input type=radio name=q4>very good
<input type=radio name=q4>good
<input type=radio name=q4>average<br><br>
5.overall grading<br>
<input type=radio name=q5>excelent
<input type=radio name=q5>very good
<input type=radio name=q5>good
<input type=radio name=q5>average
<input type=button name="submit" value="submit" onclick=calscore()>
</form>
</body>
</html>

Y.Kiran Kumar

Page 8

OutPut:

3. Validate the Registration and User Login pages of program 1.


Home page:
Main.html:
<html>
<frameset rows="25%,*">
<frame src="top.html" name="top" scrolling ="no" frameborder ="0">
<frameset cols="25%,75%">
<frame src="left.html" name="left" scrolling ="no" frameborder ="0">
<frame src="right.html" name="right" scrolling ="auto" frameborder ="0">
</frameset>
</frameset>
</html>
Top.html:
<html>
<body bgcolor="pink">
<br><br>
<marquee><h1 align=center><b><u>ONLINE BOOK
STORAGE</u></b></h1></marquee>
Y.Kiran Kumar

Page 9

</body>
</html>
Right.html:
<html>
<body>
<br><br><br><br><br>
<h2 align="center">
<b><p> welcome to online book storage. Press login if you are
having id otherwise press registration.
</p></b></h2>
</body> </html>
Left.html:
<html>
<body bgcolor="pink">
<h3>
<ul>
<li><a href="login.html" target="right"><font color="black">
LOGIN</font></a></li><br><br>
<li><a href="profile.html" target="right"><font color="black">
USER PROFILE</font></a></li><br><br>
<li><a href="catalog.html" target="right"><font color="black">
BOOKS CATALOG</font></a></li><br><br>
<li><a href="scart.html" target="right"><font color="black">
SHOPPINGCART</font></a></li><br><br>
<li><a href="payment.html" target="right"><font color="black">
PAYMENT</font></a></li><br><br>
<br><br>
</ul>
</body>
</html>
Registration and user Login
Login.html:
<html>
<body bgcolor="pink"><br><br><br>
<script language="javascript">
function validate()
{
var flag=1;
if(document.myform.id.value==""||
document.myform.pwd.value=="")
{ alert("LoginId and Password must be filled")
flag=0;
}i
f(flag==1)
{ alert("VALID INPUT");
window.open("catalog.html","right");
Y.Kiran Kumar

Page 10

} else
{ alert("INVALID INPUT");
//document.myform.focus();
}}
</script>
<form name="myform">
<div align="center"><pre>
LOGIN ID:<input type="text" name="id"><br>
PASSWORD:<input type="password" name="pwd"><br><br>
</pre>
<input type="button" value="ok" onClick="validate()">&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" value="clear" >
</div>
</form>
</body>
</html>
Catalog.html:
<html>
<body bgcolor="pink"><br><br><br>
<script language="javascript">
function validate()
{
var flag=1;
if(document.myform.id.value==""||
document.myform.title.value==""||
document.myform.no.value==""||
document.myform.cost.value=="")
{
flag=0;
}
str=document.myform.title.value;
var str1=document.myform.cost.value;
if(!((str=="c"&& str1==444) || (str=="jsp" && str1==555)))
{
flag=0;
}
</div>
<br><br>
<div align="center">
<input type="submit" value="ok" onClick="validate()"> &nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" value="clear">
</form>
</body>
</html>
if(flag==1)
{
Y.Kiran Kumar

Page 11

alert("VALID INPUT");
}
else
{
alert("INVALID INPUT");
document.myform.focus();
}
}
</script>
<form name="myform" action="scart.html" target="right">
<div align="center"><pre>
LOGIN ID :<input type="text" name="id"><br>
TITLE :<input type="text" name="title"><br>
NO.OF BOOKS :<input type="text" name="no"><br>
COST OF BOOK :<input type="text"name="cost"><br>
</pre><br><br>
OUTPUT:

Main.html

Login.html:

Y.Kiran Kumar

Page 12

Catalog.html:

4. Create a web page with all types of Cascading style sheets.


xyz.css
h3{font-family:arial;font-size:20;color:blue}
table{border-color:red}
td{font-size:20pt;color:green}

allstylesheets.html
Y.Kiran Kumar

Page 13

<html>
<head>
<h1><center><B><U>ALL STYLE SHEET</U></B></center></h1>
<title>use of internal and external style sheet</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
<style type="text/css">
.vid{font-family:Bohamos;font-style:italic;color:red;text-align:center;}
.ani{font-family:vardana;font-style:bold;font-size:20;text-align:center;}
font{font-family:georgia;color:blue;font-size:20}
ul{list-style-type:circle}
</style>
</head>
<body>
<ol style="list-style-type:lower-alpha">
<b><u>SREE VIDYANIKETHAN GROUP OF COLLEGES</u></b><br><br><br>
<li>sree vidyanikethan eng college</li>
<li>sree vidyanikethan degree college</li>
<li>sree vidyanikethan institute of management</li>
<li>sree vidyanikethan college of nursing</li>
<li>sree vidyanikethan college of pharmacy</li>
</ol>
<p style="font-size:20pt;color:green">
<marquee>
SREE VIDYANIKETHAN GROUP OF COLLEGES</marquee>
</p>
<p class="ani">sree vidyanikethan group of college owned by M.Mohan babu<br>it is
approved by AICTE.It is affliated to jntua,ananthapur</p><br><br>
<h2 class="vid">sree vidyanikethan eng college</h2><br>
<font>sree vidyanikethan engineering clg conferred with Autonomous by the UGc</font><br>
<br>
<font>
<h2>list of cources offered</h2>
<ul>
<li>MCA</li>
<li>CSE</li>
<li>M.Tech</li>
<li>CSE</li>
<li>ITI</li>
<li>EEE</li>
<li>MECHANICAL</li>
</ul>
</font>
<h3>Results of MCA students</h3>
<table width="100%" cellspacing="2" cellpadding="2"border="5">
<tr>
<th>s.name</th>
<th>marks</th>
Y.Kiran Kumar

Page 14

<th>result</th>
</tr>
<tr>
<td align="center">k.guru</td>
<td align="center">85</td>
<td align="center">pass</td>
</tr>
<tr>
<td align="center">k.guru</td>
<td align="center">85</td>
<td align="center">pass</td>
</tr>
<tr>
<td align="center">k.guru</td>
<td align="center">85</td>
<td align="center">pass</td>
</tr>
</table>
</body>
</html>

5. Create and save an XML document at the server, which contains 10 users information. Write a
program, which takes User Id as an input and returns the user details by taking the user
information from the XML document.
Y.Kiran Kumar

Page 15

Step1 : set the classpath for xercesImpl.jar;


set classpath=D:\Apache Group\Tomcat 4.1\common\endorsed\xercesImpl.jar;
step 2: Edit your UserInfo.java program using any editor
step 4 : create an StudentData.xml file with few records
step 3 : Compile the java program
step 4 : run the java program with command line arguments ( file-name id)
d:\WAD>java UserInfo StudentData.xml 1
Source Code :
import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.SAXParser;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
class UserInfo extends DefaultHandler
{
private String idvalue="";
private static String a="";
private boolean isid;
private StringBuffer value=new StringBuffer();
private String strele[]={"uname","uaddress","udob"};
public static void main(String[] args)throws Exception
{
UserInfo ui=new UserInfo();
a=args[1];
ui.read(args[0]);
}
public void read(String filename)throws Exception
{
XMLReader
reader=XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
reader.setContentHandler(this);
reader.parse(filename);
}
public void startDocument()throws SAXException
{
System.out.println("Document has started");
}
Y.Kiran Kumar

Page 16

public void startElement(String uri, String localName,String gName, Attributes atts)throws


SAXException
{
if(localName.equals("user"))
{
idvalue=atts.getValue("id");
}
else if(idvalue.equals(a))
{
for(int i=0;i<strele.length;i++)
{
if(localName.equals(strele[i]))
{
value.setLength(0);
isid=true;
}
}
}
else
isid=false;
}
public void characters(char[] ch,int start,int len)throws SAXException
{
if(isid)
{
value.append(ch,start,len);
}
}
public void endElement(String uri, String localName,String gName)throws SAXException
{
if(isid&&!(localName.equals("user")))
{
System.out.println(value.toString());
}
value.setLength(0);
}
public void endDocument()throws SAXException
{
System.out.println("Document has ended");
}
}

Y.Kiran Kumar

Page 17

StudentData.xml
<?xml version="1.0" encoding="UTF-8"?>
<userInfo>
<user id="1">
<uname>Ramesh</uname>
<uaddress>Bangalore</uaddress>
<udob>12</udob>
</user>
<user id="2">
<uname>Phani</uname>
<uaddress>Hyderabad</uaddress>
<udob>13</udob>
</user>
<user id="3">
<uname>Muni</uname>
<uaddress>Chennai</uaddress>
<udob>14</udob>
</user>
</userInfo>

Y.Kiran Kumar

Page 18

6. Programs using XML Schema , XSLT/XSL ( Bookcatalog.xml)


<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="bookcatalog.xsl"?>
<catalog>
<book> <title>Software Engineering</title>
<author>Pressman</author>
<country>USA</country>
<publication>PHI</publication>
<price>350</price>
<year>2001</year>
</book>
<book>
<title>Computer Networks</title>
<author>Tenanbaum</author>
<country>USA</country>
<publication>PHI</publication>
<price>400</price>
<year>1998</year>
</book>
<book>
<title>Database Management System</title>
<author>Ramakrishna</author>
<country>India</country>
<publication>PHI</publication>
<price>450</price>
<year>2000</year>
</book>
<book>
<title>Web Technology</title>
<author>Coyal</author>
<country>USA</country>
<publication>PHI</publication>
<price>470</price>
<year>2004</year>
</book>
</catalog>
Y.Kiran Kumar

Page 19

bookcatalog.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>My Book Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>title</th>
<th>author</th>
<th>country</th>
<th>publication</th>
<th>price</th>
`
<th>year</th>
</tr>
<xsl:for-each select="catalog/book">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="author"/></td>
<td><xsl:value-of select="country"/></td>
<td><xsl:value-of select="publication"/></td>
<td><xsl:value-of select="price"/></td>
<td><xsl:value-of select="year"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Y.Kiran Kumar

Page 20

Output:

7. Program using DOM / SAX.


DomParserBookStore.java
import java.io.File;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
/**
*Use DOM parser to display all books:isbn,title and authors*/
public class DomParserBookStore
{
public static void main(String[] args)throws Exception
{
DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder=factory.newDocumentBuilder();
File file=new File("bookstore.xml");
Document doc=docBuilder.parse(file);
//Get a List of all elements in the document
//The wild card * matches all the tags
NodeList list=doc.getElementsByTagName("*");
int bookcount=0;
for(int i=0;i<list.getLength();i++)
{
//Get the elements book(attribute isbn),title author
Y.Kiran Kumar

Page 21

Element element=(Element)list.item(i);
String nodeName=element.getNodeName();
if(nodeName.equals("book"))
{
bookcount++;
System.out.println("Book"+bookcount);
String isbn=element.getAttribute("ISBN");
System.out.println("\tISBN:\t"+isbn);
}
else if(nodeName.equals("title"))
{
System.out.println("\tTitle:\t"+element.getChildNodes().item(0).getNodeValue());
}
else if(nodeName.equals("author"))
{
System.out.println("\tAuthor:\t"+element.getChildNodes().item(0).getNodeValue());
}
}
} }
Output:
Z:\WAD>javac DomParserBookStore.java
Z:\WAD>java DomParserBookStore
Book1
ISBN: 0123456001
Title: Javaprogramming
Author: Tan
Book2
ISBN: 0123456002
Title: More Java Programming
Author: Jan Ah Tech
Book3
ISBN: 9788131758342
Title: Programming with java
Author: Sureshkumar
Author: Eswar reddy
Author: Raghavan
Y.Kiran Kumar

Page 22

SAXParserBookstore.java
import java.io.File;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.Attributes;
import org.xml.sax.SAXExceptions;
import org.xml.sax.helpers.DefaultHandler;
public class SAXParserBookstore
{
private string currentElement;
private int bookcount=1;
private SAXParserBookstore()
{
try
{
SAXParser Factory factory=SAXParserFactory.newInstance();
SAXParser saxParser=factory.newSAXParser();
SAXParser.parse(new File("bookstore.xml"),new MyHandler());
catch(Exception e)
{
e.printStackTrace();
}
}
public static void main(String args[])
{
new SAXParserBookstore();
}
class MyHandler extends Default Handler
{
//callback to handle a element start tag
public void startElement(String uri,String localname,String qName,Attributes attributes)throws
SAXException
{
currentElement=qName;
if(currentElement.equals("book"))
{
Y.Kiran Kumar

Page 23

System.out.println("Book"+bookcount);
bookcount++;
String isbn=attributes.getValue("ISBN");
System.out.println("\t ISBN:\t"+isbn);
}
}
//call back to handle element and tag
public void endElement(String uri,String localName,String qName)throws SAXException
{
currentElement=" ";
}
//callback to handle the character text date inside an element
public void characters(char[] chars,int start,int length)throws SAX Exception
{
if(currentElement.equals("title"))
{
System.out.println("\t title:\t"++newString(chars,start,length));
}
else if(currentElement.equals("author"))
{
System.out.println("\t Author:\t"+newString(chars,start,length));
}
}}}
output:
Book1
ISBN: 0123456001
title: Javaprogramming
Author:
Tan
Book2
ISBN: 0123456002
title: More Java Programming
Author:
Tan Ah Tech
Book3
ISBN: 9788131758342
title: Programming with java
Author:
Eswar reddy
Y.Kiran Kumar

Page 24

8. a. Write a java program to get IP Address, Host Name and Port Numbers of a Local system
import java.io.*;
import java.net.*;
public class IPTest

{
public static void main(String args[])throws UnknownHostException
{
InetAddress addr=InetAddress.getLocalHost();
//getting IP Address of localhost-getHostAddress return IP Address
//in textual format
String ipAddress=addr.getHostAddress();
System.out.println("IP Address of localhost from java program:"+ipAddress);
//Nostname
String hostname=addr.getHostName();
System.out.println("Name of hostname:"+hostname);
//port Number 1024 to 65535 1720
for(int port=1024;port<=1720;port++)
{
try
{
ServerSocket server=new ServerSocket(port);
}
catch(IOException e)
{
System.out.println("There is a server on port"+port);
}
}
}
}
output:
IP Address of localhost from java program:100.100.100.177
Name of hostname:svimlab-177
There is a server on port1025
There is a server on port1662
There is a server on port1663
There is a server on port1664
There is a server on port1665
b. Write a Java Program using Datagram Communication.
Dserver.java
import java.net.*;
import java.io.*;
class DServer
{
Y.Kiran Kumar

Page 25

public static void main(String args[])throws IOException


{
BufferedReader kybd=new BufferedReader(new InputStreamReader(System.in));
InetAddress localadrs=InetAddress.getLocalHost();
InetAddress remoteadrs=null;
DatagramSocket dsocket=new DatagramSocket(3456);
int buffersize=2000;
int remoteport;
DatagramPacket outgram;
System.out.println("Type exit to quit");
boolean more=true;
while(more)
{
byte[]inbuffer=new byte[buffersize];
DatagramPacket ingram=new DatagramPacket(inbuffer,buffersize);
byte[]outbuffer=new byte[buffersize];
dsocket.receive(ingram);
remoteadrs=ingram.getAddress();
remoteport=ingram.getPort();
String data=new String(ingram.getData());
data=data.trim();
if(data.equals("exit"))
break;
System.out.println("From client:"+data);
String reply=kybd.readLine();
outbuffer=reply.getBytes();
outgram=new DatagramPacket(outbuffer,outbuffer.length,remoteadrs,remoteport);
dsocket.send(outgram);
if(reply.equals("exit"))
break;
}
dsocket.close();
}
}
output:
Z:\WAD>javac DServer.java
Z:\WAD>java DServer
Type exit to quit
From client:hai hello dis is yasaswini,persuing MCA

Y.Kiran Kumar

Page 26

Dclient.java
import java.net.*;
import java.io.*;
class DClient
{
public static void main(String args[])throws IOException
{
BufferedReader kybd=new BufferedReader(new InputStreamReader(System.in));
InetAddress localadrs=InetAddress.getLocalHost();
InetAddress remoteadrs=localadrs;
DatagramSocket dsocket=new DatagramSocket(3457);
int buffersize=2000;
byte[] outbuffer=new byte[buffersize];
DatagramPacket outgram;
System.out.println("start the dilog from this client");
boolean more=true;
while(more)
{
byte[] inbuffer=new byte[buffersize];
DatagramPacket ingram=new DatagramPacket(inbuffer,buffersize);
String send=kybd.readLine();
outbuffer=send.getBytes();
outgram=new DatagramPacket(outbuffer,outbuffer.length,remoteadrs,3456);
dsocket.send(outgram);
if((send.trim()).equals("exit"))
break;
dsocket.receive(ingram);
String data=new String(ingram.getData());
data=data.trim();
System.out.println("From Server:"+data);
if(data.equals("exit"))
break;
}
dsocket.close();
}
}
Y.Kiran Kumar

Page 27

output:
Z:\HTML>javac DClient.java
Z:\HTML>java DClient
start the dilog from this client
hai hello dis is yasaswini,persuing MCA

9. Write a basic Servlet program that must display information like


a. Request method used by the client and
b. Current system date
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class OurSrv extends HttpServlet
{
public void service(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
{
System.out.println(" --- Start of Service (OurSrv) ---------- ");
PrintWriter out = response.getWriter();
java.util.Date now = new java.util.Date();
out.println(" -------");
out.println(now);
out.println("**************");
System.out.println("-------------- end of service(OurSrv)-------------------------");
}
}
In Order to compile the Servlets:1. copy servlet-api.jar to the working directory
2. run the following command
d:\servlet-examples\>set CLASSPATH=servlet-api.jar.
user javac command to compile the servlet class JavaSoft has specified a
standard procedure for assembling a web application. The procedure is
a. create a directory to place the resources of a web application (eg. D:\OurWapp). This
directory is called as web root directory.
b. Under webroot, create a directory with name WEB-INF
3. Under WEB-INF, create the following two directories
a. Lib -> jar files must be copied under this directory
b. Classes -> classes must be copied under this directory.
Y.Kiran Kumar

Page 28

4. copy web.xml to WEB-INF directory. Also provided information about the web application.
<web-app>
<servlet>
<servlet-name>sone</servlet-name>
<servlet-class>OurSrv</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>sone</servlet-name>
<url-pattern>/done/srv</url-pattern>
</servlet-mapping>
</web-app>
Note: web.xml is called deploymentdescriptor.
5. copy the static resources under the webroot or the sub directories of the web-root. (we should not
copy the static resources under WEB-INF).
6. copy servlet classes under WEB-INF\classes.
10. Generate a Servlet, that will accept form data from HTML file which includes Name of the user and
favorite programming language described in terms of a LIST, and it must display user name and
language selected by a particular Client.
Request.html
<html>
<head>
<title>Request Processing</title>
</head>
<body bgcolor="megenta">
<form name="f" method="post" action="\servlet">
username:<input type="text" name="username"/>
<br><br>
select your Favarite programming language:
<select name="p1">
<option value="c">c</option>
<option value="Java">Java</option>
<option value="php">Php</option>
<option value="VB.Net">VB.NET</option>
</select>
<br><br>
<input type="submit" value="submit" />
</form>
</body>
</html>S
loginServlet.java
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
Y.Kiran Kumar

Page 29

public class loginServlet extends HttpServlet


{
public void doPost(HttpServletRequest request, HttpServletResponse
IOException ServletException
{
String username=request.getParameter("username");
String pl=request.getParameter("pl");
System.Out.Println("username:"+username);
System.Out.Println("favorite pl:"+pl);
Printwriter writer=response.getWriter();
String htmlresponse="<html>";
htmlresponse+="<h2>your username:"+username+"<br>";
htmlresponse+="your favorite programming language is:"+pl+"</h2>";
language is:"+pl+"</h2>";
htmlresponse+="</html>";
writer.println(htmlresponse);
}
}
web.xml
<web-app>
<servlet>
<servlet-name>s1</servlet-name>
<servlet-class>loginservlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>s1</servlet-name>
<url-pattern>/servlet</url-pattern>
</servlet-mapping>
</web-app>

response)throws

11. Generate a Servlet page that showing the Session ID, Creation Time, Last Accessed Time
and Max Inactive Interval. Along with page should display links like Reload this page and Invalidate
the Session. When we press the Reload this page link the above information should be redisplayed. If
we press Invalidate the Session link the page will display one more link like create new session along
with it has to display message like session invalidated.

Y.Kiran Kumar

Page 30

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class SessionExample extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
HttpSession session = request.getSession(true);
// print session info
Date created = new Date(session.getCreationTime());
Date accessed = new Date(session.getLastAccessedTime());
out.println("ID " + session.getId());
out.println("Created: " + created);
out.println("Last Accessed: " + accessed);
// set session info if needed
String dataName = request.getParameter("dataName");
if (dataName != null && dataName.length() > 0) {
String dataValue = request.getParameter("dataValue");
session.setAttribute(dataName, dataValue);
}
// print session contents
Enumeration e = session.getAttributeNames();
while (e.hasMoreElements()) {
String name = (String)e.nextElement();
String value = session.getAttribute(name).toString();
out.println(name + " = " + value);
}
}
}
OUTPUT:Session ID: E55B7AE87EEC8556A084BBFF47E96155
Created: Thu May 29 12:00:08 IST 2008
Last Accessed: Thu May 29 12:00:43 IST 2014
The following data is in your session:
ANANTH = 1234
RAM = 4321
Y.Kiran Kumar

Page 31

12. Generate JSP pages to


a. Current system date
b. Page should include two files (either html or jsp files) by using include directive.
c. Page should include two files (either html or jsp files) by using include action.
d. Any mathematical table by using Scriptlet Elements (Declaration, Expression and Scriptlet tags).
e. Page must perform forward action.
Current system date
Date.jsp
<%@page contenttype="text.html" import="java.util.*"%>
<html>
<body>
<p>&nbsp;</p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="460" bgcolor="#EEFFCA">
<tr>
<td width="100%"><font size="6" color="#008000">&nbsp;DateExample</font></td>
</tr>
<tr>
<td width="100%"><b>&nbsp;Current Date and Time is:&nbsp;<font color="#FF0000">
<%=new java.util.Date()%>
</font></b></td>
</tr>
</table>
</center>
</body>
</html>
Forward.jsp
<html>
<head>
<title>The forward action example</title>
</head>
<body>
<center>
<h2>The Forward action Example</h2>
<jsp:forward page="date.jsp"/>
</center>
</body>
</html>
Main.jsp
<%@include file="header.jsp"%>
<center>
<p>Thanks for visiting my page</p>
</center>
<%@include file="footer.jsp"%>
Footer.jsp
Y.Kiran Kumar

Page 32

<html>
<body>
<br><br>
<center>
<p>Copyright @ 2014</p>
</center>
</body>
</html>
Header.jsp
<%!
int pageCount=0;
void addCount(){
pageCount++;
}
%>
<%addCount();%>
<html>
<head>
<title>The include Directive Example</title>
</head>
<body>
<center>
<h2>The include Directive Example</h2>
<p>This has been visited<%=pageCount%>times</p>
</center>
<br><br>
</body>
</html>
13. Write a Java Program using TCP/IP Protocol.
import java.net.*;
import java.io.*;
class tcpip_server
{
public static void main(String args[]) throws IOException
{
ServerSocket n1=null;
try
{
n1=new ServerSocket(98);
}
catch(IOException e)
{
System.err.println("Port 98 could not be found");
System.exit(1);
Y.Kiran Kumar

Page 33

}
Socket c=null;
try
{
c=n1.accept();
System.out.println("Connection from "+c);
}
catch(IOException e)
{
System.out.println("Accept failed");
System.exit(1);
}
PrintWriter out=new PrintWriter(c.getOutputStream(),true);
BufferedReader in=new BufferedReader(new InputStreamReader(c.getInputStream()));
String n;
BufferedReader sin=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Ready to type now");
while((n=sin.readLine())!=null)
{
out.println(n);
}
out.close();
c.close();
n1.close();
}
}
import java.net.*;
import java.io.*;
class tcpip_client
{
public static void main(String args[]) throws IOException
{
Socket s=null;
BufferedReader b=null;
try
{
s=new Socket(InetAddress.getLocalHost(),98);
b=new BufferedReader(new InputStreamReader(s.getInputStream()));
}
catch(UnknownHostException u)
{
System.err.println("I don't know host");
System.exit(0);
Y.Kiran Kumar

Page 34

}
String inp;
while((inp=b.readLine())!=null)
{
System.out.println(inp);
}
b.close();
s.close();
}
}

14. Write a JSP program for finding total number of visitors in a site to keep track of active users at a given
instance of time, and also display the user session starting time.
Session.jsp
<%@ page import="java.io.*,java.util.*"%>
<%
Date lastAccessTime=new Date(session.getlastAccessTimeTime());
String title="welcome back to my website';
Integer visitCount=new Integer(0);
Integer visitCountkey=new String("visitCount");
String userIDkey=new String("userID");
String userID=new String("ABCD");
if(session.isNew())
{
title="welcome to my website";
session.setAttribute(userIDkey,userID)
session.setAttribute(visitCountKeey,visitCount);
}
visitCount=(Integer)session.getAttribute(visitCountkey);
visitCount=visitCount+1;
userID=(String)session.getAttribute(userIDkey);
session.setAttribute(visitCountKeey,visitCount);
%>
<html>
<head>
<title>Session Tracking</title>
</head>
<body>
<center>
<h1>Session Tracking</h1>
</center>
<table border="1" align="center">
<tr bgcolor="#949494">
<th>Session info</th>
Y.Kiran Kumar

Page 35

<th>Value</th>
</tr>
<tr>
<td>id</td>
<td><% out.print(Session.getId());%></td>
</tr>
<tr>
<td>Creation Time</td>
<td><% out.print(create Time);%></td>
</tr>
<tr>
<td>Time of last Access</td>
<td><% out.print(last AccessTime);%></td>
</tr>
<tr>
<td>user id</td>
<td><% out.print(userID);%></td>
</tr>
<tr>
<td>Number of visits</td>
<td><% out.print(visitCount);%></td>
</tr>
</table>
</body>
</html>
15. Write a JSP program that creates a cookie on username which is send from html file and display the
cookie value as a response. The cookie must be active based on the maximum active interval time.
<%
Cookie uid = new Cookie("username",request.getParameter("username"));
Cookie pass = new Cookie("password",request.getParameter("password"));
uid.setMaxAge(60*60*24);
pass.setMaxAge(60*60*24);
response.addCookie(uid);
response.addCookie(pass);
%>
<html>
<body>
<h1>Creation of cookies</h1><br>
User Id:<%=request.getParameter("username")%><br>
Password:<%=request.getParameter("password")%>
</body>
</html>

Y.Kiran Kumar

Page 36

<html>
<h1>Reading of Cookies</h1><br/>
<%
Cookie ck=null;
Cookie[] cks=null;
cks=request.getCookies();
if(cks!=null)
{
out.println("<h2>Found cookie name and values</h2>");
for(int i=0;i<cks.length;i++)
{
ck=cks[i];
out.println("Name of the cookie is:"+ck.getName()+",");
out.println("Value of the cookie is:"+ck.getValue()+"<br>");
}
Y.Kiran Kumar

Page 37

}
else{
out.println("<h2>No Cookies was found</h2>");
}
%>
</html>

<%
Cookie uid = new Cookie("username",request.getParameter("username"));
Cookie pass = new Cookie("password",request.getParameter("password"));
uid.setMaxAge(60*60*24);
pass.setMaxAge(60*60*24);
response.addCookie(uid);
response.addCookie(pass);
%>
<html>
<body>
<h1>Creation of cookies</h1><br>
User Id:<%=request.getParameter("username")%><br>
Password:<%=request.getParameter("password")%>
</body>
</html>

Y.Kiran Kumar

Page 38

<html>
<h1>Reading of Cookies</h1><br/>
<%
Cookie ck=null;
Cookie[] cks=null;
cks=request.getCookies();
if(cks!=null)
{
out.println("<h2>Found cookie name and values</h2>");
for(int i=0;i<cks.length;i++)
{
ck=cks[i];
out.println("Name of the cookie is:"+ck.getName()+",");
out.println("Value of the cookie is:"+ck.getValue()+"<br>");
}
Y.Kiran Kumar

Page 39

}
else{
out.println("<h2>No Cookies was found</h2>");
}
%>
</html>

16. Develop java program for following SQL operations using JDBC.
a. Create
b. Insert
c. Update and
d. Delete
Consider the following schema:
Employee (EmpName, EmpNo Primary Key, Department, Salary)
AccessDb.java
import java.io.*;
import java.sql.*;
class AccessDb
{
public static void main(String args[])throws IOException,SQLException
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:empdsn");
Statement st=con.createStatement();
Y.Kiran Kumar

Page 40

ResultSet rs=st.executeQuery("select *from emptable");


while(rs.next())
{
System.out.println(rs.getInt(1)+"\t"+rs.getString(2)+"\t"+rs.getString(3)+"\t"+rs.getStrin(4));
}
rs.close();
st.close();
con.close();
}
catch(Exception ex)
{
System.out.println("Error"+ex);
}
}
}

Y.Kiran Kumar

Page 41

17. Generate a JSP page that will store and retrieve the Employee information from the database.
The page should display the employee records in a tabular format.
Creation of a context file
Create any folder in any drive as (E:\Jsp). Inside that folder store your .jsp files. Give the Context
path name as jsp and docBase as E:\Jsp, here docBase means the total path where we are storing
our .jsp files. These changes are done in the server.xml file, which is present in (E:\Program
Files\Apache Software Foundation\Tomcat 6.0\conf) directory.
Server.xml file
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResources
LifecycleListener" />
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

<Service name="Catalina">

<Connector port="8081" protocol="HTTP/1.1"


connectionTimeout="20000"
redirectPort="8443" />
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Y.Kiran Kumar

Page 42

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"


maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
<Engine name="Catalina" defaultHost="localhost">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
<Context path="/jsp" docBase="E:\Jsp" reloadable="true" debug="0" />
</Host>
</Engine>
</Service>
</Server>
Table creation
First create an employee table in Oracle and insert some data as below
Create table employee (empid varchar(10),empname varchar(10),sal int)
insert into employee values('e001','Raj',10000)
insert into employee values('e002','Harry',20000)
insert into employee values('e003','Sunil',30000)
insert into employee values('e004','Pollock',40000)
Y.Kiran Kumar

Page 43

insert into employee values('e005','Jonty',50000)


insert into employee values('e006','Kallis',60000)
insert into employee values('e007','Richard',70000)
Creation of dsn (database source name)
Start-Control panel- Administrative Tools- Data Sources (ODBC)-go to system dsn tab-click add
button-select a driver for which you want to set up data source (for Oracle- Oracle in XE)-select it
and click finish-give any name in data source name textbox-then click ok button.
Note:- Here Username=system, Password=tiger and Dsn name=dsn1
Display.jsp
<%@ page import="java.sql.*" %>
<html>
<body bgcolor="Yellow">
<table border="1" width="30%" height="30%">
<tr><th><font color='Red'>EMP ID</font></th><th><font color='Red'>EMP
NAME</font></th><th><font color='Red'>SALARY</font></th></tr>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:dsn1","system","tiger");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select * from employee");
while(rs.next())
{
String EmployeeId=rs.getString("empid");
String EmployeeName=rs.getString("empname");
int Salary=rs.getInt("sal");
%>
<tr>
<td><b><font color='#663300'><%=EmployeeId%></font></b></td>
<td><b><font color='#663300'><%=EmployeeName%></font></b></td>
<td><b><font color='#663300'><%=Salary%></font></b></td>
</tr>
<%
}
%>
</table>
</body>
</html>
Y.Kiran Kumar

Page 44

Running the application


Run the tomcat then write the below line in the URL
http://localhost:8081/jsp/
Here jsp is the Context path, which we mentioned in the server.xml file, which is present in
(E:\Program Files\Apache Software Foundation\Tomcat 6.0\conf) directory.
After giving the URL a set a listing will come, here only one appears, as Display.jsp, click it
http://localhost:8081/jsp/Display.jsp
Output

//Inserting Data into Database using Servlet


<html>
<head>
<title>Data Retrieving</title>
</head>
<body>
<form action="./showdata">
<input type="submit" value="Insert Data"/>
</form>
</body>
</html>

Y.Kiran Kumar

Page 45

Insert.jsp
<%@ page language="java" contentType="text/html"%>
<%@page import="java.io.*"%>
<%@page import="java.sql.*"%>
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<% String fn=request.getParameter("t1");
String ln=request.getParameter("t2");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
Connection con = DriverManager.getConnection("jdbc:odbc:murali");
out.println("Connection success...");
out.println("<br/>");
Statement st=con.createStatement();
int i=st.executeUpdate("insert into emp values('"+fn+"','"+ln+"')");
out.println("Data is successfully inserted!");

Y.Kiran Kumar

Page 46

out.println("rows affected by insert "+i);


}
catch(Exception e){
out.print(e);
e.printStackTrace(); }
%> </body> </html>

Y.Kiran Kumar

Page 47

18. Write programs in Java to create three-tier applications using JSP and Databases
For conducting on-line examination.
For displaying student mark list.
Assume that student information is available in a Database which has been stored in a database
server.
Three-Tier Application Using JSP and Database (Online Examination)
OnlineExam.jsp
<%@ page language="java" import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%
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;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:ExamStudent";
connect = DriverManager.getConnection(url," "," ");
if(request.getParameter("action")!=null)
{
SeatNum = request.getParameter("Seat_no");
Name = request.getParameter("Name");
ans1 =request.getParameter("group1");
if(ans1.equals("True"))
a1=5;
else
a1=0;
ans2 = request.getParameter("group2");
if(ans2.equals("True"))
a2=0;
else
a2=5;
ans3 = request.getParameter("group3");
if(ans3.equals("True"))
a3=0;
else
a3=5;
ans4 = request.getParameter("group4");
if(ans4.equals("True"))
a4=5;
else
a4=0;
ans5 = request.getParameter("group5");
if(ans5.equals("True"))
Y.Kiran Kumar

Page 48

a5=0;
else
a5=5;
int Total=a1+a2+a3+a4+a5;
stmt = connect.createStatement();
String query = "INSERT INTO StudentTable (" + "Seat_no,Name,Marks" + ")
VALUES ('" +SeatNum + "', '" + Name + "', '"+Total+ "')";
int result = stmt.executeUpdate(query);
stmt.close();
stmt = connect.createStatement();
query = "SELECT * FROM StudentTable WHERE Name="+"'"+Name+"'";
rs = stmt.executeQuery(query);
%>
<html><head><title>Student Mark List</title></head>
<body bgcolor=khaki>
<center>
<h2>Students Marksheet</h2>
<h3>Name of the College : Sree Vidyanikethan Engineering College</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(rs.next())
{
%>
<tr>
<td><%=rs.getInt(1)%></td>
<td> <%=rs.getString(2)%></td>
<td> <%=rs.getString(3)%></td>
</tr>
<%
}
rs.close();
stmt.close();
connect.close();
%>
</table>
</center>
<br/> <br/><br/>
<table>
<tr><td><b>Date:<%=new java.util.Date().toString() %></td></tr>
<tr><td><b>Signature: X.Y.Z. <b></td></tr>
</table>
<div>
Y.Kiran Kumar

Page 49

<a href="http://localhost:8090/OnlineExam/OnlineExam.jsp">Click here to go back</a>


</body>
</html>
<%}else{%>
<html>
<head><title>Online Examination</title>
<script language="javascript">
function validation(Form_obj)
{
if(Form_obj.Seat_no.value.length==0)
{
alert("Please,fill up the Seat Number");
Form_obj.Seat_no.focus();
return false;
}
if(Form_obj.Name.value.length==0)
{
alert("Please,fill up the Name");
Form_obj.Name.focus();
return false;
}
return true;
}
</script>
</head>
<body bgcolor=lightgreen>
<center>
<h1>Online Examination</h1>
</center>
<form action="OnlineExam.jsp" method="post"
name="entry" onSubmit="return validation(this)">
<input type="hidden" value="list" name="action">
<hr/>
<table>
<tr>
<td><h3>Seat Number : </h3></td>
<td><input type="text" name="Seat_no"></td>
</tr>
<tr>
<td><h3>Name : </h3></td>
<td><input type="text" name="Name" size="50"></td>
</tr>
<tr>
<td><b>Total Marks:5*5=25 </b></td>
<td></td><td></td><td></td><td><b>Time: 15 Min.</b></td>
</tr>
</table>
Y.Kiran Kumar

Page 50

<hr/>
<b>1. XML enables you to collect information once and reuse it in a
variety of ways.</b><br/>
<input type="radio" name="group1" value="True">True
<input type="radio" name="group1" value="False">False<br>
<br/>
<b>2. In 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>
<br/>
<b>3. JavaScript functions cannot be used to create script fragments
that can be used over and over again</b><br/>
<input type="radio" name="group3" value="True">True
<input type="radio" name="group3" value="False">False<br>
<br/>
<b>4.The DriverManager class is used to open a connection to a
database via
a JDBC driver.</b><br/>
<input type="radio" name="group4" value="True">True
<input type="radio" name="group4" value="False">False<br>
<br/>
<b>5. The JDBC and ODBC does not share a common parent</b><br/>
<input type="radio" name="group5" value="True">True
<input type="radio" name="group5" value="False">False<br>
<hr/>
<center>
<input type = "submit" value="Submit">
<input type = "reset" value="Clear"><br><br>
</center>
</form>
<%}%>

Y.Kiran Kumar

Page 51

Вам также может понравиться