0% found this document useful (0 votes)
93 views

IP Lab (MRKIT)

This document contains source code for an image mapping exercise using HTML. It includes an HTML page with image mapping that links different areas of an image map to additional HTML pages with information about various cities in India. It also includes the additional HTML pages for Chennai, Delhi, Mumbai, and Kolkata that provide more details when the corresponding areas on the map are clicked. The document provides the source code for the main HTML page and each of the city pages.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views

IP Lab (MRKIT)

This document contains source code for an image mapping exercise using HTML. It includes an HTML page with image mapping that links different areas of an image map to additional HTML pages with information about various cities in India. It also includes the additional HTML pages for Chennai, Delhi, Mumbai, and Kolkata that provide more details when the corresponding areas on the map are clicked. The document provides the source code for the main HTML page and each of the city pages.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

CS2358 - INTERNET PROGRAMMING

EXP NO: 1 DATE:


SOURCE CODE: india.html

IMAGE MAPPING USING HTML

<html> <head> <title>Image Mapping....</title> </head> <body> <h1 align="center"><font face="Forte"color="violet">INDIA</font></h1> <hr> <p> <font size="3" face="Comic Sans MS"color="darkblue"> <ul> <li>The name India is derived from Indus, which is derived from the Old Persian word Hindu, from Sanskrit</li> <li>India is the seventh-largest country by geographical area</li> <li>The second-most populous country with over 1.2 billion people</li> <li>The most populous democracy in the world</li> <li>Consisting of 28 states and seven union territories</li> <li>The name India is derived from Indus, which is derived from the Old Persian word Hindu, from Sanskrit</li> </ul> <p> <font size="4" face="Calibri"color="red"> Click On The Hotspots To View More Information About That Particular Places... </font> </p> <map name="map1"> <area shape="rect" coords="102,213,104,217" href="chennai.html" alt="Click here to get more details"> <area shape="rect" coords="81,72,83,76" href="delhi.html" alt="Click here to get more details"> <area shape="rect" coords="47,155,52,160" href="mumbai.html" alt="Click here to get more details"> <area shape="rect" coords="170,118,172,124" href="kolkatta.html" alt="Click here to get more details"> </map> <img src="map1.gif" border=0 usemap="#map1"> </body> </html>

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

chennai.html <html> <Title>Chennai....</title> <body> <p><font face="Cambria" color="blue" size="3">Chennai, formerly known as Madras or Madarasapatinam, is the capital city of the Indian state of Tamil Nadu...</font></p> <table> <tr> <td><img src="parrys corner.jpg" width="150" height="100"><br> <font face="Cambria" color="blue" size="3">Parry's Corner</td> <td> <font face="Cambria" color="blue" size="2"> <ul> <li>Chennai being the fourth most populous metropolitan area and the fifth most populous city in India</li> <li>It is also the world's 36th largest metropolitan area</li> <li>Chennai's economy has a broad industrial base in the automobile, computer, technology, hardware manufacturing, and healthcare industries</li> <li>The city is India's second largest exporter of software, information technology (IT) and information-technology-enabled services (ITES)</li> <li>Chennai is a major centre for music, art and culture in India</li> <li>The city is known for its classical dance shows and Hindu temples</li> <li>Cricket is the most popular sport in Chennai</li> <li>Chennai is the base for the large Tamil movie industry, known as Kollywood, home to most of the movie studios</li> </ul> </td> </tr> </table> <font face="Cambria" color="blue" size="2"> <a href="india.html">Home</a> </font> </body> </html> delhi.html <html> <Title>Delhi....</title> <body> <p><font face="Cambria" color="blue" size="3">Delhi is the eighth largest metropolis in the world by population with more than 12.25 people...</font></p> <table> <tr> <td><img src="lotus.jpg"width="150" height="100"><br> <font face="Cambria" color="blue" size="3">Lotus Temple</td>
MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

million

PAGE NO:

CS2358 - INTERNET PROGRAMMING

<td> <font face="Cambria" color="blue" size="2"> <ul> <li>Which also includes Noida, Greater Noida, Ghaziabad, Gurgaon and Faridabad along with other smaller nearby towns</li> <li>Delhi has a maximum length of 51.9 km (32 mi) and the maximum width of 48.48 km (30 mi)</li> <li>The annual mean temperature is 25 C (77 F)</li> <li>The average annual rainfall is approximately 714 mm (28.1 inches)</li> </ul> </td> </tr> </table> <font face="Cambria" color="blue" size="2"> <a href="india.html">Home</a> </font> </body> </html> mumbai.html <html> <Title>Mumbai....</title> <body> <p><font face="Cambria" color="blue" size="3">It is the most populous city in India, and the second most populous city in the world, with a population of approximately 14 million...</font></p> <table> <tr> <td><img src="gateway.jpg"width="150" height="100"><br> <font face="Cambria" color="blue" size="3">Gateway Of India</td> <td> <font face="Cambria" color="blue" size="2"> <ul> <li>Mumbai, formerly known as Bombay </li> <li>Mumbai is the capital of the Indian state of Maharashtra</li> <li>Mumbai is the commercial and entertainment capital of India</li> <li>The average annual temperature is 27.2 C (81.0 F)</li> </ul> </td> </tr> </table> <font face="Cambria" color="blue" size="2"> <a href="india.html">Home</a> </font> </body> </html>

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

kolkatta.html <html> <Title>Kolkata....</title> <body> <p><font face="Cambria" color="blue" size="3">Kolkata is the cultural capital of India and the commercial capital of Eastern India...</font></p> <table> <tr> <td><img src="victoria memorial.jpg"width="150" height="100"><br> <font face="Cambria" color="blue" size="3">Victoria Memorial</td> <td> <font face="Cambria" color="blue" size="2"> <ul> <li>Kolkata, formerly known as Calcutta, is the capital of the Indian state of West Bengal</li> <li>Before 1690 Kolkata, under direct rule of the Nawab of Bengal Siraj-UdDaulah</li> <li>Kolkata is located in the eastern part India</li> <li>The annual mean temperature is 26.8 C (80.2 F)</li> </ul> </td> </tr> </table> <font face="Cambria" color="blue" size="2"> <a href="india.html">Home</a> </font> </body> </html>

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 1 DATE:


OUTPUT:
SCREENSHOTS

IMAGE MAPPING USING HTML

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 2 DATE:


SOURCE CODE: mrkit.html

WEB PAGE USING CASCADING STYLE SHEETS

<html> <head> <title>MRKIT</title> <style type="text/css"> #tid1{background-color:gray;width:800;height:200} #tid2{background-color:gray;width:800;height:300} img{width:794;height:200} </style> <link rel="stylesheet" type="text/css" href="s2css.css"/> </head> <body> <h1 style="text-align:center;font-family:Arial Black;color:blue">MRK INSTITUTE OF TECHNOLOGY</h1> <hr/> <table id="tid1" align="Center"> <tr> <td><img src="MRKlogo.jpg"></td> </tr> </table> <table id="tid2" align="Center"> <tr> <td class="cls1" valign="left"> <h3 style="font-family:Lucida Sans Unicode;color:blue">ABOUT MRKIT</h3> <p> The 35-acre, lush MRK Institute of technology ampus has a spread of modern blocks spread over 1,32,000 sq.m and houses contemporary classrooms, research labs, libraries, comfortable hostels, playgrounds and recreational facilities making it topnotch and on par with any international institution in the country. The institution aims to offer a healthy and conductive learning environment that fosters creative and scientific thinking amongst the students and also provides ample scope for nurturing their leadership abilities through sports and extra-curricular activities. </p> </td> <td class="cls1" valign="top"> <h3 style="font-family:Lucida Sans Unicode;color:blue">Highlights of MRKIT</h3> <div style="font-size:10pt;color:gold;font-family:Lucida Sans Unicode;textalign:justify"> <ul type="square"> <li>Highly experienced and dedicated faculty</li> <li>Professional and practical training</li>
MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG PAGE NO:

CS2358 - INTERNET PROGRAMMING

<li>Regular industry interactions</li> <li>Modern classrooms & Training Equipment</li> <li>State of the art Laboratories</li> <li>High speed internet facilities</li> <li>Transport facilities</li> <li>Comfortable Hostel facilities for boys and girls</li> </ul> </div> </td> </tr> </table> </body> </html> External Style sheet Coding: mrkstyle.css body{background-color:black} .cls1{width:325;height:300} p{font-family:Lucida Sans Unicode;color:silver;font-size:12pt;text-align:justify}

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 2 DATE:


OUTPUT: SCREENSHOTS

WEB PAGE USING CASCADING STYLE SHEETS

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 3 DATE:


SOURCE CODE:

WEB FORM VALIDATION USING JAVA SCRIPT

formvalid.html <html> <head> <title>Form Validation Using Java Script</title> <script type="text/javascript"> function validation() { if(document.f1.name.value=="") { window.alert("Plz Enter Your Name"); return false; } else if(document.f1.email.value=="") { window.alert("Plz Enter Your E-mail:"); return false; } else if(document.f1.email.value.indexOf('@gmail.com')==-1) { window.alert("Plz Enter Your Valid E-mail"); return false; } else if(document.f1.addr.value=="") { window.alert("Plz Enter Your Address"); return false; } else if(document.f1.country.selectedIndex==0) { window.alert("Plz Select Your Country"); return false; } else if((document.f1.rdo[0].checked==false)&&(document.f1.rdo[1].checked==false)) { window.alert("Plz Choose Your Gender"); return false; }
MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG PAGE NO:

CS2358 - INTERNET PROGRAMMING

else if((document.f1.chk[0].checked==false)&&(document.f1.chk[1].checked==false)) { window.alert("Plz Select Your Qualification"); return false; } else return true; } </script> </head> <body bgcolor="lightgreen"> <h3 style="text-align:center">Web Form Validation Using Java Script</h3> <form name="f1" action="reg.html" onsubmit="return validation()"> <fieldset> <legend>Registration Form</legend> <br/> <table border="1"> <tr> <td>Name:</td> <td><input type="text" name="name"></td> </tr> <tr> <td>E-mail:</td> <td><input type="text" name="email"></td> </tr> <tr> <td>Address:</td> <td><Textarea name="addr" rows="5" cols="20"></Textarea></td> </tr> <tr> <td>Country:</td> <td> <select name="country"> <option>---Select Your Country---</option> <option>India</option> <option>USA</option> <option>AUS</option> <option>UK</option> </select> </td> </tr> <tr>
MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG PAGE NO:

CS2358 - INTERNET PROGRAMMING

<td>Gender:</td> <td> <input type="radio" name="rdo">Male <input type="radio" name="rdo">Female </td> </tr> <tr> <td>Qualification:</td> <td> <input type="checkbox" name="chk">B.E <input type="checkbox" name="chk">M.E </td> </tr> </table> <br/> <input type="submit" value="Register"> </fieldset> </form> </body> </html> reg.html <html> <head> <title>Registration Successfull</title> </head> <body> <h3>Registered Successfully.......!</h3> </body> </html>

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 3 DATE:


OUTPUT: SCREENSHOTS

WEB FORM VALIDATION USING JAVA SCRIPT

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 4 DATE:


SOURCE CODE: CPalette.java

COLOR PALETTE USING APPLET

import java.applet.*; import java.awt.*; import java.awt.event.*; public class CPalette extends Applet implements ActionListener,ItemListener { Button b1,b2,b3,b4; CheckboxGroup cg; Checkbox c1,c2; TextArea ta; int s; public void init() { setLayout(null); b1=new Button(); add(b1); b1.setBounds(50,50,50,25); b1.addActionListener(this); b1.setBackground(Color.blue); b2=new Button(); add(b2); b2.setBounds(120,50,50,25); b2.addActionListener(this); b2.setBackground(Color.black); b3=new Button(); add(b3); b3.setBounds(50,95,50,25); b3.addActionListener(this); b3.setBackground(Color.red); b4=new Button(); add(b4); b4.setBounds(120,95,50,25); b4.addActionListener(this); b4.setBackground(Color.cyan);
MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG PAGE NO:

CS2358 - INTERNET PROGRAMMING

cg=new CheckboxGroup(); c1=new Checkbox("Background",cg,false); add(c1); c1.setBounds(50,200,100,25); c1.addItemListener(this); c2=new Checkbox("Foreground",cg,false); add(c2); c2.setBounds(50,250,100,25); c2.addItemListener(this); ta=new TextArea(); add(ta); ta.setBounds(150,150,120,120); setVisible(true); } public void itemStateChanged(ItemEvent ie) { if(c1.getState()==true) s=1; if(c2.getState()==true) s=2; } public void actionPerformed(ActionEvent ae) { if(s==1) { if(ae.getSource()==b1) ta.setBackground(Color.blue); else if(ae.getSource()==b2) ta.setBackground(Color.black); else if(ae.getSource()==b3) ta.setBackground(Color.red); else ta.setBackground(Color.cyan); } if(s==2) { if(ae.getSource()==b1) ta.setForeground(Color.blue); else if(ae.getSource()==b2) ta.setForeground(Color.black);

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

else if(ae.getSource()==b3) ta.setForeground(Color.red); else ta.setForeground(Color.cyan); } } } ColorPalette.html <html> <head> <title>Color Palette Demonstration</title> </head> <body bgcolor="lightblue"> <applet code="CPalette.class" width="300" height="400"> </applet> </body> </html>

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 4 DATE:


OUTPUT: SCREENSHOTS

COLOR PALETTE USING APPLET

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 5 DATE:


SOURCE CODE: server.java:
import java.io.*; import java.util.*;

INVOKING SERVLETS FROM HTML FORM

import javax.servlet.*; public class server extends GenericServlet { public void service(ServletRequest req,ServletResponse res)throws ServletException,IOException { PrintWriter pw=res.getWriter(); pw.print("<h3>Registration Successful...</h3>"); Enumeration e=req.getParameterNames(); while(e.hasMoreElements()) { String str1=(String)e.nextElement(); String str2=req.getParameter(str1); pw.print(str1+"="+str2+"<br/>"); } pw.close(); } } web.xml: <web-app> <servlet> <servlet-name>Register</servlet-name> <servlet-class>server</servlet-class> </servlet> <servlet-mapping> <servlet-name>Register</servlet-name>
MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG PAGE NO:

CS2358 - INTERNET PROGRAMMING

<url-pattern>/server</url-pattern> </servlet-mapping> </web-app> Client.HTML: <html> <head> <title>Invoking Servlet From HTML</title> </head> <body bgcolor="violet"> <form name="form1" method="post" action="http://localhost:8080/servlets1/server"> <fieldset> <legend>Registration</legend> Enter E-mail&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: <input type="text" name="LoginID" size="25"/><br/><br/> Enter Password: <input type="password" name="Password" size="25"> <input type="submit" Value="SUBMIT"> </fieldset> </form> </body> </html>

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 5 DATE:


OUTPUT: SCREENSHOTS

INVOKING SERVLETS FROM HTML FORM

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 6 DATE:


SOURCE CODE: MyServer.java:

INVOKING SERVLETS FROM APPLETS

import java.io.*; import java.util.*; import javax.servlet.*; public class MyServer extends GenericServlet { public void service(ServletRequest req,ServletResponse res)throws ServletException,IOException { PrintWriter pw=res.getWriter(); Date d=new Date(); pw.println("<html><body bgcolor=blue><h2>Server Response</h2>"); pw.println("<h3>Current Date and Time From Server:</h3>"); pw.println("<b>"+d+"</b></body></html>"); } } AppletClient.java: import java.applet.*; import java.awt.*; import java.awt.event.*; import java.net.*; public class AppletClient extends Applet implements ActionListener { public void init() { Label la=new Label("INVOKING SERVLET FROM APPLET"); la.setFont(new Font("Courier",Font.BOLD,15)); la.setForeground(Color.blue); add(la); Button b1=new Button("Click Here To Display Date Information From Server"); b1.setBackground(Color.black); b1.setForeground(Color.white); add(b1); b1.addActionListener(this); } public void actionPerformed(ActionEvent ae)

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

{ try { AppletContext ac=getAppletContext(); URL url = new URL("http://localhost:8080/servlets3/MyServer"); ac.showDocument(url); } catch(Exception e) { System.out.println(e); } } } AppletClient.HTML: <html> <head> <title>Invoking Servlets From Applet</title> </head> <body bgcolor="violet"> <applet code="AppletClient.class" width="400" height="200"> </applet> </body> </html>

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 6 DATE:


OUTPUT:
SCREENSHOTS

INVOKING SERVLETS FROM APPLETS

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 7 DATE:


SOURCE CODE: ExamServer.jsp:

ONLINE EXAMINATION USING JSP

<%@page contentType="text/html" language="java" import="java.sql.*"%> <html> <head> <title>Online Exam Server</title> <style type="text/css"> body{background-color:black;font-family:courier;color:blue} </style> </head> <body> <h2 style="text-align:center">ONLINE EXAMINATION</h2> <p> <a href="ExamClient.html">Back To Main Page</a> </p> <hr/> <% String str1=request.getParameter("ans1"); String str2=request.getParameter("ans2"); String str3=request.getParameter("ans3"); int mark=0; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:examDS"); Statement stmt=con.createStatement(); ResultSet rs=stmt.executeQuery("SELECT * FROM examTab"); int i=1; while(rs.next()) { if(i==1) { String dbans1=rs.getString(1); if(str1.equals(dbans1)) { mark=mark+5; } } if(i==2)

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

{ String dbans2=rs.getString(1); if(str2.equals(dbans2)) { mark=mark+5; } } if(i==3) { String dbans3=rs.getString(1); if(str3.equals(dbans3)) { mark=mark+5; } } i++; } if(mark>=10) { out.println("<h4>Your Mark Is : "+mark+"</h4>"); out.println("<h3>Congratulations....! You Are Eligible For The Next Round...</h3>"); } else { out.println("<h4>Your Mark is : "+mark+"</h4>"); out.println("<h3>Sorry....!! You Are Not Eligible For The Next Round...</h3>"); } %> </form> </body> </html>

ExamClient.HTML:
<html> <head> <title>Online Exam Client</title> <style type="text/css"> body{background-color:black;font-family:courier;color:blue} </style> </head> <body> <h2 style="text-align:center">ONLINE EXAMINATION</h2>
MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG PAGE NO:

CS2358 - INTERNET PROGRAMMING

<h3>Answer the following questions (5 marks for each correct answer)</h3> <hr/> <form name="examForm" method="post" action="ExamServer.jsp"> 1. All computers must have <br/> <input type="radio" name="ans1" value="Operating System">Operating System <input type="radio" name="ans1" value="Application Software">Application Software <input type="radio" name="ans1" value="CD Drive">CD Drive <input type="radio" name="ans1" value="Microsoft word">Microsoft word <br/><br/> 2. The term PC means <br/> <input type="radio" name="ans2" value="Private Computer">Private Computer <input type="radio" name="ans2" value="Professional Computer">Professional Computer <input type="radio" name="ans2" value="Personal Computer">Personal Computer <input type="radio" name="ans2" value="Personal Calculator">Personal Calculator <br/><br/> 3.C was developed by?<br/> <input type="radio" name="ans3" value="Dennis Ritchie">Dennis Ritchie <input type="radio" name="ans3" value="Stroustrup">Stroustrup <input type="radio" name="ans3" value="David Ritchie">David Ritchie <input type="radio" name="ans3" value="Charles Babbage">Charles Babbage <br/><br/> <input type="submit" value="Check Your Result"/> </form> </body> </html>

Database Name: examdb.accdb Table Name: examTab

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 7 DATE:


OUTPUT: SCREENSHOTS

ONLINE EXAMINATION USING JSP

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 8 DATE:


SOURCE CODE:

DISPLAYING STUDENT MARK LIST USING JSP

marklist.jsp: <%@ page contentType="text/html" language="java" import="java.sql.*"%> <html> <head> <title>Three Tier Application</title> <style type="text/css"> body{color:blue;font-family:courier;text-align:center} </style> </head> <body> <h2>EXAMINATION RESULT</h2><hr/> <% String str=request.getParameter("regno"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:markDS"); Statement stmt=con.createStatement(); ResultSet rs=stmt.executeQuery("SELECT*FROM markTab WHERE rno="+str); while(rs.next()) { %> Register No:<%=rs.getObject(1)%><br/> Name:<%=rs.getObject(2)%><br/> <table border="1"> <th>SUBJECT</th><th>Mark</th> <tr><td>Network Programming and Management</td><td><%=rs.getObject(3)%></td></tr> <tr><td>Object Oriented Analysis and Design</td><td><%=rs.getObject(4)%></td></tr> <tr><td>Cryptography and Network Security</td><td><%=rs.getObject(5)%></td></tr> <tr><td>Embedded Systems</td><td><%=rs.getObject(6)%></td></tr> <tr><td>Web Technology</td><td><%=rs.getObject(7)%></td></tr> <tr><td>Software Requirement and Engineering</td><td><%=rs.getObject(8)%></td></tr> </table> <% }

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

%> <br/> <a href="stud.html">Back</a> </body> </html> stud.HTML: <html> <head> <title>Three Tier Application</title> <style type="text/css"> body{color:blue;font-family:courier;text-align:center} </style> </head> <body> <h2>EXAMINATION RESULT</h2><hr/> <form name="f1" method"GET" action="marklist.jsp"> Enter Your Reg.No: <input type="text" name="regno"/><br/><br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <input type="submit" value="SUBMIT"/> </form> </body> <html> Database Name: marklstdb.accdb Table Name: markTab

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 8 DATE:


OUTPUT: SCREENSHOTS

DISPLAYING STUDENT MARK LIST USING JSP

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 9 DATE:


SOURCE CODE:

DISPLAYING STUDENT DETAILS USING XML AND XSLT

simplexml.xsl
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <h2> Student Details</h2> <table border="1"> <tr bgcolor="gray"> <th>Name</th> <th>Address</th> <th>Std</th> <th>Marks</th> </tr> <xsl:for-each select="student/person_details"> <tr bgcolor="pink"> <td><xsl:value-of select="name"/></td> <td><xsl:value-of select="address"/></td> <td><xsl:value-of select="std"/></td> <td><xsl:value-of select="marks"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet>

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

Student.xml
<?xml version="1.0" encoding="UTF-8" ?> <?xml-stylesheet type="text/xsl" href="simplexml.xsl"?> <student> <roll_no>43</roll_no> <person_details> <name>Ajees</name> <address>Chennai</address> <std>third</std> <marks>92 percent</marks> </person_details> <roll_no>46</roll_no> <person_details> <name>Roshan</name> <address>Tambaram</address> <std>second</std> <marks>92 percent</marks> </person_details> </student>

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 9 DATE:


OUTPUT: SCREENSHOTS

DISPLAYING STUDENT DETAILS USING XML AND XSLT

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 10 DATE:


SOURCE CODE: Ajaxdemo.html

DISPLAYING INDIAN SCIENTISTS PROFILE USING AJAX

<html> <head> <title>Ajax Demo...</title> <style type="text/css"> .box{border:1px solid blue;padding:10px} </style> <script type="text/javascript"> var req; function getContent(url) { if(window.ActiveXObject) { req=new ActiveXObject("Microsoft.XMLHTTP"); } else if(window.XMLHttpRequest) { req=new XMLHttpRequest(); } req.onreadystatechange=diplayProfile; req.open('POST',url,true); req.send(null); } function diplayProfile() { if(req.readyState==4) { document.getElementById('contentArea').innerHTML=req.responseText; } } function clearContent() { document.getElementById('contentArea').innerHTML=''; } </script>
MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG PAGE NO:

CS2358 - INTERNET PROGRAMMING

</head> <body bgcolor="cyan"> <h1>Mouse over the image for More Information</h1> <img src="satyendra.jpg" height="95" width="80" onmouseover='getContent("satyendra.html")' onmouseout='clearContent()'/> <img src="cvraman.jpg" height="95" width="80" onmouseover='getContent("cvraman.html")' onmouseout='clearContent()'/> <img src="ramanujan.jpg" height="95" width="80" onmouseover='getContent("ramanujan.html")' onmouseout='clearContent()'/> <img src="apj.jpg" height="95" width="80" onmouseover='getContent("apj.html")' onmouseout='clearContent()'/> <img src="cnrrao.jpg" height="95" width="80" onmouseover='getContent("cnrrao.html")' onmouseout='clearContent()'/> <div class="box" id="contentArea"/> </body> </html> satyendra.html <html> <body> <b>Full name:</b> Satyendra Nath Bose<br/><br/> <b>Born:</b> January 1, 1894, Kolkata<br/><br/> <b>Died:</b> February 4, 1974, Kolkata<br/><br/> <b>Parents:</b> Surenderanath Bose<br/><br/> <b>Education:</b> University of Calcutta, Presidency College-Kolkata, Hindu School-Kolkata<br/><br/> <b>Fields:</b>Physics and Mathematics<br/><br/> <b>Discovered:</b> BoseEinstein statistics<br/><br/> <b>Awards:</b> Padma Vibhushan in 1954. </body> </html> cvraman.html <html> <body> <b>Full name:</b> Sir Chandrasekhara Venkata Raman<br/><br/> <b>Born:</b> November 7, 1888, Thiruvanaikaval <br/><br/> <b>Died:</b> November 21, 1970, Bangalore<br/><br/> <b>Parents:</b> Parvathi Ammal, R. Chandrasekhar Iyer<br/><br/> <b>Education:</b>Presidency College, Chennai (1907), Presidency College, Chennai (19021904), University of Madras<br/><br/> <b>Fields:</b>Physics<br/><br/> <b>Discovered:</b>Scattering of light<br/><br/> <b>Awards:</b> Nobel Prize in Physics, Bharat Ratna, Lenin Peace Prize, Hughes Medal, Franklin Medal, Matteucci Medal
MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG PAGE NO:

CS2358 - INTERNET PROGRAMMING

</body> </html> ramanujan.html <html> <body> <b>Full name:</b>Srinivasa Ramanujan<br/><br/> <b>Born:</b>December 22, 1887, Erode<br/><br/> <b>Died:</b>April 26, 1920, Chetput, Chennai<br/><br/> <b>Parents:</b> Komalatammal, K. Srinivasa Iyengar<br/><br/> <b>Education:</b>Trinity College, Cambridge (19191920), University of Cambridge (19141919), University of Cambridge (1916), Government Arts College, Kumbakonam (19041906), Town Higher Secondary School (1904), Pachaiyappa's College, University of Madras<br/><br/> <b>Fields:</b>Mathematics<br/><br/> <b>Books:</b> The Lost Notebook and Other Unpublished Papers: Mathematical Works of Srinivasa Ramanujan, The lost notebook and other unpublished papers. </body> </html> apj.html <html> <body> <b>Full name:</b>Avul Pakir Jainulabdeen Abdul Kalam<br/><br/> <b>Born:</b> October 15, 1931 (age 82), Rameswaram<br/><br/> <b>Previous office:</b>President of India (20022007)<br/><br/> <b>Parents:</b> Surenderanath Bose<br/><br/> <b>Education:</b> St. Joseph's College, Tiruchirappalli, and aerospace engineering at the Madras Institute of Technology (MIT), Chennai.<br/><br/> <b>Discovered:</b> Pokhran-II nuclear tests in 1998<br/><br/> <b>Awards:</b> Bharat Ratna in 1997, Padma Bhushan in 1981, Padma Vibhushan in 1990. </body> </html> cnrrao.html <html> <body> <b>Full name:</b>Chintamani Nagesa Ramachandra Rao<br/><br/> <b>Born:</b>June 30, 1934 (age 79), Bangalore<br/><br/> <b>Education:</b>Purdue University, Banaras Hindu University, University of Mysore<br/><br/> <b>Fields:</b>Chemistry<br/><br/> <b>Awards:</b>Padma Shri in 974,Bharat Ratna in 2013, Padma Vibhushan in 1985, Hughes Medal (2000), India Science Award (2004), </body> </html>
MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG PAGE NO:

CS2358 - INTERNET PROGRAMMING

EXP NO: 10 DATE:


OUTPUT: SCREENSHOTS

DISPLAYING INDIAN SCIENTISTS PROFILE USING AJAX

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

CS2358 - INTERNET PROGRAMMING

MRK IT - DEPARTMENT OF COMPUTER SCIENCE & ENGG

PAGE NO:

You might also like