0% found this document useful (0 votes)
9 views14 pages

Wtprac

Uploaded by

Ashutosh Sahni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views14 pages

Wtprac

Uploaded by

Ashutosh Sahni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 14

PROGRAM 1

Objective: Write HTML/Java scripts to display your CV in navigator, your Institute website,
Department Website and Tutorial website for specific subject.

<html>

<head><title>RESUME | JOHN DOE</title></head>

<body>

<!-- BEGIN DIV FOR OVERALL BOX -->

<div id="resume">

<!-- THIS DIV CENTERS OUR HEADING -->

<h1>John Doe</h1>

<h2>4242 Ghila Road</h2>

<h2>Tucson, AZ 85701</h2><br />

<!-- END CENTERING DIV -->

</div>

<h2>Profile</h2>

<p>

Desires a resident position in the Bastyr University Acupuncture and Oriental

Medicine Residency Program. Able to be effective in a practice of any size.

Draw on experience with a range of patient issues, including additional work

in women and children’s care. Interested in health education for homeless.

Strong desire to contribute to the success of a program through an ability to

initiate and maintain relationships. Creative developer and presenter of

educational information.

</p><br />

<h2>Education</h2>
<h3>Masters of Acupuncture and Oriental Medicine,<br />

Graduating June 2003</h3>

<p>Bastyr University, Kenmore, WA 1999</p>

<ul>

<li>Completing an accredited program of coursework and supervised practice in Acupuncture


and Oriental Medicine. Extensive exposure to issues involving women and children.</li>

</ul>

<h3>Research Project</h3>

<ul>

<li> Assisted the primary investigator in a double blind, randomized controlled trail conducted
at the Bastyr Center for Natural Health that evaluated the effectiveness of Chinese herbs
towards the control of Diabetes Mellitus in post-menopausal women. Co-authored the research
report that has been submitted for publication to the Journal of Traditional Chinese
Medicine.</li>

</ul>

<h3>Bachelor of Science, Zoology</h3>

<p> Miami University, Oxford, OH 1991 – 1995 </p>

<ul>

<li>Participated in a community service project to increase citizen participation in a clean up


campaign. </li>

<li> Served as project leader in a fund raising project sponsored by the UniversityStudent
Council towards helping homeless youths’ return back to school.</li>

</ul> <br />

<h2>Related Experience</h2>

<h3>Bastyr University, Kenmore, WA 1999-present</h3>

<p>Teaching Assistant</p>

<ul>
<li>Assists professor in the Anatomy & Physiology class.</li>

<li>Answers questions and demonstrate as needed.</li>

</ul>

<h3>Kenmore Youth Ministry, Kenmore, WA 2000-2001</h3>

<p>Camp Group Leader</p>

<ul>

<li> Participated in community youth group activities. </li>

<li> Developed activity programs now utilized by the youth ministry in helping children improve
reading skills.</li>

</ul>

<h3>Franciscan Care Center Nursing Home,<br />

Seattle, WA 1999 - 2000 </h3>

<p> Volunteer Recreation Worker </p>

<ul><li> Provided social support to patients by reading to them, writing letters, and visiting with
them. </li>

<li> Formed friendships which enriched lives of patients </li></ul>

<!-- THIS DIV CENTERS OUR LINKS -->

<div id="bottom">

<p><a href="index.html">RESUME HOME</a> | <a href="#">SIMPLE RESUME</a> |

<a href="resume.html">COMPLEX RESUME</a> | <a href="code.html" target="_blank">SEE


HTML</a> | <a href="resume.css" target="_blank">SEE CSS</a></p>

</div>

<!-- END CENTERING LINKS -->

<!-- END DIV FOR OVERALL BOX -->

</div></body></html>
PROGRAM-2

Objective: Write an HTML program to design an entry form of student details and send it to
store at database server like SQL, Oracle or MS Access.

<!DOCTYPE html>

<html>

<head><title>PHP insertion</title>

<link href="css/insert.css" rel="stylesheet"></head>

<body>

<div class="maindiv">

<!--HTML Form -->

<div class="form_div">

<div class="title">

<h2>Insert Data In Database Using PHP.</h2>

</div>

<form action="insert.php" method="post">

<!-- Method can be set as POST for hiding values in URL-->

<h2>Form</h2>

<label>Name:</label>

<input class="input" name="name" type="text" value="">

<label>Email:</label>

<input class="input" name="email" type="text" value="">

<label>Contact:</label>

<input class="input" name="contact" type="text" value="">

<label>Address:</label>

<textarea cols="25" name="address" rows="5"></textarea><br>


<input class="submit" name="submit" type="submit" value="Insert">

</form></div></div></body></html>

<?php

$connection = mysql_connect("localhost", "root", ""); // Establishing

Connection with Server

$db = mysql_select_db("colleges", $connection); // Selecting Database from

Server

if(isset($_POST['submit'])){ // Fetching variables of the form which travels in

URL

$name = $_POST['name'];

$email = $_POST['email'];

$contact = $_POST['contact'];

$address = $_POST['address'];

if($name !=''||$email !=''){

//Insert Query of SQL

$query = mysql_query("insert into students(student_name, student_email,

student_contact, student_address) values ('$name', '$email', '$contact',

'$address')");

echo "<br/><br/><span>Data Inserted successfully...!!</span>";

} else{

echo "<p>Insertion Failed <br/> Some Fields are Blank....!!</p>";

}}

mysql_close($connection); // Closing Connection with Server

?>
PROGRAM 3

Objective: Write programs using Java script for Web Page to display browsers information.

<!DOCTYPE HTML>

<html>

<head> <title> Get browser details through JavaScript</title> </head>

<body>

<!-- The text field -->

<div id="example"></div>

<script>

txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";

txt+= "<p>Browser Name: " + navigator.appName + "</p>";

txt+= "<p>Browser Version: " + navigator.appVersion + "</p>";

document.getElementById("example").innerHTML=txt;

</script>

</body>

</html>
PROGRAM 4

Objective: Write a Java applet to display the Application Program screen i.e. calculator and
other.

import java.awt.*;
import java.awt.event.*;
import java.applet.*;
/* <applet code="Calculator" width="700" height="200">
</applet>*/
public class Calculator extends Applet implements ActionListener {
String msg = "";
TextField t1, t2, t3;
Button b1, b2, b3, b4;
Label l1, l2, l3;
public void init() {
l1 = new Label("First Number");
add(l1);
t1 = new TextField(15);
add(t1);
l2 = new Label("Second Number");
add(l2);
t2 = new TextField(15);
add(t2);
l3 = new Label("Result");
add(l3);
t3 = new TextField(15);
add(t3);
b1 = new Button("ADD");
add(b1);
b1.addActionListener(this);
b2 = new Button("SUB");
add(b2);
b2.addActionListener(this);
b3 = new Button("MULT");
add(b3);
b3.addActionListener(this);
b4 = new Button("DIV");
add(b4);
b4.addActionListener(this);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == b1) {
int x = Integer.parseInt(t1.getText());
int y = Integer.parseInt(t2.getText());
int sum = x + y;
t3.setText(" " + sum);
}
if (e.getSource() == b2) {
int x = Integer.parseInt(t1.getText());
int y = Integer.parseInt(t2.getText());
int sub = x - y;
t3.setText(" " + sub);
}
if (e.getSource() == b3) {
int x = Integer.parseInt(t1.getText());
int y = Integer.parseInt(t2.getText());
int mul = x * y;
t3.setText(" " + mul);
}
if (e.getSource() == b4) {
int x = Integer.parseInt(t1.getText());
int y = Integer.parseInt(t2.getText());
int div = x / y;
t3.setText(" " + div);
}
showStatus(" text & button example");
repaint();
}
}
PROGRAM 5

Objective: Writing program in XML for creation of DTD, which specifies set of rules. Create a
style sheet in CSS/ XSL & display the document in internet explorer.

<?xml version="1.0" encoding="UTF-8"?>


<?xml-stylesheet type="text/css" href="Rule.css"?>
<books>
<heading>program 5 </heading>
<book>
<title>Title -: Web Programming</title>
<author>Author -: Chrisbates</author>
<publisher>Publisher -: Wiley</publisher>
<edition>Edition -: 3</edition>
<price> Price -: 300</price>
</book>
<book>
<title>Title -: Internet world-wide-web</title>
<author>Author -: Ditel</author>
<publisher>Publisher -: Pearson</publisher>
<edition>Edition -: 3</edition>
<price>Price -: 400</price>
</book>
<book>
<title>Title -: Computer Networks</title>
<author>Author -: Foruouzan</author>
<publisher>Publisher -: Mc Graw Hill</publisher>
<edition>Edition -: 5</edition>
<price>Price -: 700</price>
</book>
<book>
<title>Title -: DBMS Concepts</title>
<author>Author -: Navath</author>
<publisher>Publisher -: Oxford</publisher>
<edition>Edition -: 5</edition>
<price>Price -: 600</price>
</book>
<book>
<title>Title -: Linux Programming</title>
<author>Author -: Subhitab Das</author>
<publisher>Publisher -: Oxford</publisher>
<edition>Edition -: 8</edition>
<price>Price -: 300</price>
</book>
</books>
PROGRAM 6

Objective: Program to illustrate JDBC connectivity. Program for maintaining database by


sending queries. Design and implement a simple servlet book query with the help of JDBC &
SQL. Create MS Access Database, create on ODBC link, Compile & execute JAVA JDVC Socket.

//STEP 1. Import required packages

import java.sql.*;

public class FirstExample {

// JDBC driver name and database URL

static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";

static final String DB_URL = "jdbc:mysql://localhost/EMP";

// Database credentials

static final String USER = "username";

static final String PASS = "password";

public static void main(String[] args) {

Connection conn = null;

Statement stmt = null;

try{

//STEP 2: Register JDBC driver

Class.forName("com.mysql.jdbc.Driver");

//STEP 3: Open a connection

System.out.println("Connecting to database...");

conn = DriverManager.getConnection(DB_URL,USER,PASS);

//STEP 4: Execute a query

System.out.println("Creating statement...");
stmt = conn.createStatement();

String sql;

sql = "SELECT id, first, last, age FROM Employees";

ResultSet rs = stmt.executeQuery(sql);

//STEP 5: Extract data from result set

while(rs.next()){

//Retrieve by column name

int id = rs.getInt("id");

int age = rs.getInt("age");

String first = rs.getString("first");

String last = rs.getString("last");

//Display values

System.out.print("ID: " + id);

System.out.print(", Age: " + age);

System.out.print(", First: " + first);

System.out.println(", Last: " + last);

//STEP 6: Clean-up environment

rs.close();

stmt.close();

conn.close();

}catch(SQLException se){

//Handle errors for JDBC

se.printStackTrace();
}catch(Exception e){

//Handle errors for Class.forName

e.printStackTrace();

}finally{

//finally block used to close resources

try{

if(stmt!=null)

stmt.close();

}catch(SQLException se2){

}// nothing we can do

try{

if(conn!=null)

conn.close();

}catch(SQLException se){

se.printStackTrace();

}//end finally try

}//end try

System.out.println("Goodbye!");

}//end main

}//end FirstExample
PROGRAM 7

Objective: Install TOMCAT web server and APACHE. Access the above developed static web
pages for books web site, using these servers by putting the web pages developed.

You must set the JAVA_HOME environment variable to tell Tomcat where to find Java.

Turn on Servlet Reloading

To turn on servlet reloading, edit install_dir/conf/server.xml and add a DefaultContext


subelement to the main Host element and supply true for the reloadable attribute. For
example, in Tomcat 5.0.27, search for this entry:

<Host name="localhost" debug="0" appBase="webapps" ...>

and then insert the following immediately below it:

<DefaultContext reloadable="true"/>

Be sure to make a backup copy of server.xm before making the above change.

Enable the Invoker Servlet

To enable the invoker servlet, uncomment the following servlet and servlet-mapping elements
in

install_dir/conf/web.xml. Finally, remember to make a backup copyof the original version of


this

file before you make the changes.

<servlet>

<servlet-name>invoker</servlet-name>

<servlet-class>

org.apache.catalina.servlets.InvokerServlet

</servlet-class>

</servlet>


<servlet-mapping>

<servlet-name>invoker</servlet-name>

<url-pattern>/servlet/*</url-pattern>

</servlet-mapping>.

PROGRAM 8

Objective: Install a database (Mysql or Oracle). Create a table which should contain at least the
following fields: name, password, email-id, phone number Write a java program/servlet/JSP to
connect to that database and extract data from the tables and display them. Insert the details
of the users who register with the web site, whenever a new user clicks the submit button in
the registration page.

Code:

CREATE TABLE `users` (

`user_name` VARCHAR(100) NOT NULL,

`password` VARCHAR(100) NOT NULL,

`phone_number` NUMBER(100) NOT NULL,

`email_address` VARCHAR(50) NOT NULL,

PRIMARY KEY (`user_name`)

COLLATE='latin1_swedish_ci'

ENGINE=InnoDB

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy