Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 83

ABSTRACT

The project titled “Video On Demand” was developed using JAVA1.6,

JMF2.1.1.e(Java Media Framework), which is specially used for playing

Multimedia files like Audio and Video.

Normally, we used to play multimedia files using Windows Media Player,

Winamp, Real Player , etc., They are meant for playing media files for single user

and files which are stored only in his system.

“Video on Demand” was developed mainly to play multimedia files in a

network environment using client server system. By which any user can play any

file in his system from the server according to his wish. Another advantage in this

project is more than one user can play media files at the same time because they

are independent of each other . so different users can play different files in their

system.

The project was mainly developed in java to achieve platform neutrality

and to attain multi programming . The project “Video on Demand” was

developed to support all kind of Media Files such as Avi, mpg, mp3, au, wav, mov

, etc.,
SYSTEM STUDY
INTRODUCTION

Preliminary investigation examine project feasibility, the likelihood the


system will be useful to the organization. The main objective of the feasibility
study is to test the Technical, Operational and Economical feasibility for adding
new modules and debugging old running system. All system is feasible if they are
unlimited resources and infinite time. There are aspects in the feasibility study
portion of the preliminary investigation:

 Technical Feasibility
 Operation Feasibility
 Economical Feasibility

3.1 TECHNICAL FEASIBILITY


The technical issue usually raised during the feasibility stage of the
investigation includes the following:
 Does the necessary technology exist to do what is suggested?
 Do the proposed equipments have the technical capacity to hold the data
required to use the new system?
 Will the proposed system provide adequate response to inquiries,
regardless of the number or location of users?
 Can the system be upgraded if developed?
 Are there technical guarantees of accuracy, reliability, ease of access and
data security?

Earlier no system existed to cater to the needs of ‘Secure Infrastructure


Implementation System’. The current system developed is technically feasible. It
is a web based user interface for audit workflow at NIC-CSD. Thus it provides an
easy access to the users. The database’s purpose is to create, establish and
maintain a workflow among various entities in order to facilitate all concerned
users in their various capacities or roles. Permission to the users would be granted
based on the roles specified. Therefore, it provides the technical guarantee of
accuracy, reliability and security. The software and hard requirements for the
development of this project are not many and are already available in-house at
NIC or are available as free as open source. The work for the project is done with
the current equipment and existing software technology. Necessary bandwidth
exists for providing a fast feedback to the users irrespective of the number of users
using the system.

OPERATIONAL FEASIBILITY
Proposed projects are beneficial only if they can be turned out into
information system. That will meet the organization’s operating requirements.
Operational feasibility aspects of the project are to be taken as an important part of
the project implementation. Some of the important issues raised are to test the
operational feasibility of a project includes the following: -
 Is there sufficient support for the management from the users?
 Will the system be used and work properly if it is being developed and
implemented?
 Will there be any resistance from the user that will undermine the possible
application benefits?
This system is targeted to be in accordance with the above-mentioned
issues. Beforehand, the management issues and user requirements have been taken
into consideration. So there is no question of resistance from the users that can
undermine the possible application benefits.
The well-planned design would ensure the optimal utilization of the computer
resources and would help in the improvement of performance status.
ECONOMIC FEASIBILITY
A system can be developed technically and that will be used if installed
must still be a good investment for the organization. In the economical feasibility,
the development cost in creating the system is evaluated against the ultimate
benefit derived from the new systems. Financial benefits must equal or exceed the
costs.
The system is economically feasible. It does not require any addition
hardware or software. Since the interface for this system is developed using the
existing resources and technologies available at NIC, There is nominal
expenditure and economical feasibility for certain.
SYSTEM REQUIREMENTS

HARDWARE CONFIGURATION

 PROCESSOR P3 800 Mhz

 RAM 128 mb sd RAM

 HARD DISK 20 gb

 KEY BOARD TVS Gold

 MOUSE Logitech Serial Mouse

 MONITOR LG Studio Works.

SOFTWARE CONFIGURATION

 SCRIPTING LANGUAGES JavaScript

 LANGUAGES JAVA 2.0

 APPLICATION PROGRAMMING

INTERFACES JMF2.1.1.e, JSDK2.1

 WEB TOOLS HTML

 DATABASE Oracle 8.0

 SUPPORTING TOOLS Adobe Photoshop,

Adobe Image Ready

Ulead Photo Impact

 WEB SERVER Java Web Server 2.0

 BROWSER Internet Explorer 6.0


Netscape Navigator

PROJECT DESCRIPTION

To develop a project which aimed to play all kind of media files in a

network environment which accepts requests from more than one user and play

the particular file in the user system.

The administrator of the project can add new media files and remove

existing files. Add new users, provide confirmations to the user.

Any user who got registred after filling the sign up form can enter and

view list of audio and video files and play the media files of his wish.

ABOUT PROJECT

Sections

This project has several sections. There are all shown here.

 Welcome Screen

 User Registration Screen

 Log on Screen

 Main Screen

 Audio Screen

 Video Screen

 Welcome Screen

This is the introduction for my project contains a video file welcomes you

all. This page is fully designed in HTML Hyper Text Mark Up Language using

the mpg video file created by me. After certain time limit the page automatically

opens the user registration screen.


User Registration Screen

In this screen the user register his name and password. Only the

registered users can enter in my project. Here High level validations are

maintained. One user should not get the existing name. And all the fields should

be entered by the user. I get the values of this form when user clicks on the submit

button and from servlet the server get the all values and store all of them to the

database.

Log On Screen

In this screen the registered users can enter from this. Here also

validation for registered users. If one gives a wrong information he redirected to

the logon screen with an error messages. If the user enters a valid user name and

password he is redirected to the main page. In this log on screen we use the

userinfo table.

Main Screen

This screen displays the links for the audio, video and log off

buttons. When we click the corresponding button we get the corresponding pages

from it.

Audio Screen

We get the screen from the audio button clicked in the previous

Main Screen. Main Screen get the audio files from the server and creates a web

page and replaces the current document location. In this page the audio files are

placed in the combobox. Then we click any of the song means extension by mp3.

Video Screen
We get the screen from the video button clicked in the previous

Main Screen.

SOFTWARE DESCRIPTION

What Java Is

The basics: Java is an object-oriented programming language developed

by Sun Microsystems that plays to the strengths of the Internet. Object-oriented

programming (OOP) is an unusual but powerful way to develop software. The

feature that is best known about Java is that it can be used to create programs that

execute from World Wide Web pages. These programs are called applets.

Java programs made such a big splash on the Web because they offered

interactivity in a medium that was largely one way. A Java applet running on a

Web page provides a much richer experience-both in terms of information and

user interaction.

Java Is Internationally Beloved

Java has quickly become a popular choice for computer programming-both

on and off the Internet. A lot of the initial interest undoubtedly came from people

who wanted to know whether Java lived up to the hype. In a short time, the

language has become one of the biggest buzzwords of the Internet, spawning

magazines, Web sites, training courses, conferences, and more than 120 books.

Java Is Object Oriented

Java inherits its object-oriented concepts from C++ and other languages

such as Smalltalk. The fact that a programming language is object oriented may

not seem like a benefit to some. Object-oriented programming can be an

intimidating subject to tackle, even if you have some experience programming


with other languages. However, object-oriented programs are more adaptable for

use in other projects, easier to understand, and more bug proof.

Java Is Platform Independent

Platform independence is another way of saying that Java is architecture

neutral. Platform independence is the ability of the same program to work on

different operating systems; Java is completely platform independent. Java's

variable types have the same size across all Java development platforms-so an

integer is always the same size, no matter which system a Java program was

written and compiled on. Also, as shown by the use of applets on the Web, a

Java .class file of byte code instructions can execute on any platform without

alteration. Sun Microsystems has been aggressive in making Java available on

different systems.

The Java API

The Java Application Programming Interface (API) is a set of classes used

to develop Java programs. These classes are organized into groups called

packages. There are packages for the following tasks:

 Numeric variable and string manipulation

 Image creation and manipulation

 File input and output

 Networking

 Windowing and graphical user interface design

 Applet programming

 Error handling
 The API includes enough functionality to create sophisticated

applets and applications.

The Java API must be supported by all operating systems and Web

software equipped to execute Java programs, so you can count on the existence of

Java API class files when developing programs.

The Windowing (AWT) Package

The Java Abstract Windowing Toolkit (AWT) is a general-purpose,

multiplatform windowing library. The AWT provides classes that encapsulate

many useful graphical user interface (GUI) components (also called widgets or

controls). The AWT also includes classes to manage component layout and utility

classes to handle fonts, colors, and other GUI-related items. Because Java is a

multiplatform solution, the AWT provides a common interface to the native GUI

components on a wide variety of platforms. This abstraction makes the AWT

highly portable.

Java Component Class Hierarchy:

The components in this hierarchy can be divided into the following

functional groups:

Simple widgets (buttons, checkboxes, and so on)

Text controls

The Canvas class

Simple Widgets:

The Java AWT encapsulates many of the controls common to most GUIs.

Specifically, these are the Button, Checkbox, Choice, Label, List, and Scrollbar

classes.
Text Controls:

The AWT contains a group of controls whose purpose is to allow users to

enter and display text. Unlike the simple widgets just discussed, the text controls

let users enter freeform text into applications.

AWT Text Component Hierarchy:

Text Component is an abstract base class. It provides common methods for

displaying text, getting text from the user, and selecting portions of text. The base

class also allows the control to be made editable or read-only. The Text Field class

encapsulates a nonscrollable text box. Text Field controls is commonly used to

allow users to enter single values.

The Canvas Class:

The AWT Canvas class is a generic Component class. The Canvas class is

most often used to display images. It is also used as the background for user

drawing.

The Container Class:

The AWT Container class is a Component class that can contain other

Component objects. Although Container is an abstract class, its derived classes are

among the most useful in the AWT.

Container Class Hierarchy:

Container classes are the basic frameworks from which you build the GUI

components of your applets. The Container hierarchy can be divided into two

categories: the Panel and Window classes.

The Panel Class:


The Panel class is a generic Container class. Panel is not an abstract class

and can be instantiated or sub classed. Panels are Java's multipurpose containers

and do not provide any special functionality-except for the capability to embed

other GUI objects. Panels give you a convenient method of forming composite

controls. The Panel class performs one other important function: It is the super

class of the AWT Applet class. This makes sense because one of the things you do

with applets is embed controls in them.

Event Handling:

In Java, most of the programming you do is event driven. This means that

Java programs spend a lot of time waiting for someone to do something. For

example, when a user presses a button, your applet must provide a method that is

executed in response to that event. The Demo Frame class uses the action()

method to respond to events.

Layout Classes:

The AWT contains a group of classes designed to handle placement of

controls in Container objects. These are the layout classes. All layout classes are

derived directly from Object. These classes all implement the Layout Manager

interface.

The AWT implements the following layout classes:

Flow Layout

Border Layout

Card Layout

Grid Layout

GridBagLayout
The I/O Package:

The Java I/O package provides an extensive set of classes that handle input

and output to and from many different devices. The I/O package, also known as

java.io, contains many classes, each with a variety of member variables and

methods. This chapter does not take an exhaustive look at every class and method

contained in the I/O package. Instead, you can view this chapter as a tutorial on

how to perform basic input and output using the more popular I/O classes.

The Networking Package:

This serves as an introduction to the package containing Java's networking

facilities. It covers the classes, interfaces, and exceptions that make up the java.net

package.

Classes

The classes in the networking package fall into three general categories:

Web interface classes. The URL and URLConnection classes provide a

quick and easy way to access content using Uniform Resource Locators. This

content may be located on the local machine or anywhere on the WWW. The

URLEncoder class provides a way to convert text for use as arguments for CGI

scripts.

Raw network interface classes. Socket, ServerSocket, DatagramSocket,

and InetAddress are the classes that provide access to plain, bare-bones

networking facilities. They are the building blocks for implementing new

protocols, talking to preexisting servers, and the like.

Extension classes. The ContentHandler and URLStreamHandler abstract

classes are used to extend the capabilities of the URL class.


Keep in mind that some of the java.net classes (such as

URLConnection and ContentHandler) are abstract classes and cannot be directly

instantiated. Subclasses provide the actual implementations for the different

protocols and contents.

Exceptions:

Java's exception system allows for flexible error handling. The java.net

package defines five new exceptions, which are described in the following

sections. All these exceptions provide the same functionality as any

java.lang.Exception object.

Interfaces:

The java.net package defines three interfaces. These interfaces are used

primarily behind the scenes by the other networking classes rather than by user

classes. Unless you are porting Java to a new platform or are extending it to use a

new socket protocol, you probably will have no need to implement these

interfaces in a class. They are included here for completeness and for those people

who like to take off the cover and poke around in the innards to find out how

things work.

Using TCP/IP:

Our client/server application starts with the server. Java provides a

ServerSocket class that listens to a port and waits for clients to connect. When an

application creates a ServerSocket, it passes a port number to the constructor. The

application then repeatedly calls the ServerSocket accept() method. That method

blocks application processing until a client connects. Once a client does connect,

accept() returns a Java Socket object representing the connection to the client
machine. The server then creates a new thread for the processing of data related to

this connection.

Because of the way Java sockets are engineered, client and server

operations are nearly identical. The major differences are that the server

communicates with multiple clients but the client communicates with only a

single server, and that the server has to create a listen port for initial connections.

The JDBC API:

To provide a common base API for accessing data, Sun (with support from

a number of independent software vendors) developed JDBC. JDBC defines a

number of Java interfaces to enable developers to access data independently of the

actual database product being used to store the data. In theory, an application

written against the basic JDBC API using only SQL-2 can function against any

database technology that supports SQL-2.

Database Requirements:

Data can be stored in a wide variety of formats using various technologies.

Most systems currently use one of three major database management systems:

Relational databases (RDBMS)

Object-relational databases (OORDBMS)

Object-oriented databases (OODBMS)

The JDBC Interfaces

JDBC defines eight interfaces that must be implemented by a driver in

order to be JDBC-compliant:

java.sql.Driver

java.sql.Connection
java.sql.Statement

java.sql.PreparedStatement

java.sql.CallableStatement

java.sql.ResultSet

java.sql.ResultSetMetaData

java.sql.DatabaseMetaData

The java.sql.Driver Interface

A Driver is essentially a Connection factory. The DriverManager uses a

Driver to determine whether it can handle a given URL. If one of the Drivers in its

list can handle the URL, that Driver should create a Connection object and return

it to the DriverManager. Because an application only indirectly references a

Driver through the DriverManager, applications are rarely concerned with this

interface.

The java.sql.Connection Interface:

A Connection is a single database session. As such, it stores state

information about the database session it manages and provides the application

with Statement, Prepared Statement, or Callable Statement objects for making

calls during the session.

The java.sql.Statement Interface:

A Statement is an unbound SQL call to the database. It is generally a

simple UPDATE, DELETE, INSERT, or SELECT statement in which no columns

must be bound to Java data. A Statement provides methods for making such calls

and returns to the application the results of any SELECT statement or the number

of rows affected by an UPDATE, DELETE, or INSERT statement.


The java.sql.ResultSet Interface:

An application gets data returned by a SELECT query through the

implementer of the java.sql.ResultSet interface. Specifically, the ResultSet object

enables an application to retrieve sequential rows of data returned from a previous

SELECT call. The ResultSet provides a multitude of methods that enable you to

retrieve a given row as any data type to which it makes sense to convert it. For

example, if you have a date stored in the database as a datetime, you can retrieve it

through the getString() method and use it as a String.

Result Sets and the Meta-Data Interfaces:

In simple applications such as the Counter applet just described, there is no

need to perform any tricks with the results from a query. The data is simply

retrieved sequentially and processed. More commonly, however, an application

will need to process the data in a more complex fashion. In the View class,

reference is made to a DataObject class that implements a

restore(java.util.Hashtable) method not listed.

SERVLETS

HTTP:

The Hypertext Transfer Protocol is a stateless TCP/IP based protocol used

for communicating on the World Wide Web. HTTP defines the precise manner

in which Web clients communicate the Web servers. HTTP/1.0 is the most

common version in use today.

HTTP Basics:

A conversation between Web browser and Web server goes something like

this: the client opens a connection to the server, the client makes a request to the
server, the server responds to the request, and the connection is closed. To better

illustrate an HTTP conversation between a browser and a server, let’s step through

the four stages of a simple Web transaction.

 The client opens a connection to the server.

 The client makes a request to the server.

 The server responds to the requests.

 The connection is closed.

Connectionless Protocol:

HTTP is a Connectionless Protocol. Using the Connectionless

Protocol, the client opens a connection with the server, sends a request, receives a

response, and closes the connection. With the connection oriented protocol, the

client connects to the server, sends a request, receives a response, and then holds

the connection open in order to service future requests. The drawback to

connectionless protocol is that a connection must be established with every

request. Opening the new connection with each request incurs a performance

penalty that translates into additional delays for the user.

A connection-oriented protocol such as FTP has a strong

performance advantage over a connectionless protocol. This is due to the fact

that the overhead required to open an new connection is incurred only once rather

than with every request. In contrast to a Web site, an FTP site can rarely support

more than a few hundred users at a time.

Stateless Protocol:

HTTP is a Stateless Protocol. A protocol is said to be stateless if it

has no memory of prior connections and cannot distinguish one client’s request
from that of another. FTP is a Stateful Protocol, because the connection is not

opened and closed with every request. After the initial login, the FTP server

maintains the user’s credentials throughout the session. Due to its stateless nature,

there is no inherent method in HTTP for tracking a client’s traversal of a Web

Site.

The stateless nature of HTTP is both a strength and a weakness. It

is a strength in that its stateless nature keeps the protocol simple and

straightforward. The disadvantages is in the overhead required to create a new

connection with each request and the inability to track a single user as he traverses

a Web site.

GET Method:

GET method is common method in HTTP. It is used to request a

resource from the server. Containing no body content, a GET request is

comprised of only a method statement and various request header fields. The

GET method is normally used to request the static data. Responses to GET

requests are often cached by proxy server for use in future requests. A drawback

to using a GET method for login reinsertions is that the information entered by

the user is appended to the URL and displayed in plain text by the browser.

Therefore, if a user enters login information and click Submit the username and

password will be visible in the URL on the next page. Another disadvantage is

that a limited amount of data can be passed as part of the URL in a GET request.

POST Method:

POST is an HTTP method commonly used for passing user input to

the server. This method is differ from the GET method in that all parameter
information is stored in the body of the request rather than in the portion of the

method statement.

POST is designed to allow a uniform method to cover the following

functions:

Annotation of existing resources;

Posting a message to a bulletin board, newsgroup, mailing list, or simple

group of articles;

Providing a block of data, such as the result of submitting a form, to a

data-handling process;

Extending a database through an append operation

Advantages:

The information submitted by the user is not visible in the URL.

There is no limit to the amount of information that can be passed when it is

stored in the body of the request.

The POST is typically generated by the browser in response to the user

clicking the Submit button on an HTML form that utilizes the POST method. The

POST method is used to request the dynamic data. Therefore, the responses to

POST should not be cached.

HEAD Method:

The HEAD method is identical to the GET method except that it

only returns the HTTP header—the body content is excluded. The HTTP header

is returned by the server in response to a HEAD request should be identical to the

header that would have been returned in response to a GET. This method is very

useful for debugging, verifying hypertext links, or checking the status of a file
before attempting to retrieve it. Using HEAD makes it possible to check when a

file was last modified or to check the length of the file without actually having to

download.

PUT Method:

PUT method requests that the enclosed entity be stored under the

supplied Request-URI. If the Request-URI refers to an already existing resource,

the enclosed entity should be considered as a modified version of the one residing

on the origin server. If the Request-URI does not point to an existing resource,

and that URI is capable of being defined as a new resource by the requesting user

agent, the origin server can create the resource with that URI. The Fundamental

difference between POST and PUT requests is reflected in the different meaning

of the Request-URI .The URI in the POST request identifies the resource that will

handle the enclosed entity. In contrast, the URI in a PUT request identifies the

entity enclosed with the request-the user agent knows what URI is intended and

the server must not attempt to apply the request to some other resource.

<FORM> TAG:

Each HTML form consists of a block of code beginning with the

<FORM> tag and ending with </FORM> tag. Any standard HTML body tags

may be included within this block. The <FORM> tag specifies these three

attributes:

The HTTP method to be used to submit the form

The action to be performed when the form is submitted

The type of encoding to be used when submitting the form

METHOD Attribute:
The METHOD attribute specifies the HTTP method to use when the form

is submitted. The two possible methods are GET and POST. If a POST method

is used, the user’s input is passed within the body of the request. Due to the

length constraints of the GET method, in most circumstances it is preferable to use

a POST. If no METHOD is defined within the <FORM> tag, the GET method is

used by default.

ACTION Attribute:

ACTION attribute specifies the action that is to be performed when the

used submits the form. Usually the action attribute indicates the URL of the script

or servlet that will process the user’s input. Rather than specifying a URL, it is

also possible to indicate an action by name. Currently, the only action supported

by most software is the mail to directive.

INPUT Tag:

A form only becomes useful once the appropriate input elements are added

to it. Within a form block, input components such as textboxes, radio buttons, and

checkboxes can be added to the HTML page using special tags. The exact type of

component is specified with the TYPE attribute.

TYPE Attribute:

The TYPE Attribute defines the exact type of input component represented

by the <INPUT>tag.

TEXTAREA Tag:

TEXTAREA tag displays a multiline textbox that is useful for collecting

large amounts of text from the client.

Retrieving Documents on the Web: URL


URL standards for Uniform Resource Locator. The URL specifies the

Internet address of a file stored on a host computer connected to the Internet. Web

software programs use the URL to retrieve the file from the host computer and the

directory in which it resides. URL’s are translated into numeric addresses using

the Internet Domain Name System(DNS).

Protocol:

Protocols are a set of procedures and customs that aid in

communication and relationships between people. When used in the computer

networking, a protocol has a similar meaning, but is more specific. A network

protocol is the set of very detailed rules, sequences, message formats, and

procedures that computer systems use and understand when exchanging data with

each other. Network protocols are layered on top of each other, with each layer

providing additional capabilities, but using the facilities provided by the lower

layer.

TCP:

TCP/IP is a set of protocols developed to allow cooperating

computers to share resources across a network. It was developed by a community

of researches centered around the ARPAnet. The IP layer doesn’t provide many

capabilities other than sending chunks of data back and forth. The TCP protocol

provides a virtual connection between two systems, along with certain guarantees

on the data chunks(called ‘packets’) that are passed between the systems. Two

guarantees are retransmission of packets that are dropped and ensuring that the

packets are received in the same order that they are sent. A third guarantee is that
each packet received by the applications has exactly the same content as when it

was sent. If a bit has changed or been dropped form some reason, TCP will detect

it and cause the packet to be re-transmitted.

Main Web Server: httpd

When the request goes to the server, Web server, also known as the

httpd takes over. It knows where it stores Web objects, and it tracks down the one

you asked for. It might pass your request off to another process, and wait for a

reply. When it gets what it asked for, it sends the object back to our browser.

Document includes several different graphic files as well as the HTML

you are reading, each of which is a separate object, the server will send each of

these objects back individually.

The server actions can be more complicated than a simple object fetch, in

which case you will need to learn about CGI’s. The Common Gateway

Interface(CGI)is a standard for external gateway programs to interface with

information servers such as HTTP servers. This allow them to do transactions,

security, access other applications.

JAVA MEDIA FRAMEWORK

Introduction:

Java had support for one audio type(au), but playing complex types like

MIDI and WAV was not possible. In addition, video and animation could be done

by creating slide like presentations; but displaying AVI or MOV files again wasn’t

possible without a lot of work, even then it wasn’t practical. With the Java Media

Framework, Java has come of multimedia age. The Java Media Framework
provides the means to present all kinds of interesting media types. The Java

Media Framework is an API for integrating advanced media formats into Java,

such as video and sound. The media framework has several components,

including media players, media capture, and conferencing.

Controlling the Player Programmatically:

In addition to using the control panel, you can control the motion of the

programmer using methods in player. You might want to do this for several

reasons. One reason might be that you want to put up buttons to allow the player

to control the player, but you don’t want to use the default control panel.

Starting the Player:

Player has basic method-start(), which tells the player to start. However,

there is a more fundamental method that allows you to start a player and specify

when it will actually start displaying its media. The syncStart() method is the

method that actually causes the player to start.

Based on the state of the player, the start() method will sequentially call

first prefetch for all the players under its control and bring them into the

prefetched state, and then will call syncStart().

Setting Media Time:


Often you would like to take one video and jump around it. It’s not unlike

playing tracks two and five on your CD player without playing through the whole

CD. Fortunately, the media framework accomodates just such a need with the

setMediaTime() method. The setMediaTime() method takes a long number as a

parameter, and that number represents the time in nanoseconds.

Changing the Sound Volume:

The capability to change the volume of the sound for the player is very

important. To change the volume, the JMF has dedicated a whole class;

GainControl. The first step in changing the volume is to get the GainControl from

the player. To do so, you can invoke the getGainControl() method. Perhaps the

most obvious thing to do with the audio is to turn it off all together, or mute it. Lo

and behold, the GainControl class just happens to have a mute() method for this

purpose.

To change the GainControl’s volume level, you can use the setLevel()

method. There is also an accompanying getLevel() method to retrieve the level of

the GainControl.

JAVASCRIPT

JavaScript is a lightweight object-based scripting language created by

Netscape Communications Corporation for developing Internet applications.

JavaScript is lightweight in that there isn't a great deal to learn and you can be

productive with it very quickly, in contrast to much more complex languages such

as Java. You can develop server applications or client applications with


JavaScript. The term "client" refers to the browser application that loads and

displays your Web pages.

You can embed JavaScript statements in Web pages, which are written in

HTML (Hypertext Markup Language). JavaScript is an extension to HTML that

lets you create more sophisticated Web pages than you ever could with HTML

alone. To appreciate this, it helps to know a little history.

HTML 1.0 and 2.0:

HTML 1.0 refers to the original set of markup tags. HTML 1.0 is so

limited that a browser that restricted HTML documents to HTML 1.0 would be a

museum piece.

HTML 2.0 includes a more generous set of markup tags than HTML 1.0; in

particular, it allows markup tags that define user input fields. As of this writing,

HTML 2.0 defines the de facto common core of markup tags. You can create a

relatively sophisticated Web page with HTML 2.0 markup tags. Live Script:

Netscape began working on a scripting language called Live Script, which

quickly evolved into what is now JavaScript. Although JavaScript and Java are

not the same thing, Netscape intends JavaScript to tie into Java; hence the name

change. Netscape and Sun Microsystems (the developers of Java) are working

closely on the development of the two languages. There are few other major

differences between Live Script and JavaScript, the biggest being that Live Script

was case-insensitive and JavaScript is case-sensitive.


What JavaScript isn't:

JavaScript can provide a high degree of user interaction like some other

systems, including CGI and Java.

CGI:

The Common Gateway Interface (CGI) provides a mechanism for a

program on the server to interact with the client's browser. One popular use of

CGI is in hit counters-programs that modify the page to show how many times

that page has been visited. Another popular use of CGI is in form handling, where

a program on the server reads the data from the user input fields and does some

work based on that data.

A JavaScript page, however, can validate the data entered before it is sent

to the server. If the data is invalid, JavaScript can block transmission to the server.

Because all of this work is performed on the client side, JavaScript does not waste

bandwidth transmitting bad data and then receiving an error page from the server.

JavaScript can also replace some of the animation and page-reloading

functionality of CGI. To perform animation and page-reloading, CGI provides

mechanisms called "server push" and "client pull." With server push, the Web

page server maintains a connection between the client (the browser) and server.

JavaScript is independent of the server platform, the hardware and

software that your server uses. CGI has to be written in a language that your

server platform supports. No single language is supported by all server platforms.


MySQL

MySQL tutorial provides basic and advanced concepts of MySQL. Our MySQL
tutorial is designed for beginners and professionals.

MySQL is a relational database management system. It is open-source and free.

Our MySQL tutorial includes all topics of MySQL database such as insert record,
update record, delete record, select record, create table, drop table etc. There are
also given MySQL interview questions to help you better understand the MySQL
database.

What is MySQL

MySQL is a fast, easy to use relational database. It is currently the most popular
open-source database. It is very commonly used in conjunction with PHP scripts
to create powerful and dynamic server-side applications.

MySQL is used for many small and big businesses. It is developed, marketed and
supported by MySQL AB, a Swedish company. It is written in C and C++.

Reasons of popularity

MySQL is becoming so popular because of these following reasons:

o MySQL is an open-source database so you don't have to pay a single


penny to use it.
o MySQL is a very powerful program so it can handle a large set of
functionality of the most expensive and powerful database packages.
o MySQL is customizable because it is an open source database and the
open-source GPL license facilitates programmers to modify the SQL
software according to their own specific environment.
o MySQL is quicker than other databases so it can work well even with the
large data set.
o MySQL supports many operating systems with many languages like PHP,
PERL, C, C++, JAVA, etc.
o MySQL uses a standard form of the well-known SQL data language.
o MySQL is very friendly with PHP, the most popular language for web
development.
o MySQL supports large databases, up to 50 million rows or more in a table.
The default file size limit for a table is 4GB, but you can increase this (if
your operating system can handle it) to a theoretical limit of 8 million
terabytes (TB).

History of MySQL

MySQL is an open source database product that was created by MySQL AB, a
company founded in 1995 in Sweden. In 2008, MySQL AB announced that it had
agreed to be acquired by Sun Microsystems for approximately $1 billion.

Initial Efforts

The project of MySQL was started in 1979, when MySQL's inventor, Michael
Widenius developed an in-house database tool called UNIREG for managing
databases. After that UNIREG has been rewritten in several different languages
and extended to handle big databases. After some time Michael Widenius
contacted David Hughes, the author of mSQL, to see if Hughes would be
interested in connecting mSQL to UNIREG's B+ ISAM handler to provide
indexing to mSQL. That's the way MySQL came in existence.

MySQL is named after the daughter of Michael Widenius whose name is "My".

MySQL Features

o Relational Database Management System (RDBMS): MySQL is a


relational database management system.
o Easy to use: MySQL is easy to use. You have to get only the basic
knowledge of SQL. You can build and interact with MySQL with only a
few simple SQL statements.
o It is secure: MySQL consist of a solid data security layer that protects
sensitive data from intruders. Passwords are encrypted in MySQL.
o Client/ Server Architecture: MySQL follows a client /server
architecture. There is a database server (MySQL) and arbitrarily many
clients (application programs), which communicate with the server; that is,
they query data, save changes, etc.
o Free to download: MySQL is free to use and you can download it from
MySQL official website.
o It is scalable: MySQL can handle almost any amount of data, up to as
much as 50 million rows or more. The default file size limit is about 4 GB.
However, you can increase this number to a theoretical limit of 8 TB of
data.
o Compatibale on many operating systems: MySQL is compatible to run
on many operating systems, like Novell NetWare, Windows* Linux*,
many varieties of UNIX* (such as Sun* Solaris*, AIX, and DEC* UNIX),
OS/2, FreeBSD*, and others. MySQL also provides a facility that the
clients can run on the same computer as the server or on another computer
(communication via a local network or the Internet).
o Allows roll-back: MySQL allows transactions to be rolled back, commit
and crash recovery.
o High Performance: MySQL is faster, more reliable and cheaper because
of its unique storage engine architecture.
o High Flexibility: MySQL supports a large number of embedded
applications which makes MySQL very flexible.
o High Productivity: MySQL uses Triggers, Stored procedures and views
which allows the developer to give a higher productivity.

Disadvantages / Drawback of MySQL:

Following are the few disadvantages of MySQL:


o MySQL version less than 5.0 doesn't support ROLE, COMMIT and stored
procedure.
o MySQL does not support a very large database size as efficiently.
o MySQL doesn't handle transactions very efficiently and it is prone to data
corruption.
o MySQL is accused that it doesn't have a good developing and debugging
tool compared to paid databases.
o MySQL doesn't support SQL check constraints.
o MySQL Data Types
o A Data Type specifies a particular type of data, like integer, floating
points, Boolean etc. It also identifies the possible values for that type, the
operations that can be performed on that type and the way the values of
that type are stored.
o MySQL supports a lot number of SQL standard data types in various
categories. It uses many different data types broken into mainly three
categories: numeric, date and time, and string types.
o Numeric Data Type

Data Type Description


Syntax

INT A normal-sized integer that can be signed or


unsigned. If signed, the allowable range is from
-2147483648 to 2147483647. If unsigned, the
allowable range is from 0 to 4294967295. You
can specify a width of up to 11 digits.

TINYINT A very small integer that can be signed or


unsigned. If signed, the allowable range is from
-128 to 127. If unsigned, the allowable range is
from 0 to 255. You can specify a width of up to
4 digits.

SMALLINT A small integer that can be signed or unsigned.


If signed, the allowable range is from -32768 to
32767. If unsigned, the allowable range is from
0 to 65535. You can specify a width of up to 5
digits.

MEDIUMIN A medium-sized integer that can be signed or


T unsigned. If signed, the allowable range is from
-8388608 to 8388607. If unsigned, the allowable
range is from 0 to 16777215. You can specify a
width of up to 9 digits.

BIGINT A large integer that can be signed or unsigned. If


signed, the allowable range is from
-9223372036854775808 to
9223372036854775807. If unsigned, the
allowable range is from 0 to
18446744073709551615. You can specify a
width of up to 20 digits.

FLOAT(m,d) A floating-point number that cannot be


unsigned. You can define the display length (m)
and the number of decimals (d). This is not
required and will default to 10,2, where 2 is the
number of decimals and 10 is the total number
of digits (including decimals). Decimal precision
can go to 24 places for a float.
DOUBLE(m, A double precision floating-point number that
d) cannot be unsigned. You can define the display
length (m) and the number of decimals (d). This
is not required and will default to 16,4, where 4
is the number of decimals. Decimal precision
can go to 53 places for a double. Real is a
synonym for double.

DECIMAL( An unpacked floating-point number that cannot


m,d) be unsigned. In unpacked decimals, each
decimal corresponds to one byte. Defining the
display length (m) and the number of decimals
(d) is required. Numeric is a synonym for
decimal.

o Date and Time Data Type:

Data Type Syntax Maximum Size Explanation

DATE Values range from Displayed as 'yyyy-


'1000-01-01' to mm-dd'.
'9999-12-31'.

DATETIME Values range from Displayed as 'yyyy-


'1000-01-01 mm-dd hh:mm:ss'.
00:00:00' to '9999-
12-31 23:59:59'.

TIMESTAMP Values range from Displayed as


(m) '1970-01-01 'YYYY-MM-DD
00:00:01' UTC to HH:MM:SS'.
'2038-01-19
03:14:07' TC.

TIME Values range from '- Displayed as


838:59:59' to 'HH:MM:SS'.
'838:59:59'.

YEAR[(2|4)] Year value as 2 Default is 4 digits.


digits or 4 digits.

o String Data Types:

Data Type Syntax Maximum Size Explanation

CHAR(size) Maximum size of Where size is the


255 characters. number of
characters to
store. Fixed-
length strings.
Space padded on
right to equal size
characters.

VARCHAR(size) Maximum size of Where size is the


255 characters. number of
characters to
store. Variable-
length string.

TINYTEXT(size) Maximum size of Where size is the


255 characters. number of
characters to
store.

TEXT(size) Maximum size of Where size is the


65,535 characters. number of
characters to
store.

MEDIUMTEXT(s Maximum size of Where size is the


ize) 16,777,215 number of
characters. characters to
store.

LONGTEXT(size) Maximum size of Where size is the


4GB or number of
4,294,967,295 characters to
characters. store.

BINARY(size) Maximum size of Where size is the


255 characters. number of binary
characters to
store. Fixed-
length strings.
Space padded on
right to equal size
characters.
(introduced in
MySQL 4.1.2)

VARBINARY(siz Maximum size of Where size is the


e) 255 characters. number of
characters to
store. Variable-
length string.
(introduced in
MySQL 4.1.2)

o Large Object Data Types (LOB) Data Types:

Data Type Maximum Size


Syntax

TINYBLOB Maximum size of 255 bytes.

BLOB(size) Maximum size of 65,535 bytes.

MEDIUMBLO Maximum size of 16,777,215 bytes.


B

LONGTEXT Maximum size of 4gb or 4,294,967,295


characters.
SYSTEM DESIGN

DATA FLOW DIAGRAM

Data

Enter values

Register VOD(Server)

Login

Implementing
Java Media Framework

Getting
Media
Logout

Database Design
Table Name: log_det
Sl. No Field Name Data Type Data Size Constraint Related
to
1 User name Varchar2 15 Primary -
2 password Varchar2 8 Not null -

Table Name: personnal_det


Sl. No Field Name Data Type Data Size Constraint Related
to
1 Name Varchar2 25 Not null -
2 Age Number 2 Not null -
3 D.O.B. Date - Not null -
4 Sex Varchar2 6 Not null -
5 Emailaddress Varchar2 25 Primary -

Table Name: permit_user


Sl. No Field Name Data Type Data Size Constraint Related
to
1 User name Varchar2 15 Primary -
2 Name Varchar2 25 Not null -
3 Permission Varchar2 5 Not null -

Table Name: audio_record


Sl. No Field Name Data Type Data Size Constraint Related
to
1 Audio_id Varchar2 15 Primary -
2 Audio_name Varchar2 15 Not null -
3 Audio_size Varchar2 15 Not null -

Table Name: video_record


Sl. No Field Name Data Type Data Size Constraint Related
to
1 Video_id Varchar2 15 Primary -
2 video_name Varchar2 15 Not null -
3 Video_size Varchar2 15 Not null -

Table Name: backup_data


Sl. No Field Name Data Type Data Size Constraint Related
to
1 Data_date Date - Not null -
2 Data_id Varchar2 15 Not null -
3 Data_type Varchar2 15 Not null -
4 Ex_date Date - Not null -
SAMPLE CODE

Connect.java
package vod;

import java.sql.*;
import java.util.*;

public class DB
{
public static Statement getSt()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost/vod","root","password");
Statement stmt =
con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
return stmt;
}
catch(Exception ex)
{
System.out.println(ex);
return null;
}
}

public static boolean insertDB(String tname, String cols[])


{
try
{
String q1 = "insert into "+tname+" values(";
String q2 = "";
String q3 = ")";
for(int i = 0; i < cols.length; i++)
{
if(i < cols.length - 1)
{
q2 = q2 + "'"+cols[i]+"',";
}
else
{
q2 = q2 + "'"+cols[i]+"'";
}
}
String query = q1 + q2 + q3;

boolean bo = getSt().execute(query);

return bo;
}
catch(Exception ex)
{
System.out.println(ex);
return true;
}
}

public static String[] getData(String tname, String cname, String user)


{
try
{
String query = "select * from "+tname+" where
"+cname+"='" + user+"'";
ResultSet rs = getSt().executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
int n = rsmd.getColumnCount();
rs.next();
ArrayList<String> record = new ArrayList<String>();
for(int i = 1; i <=n; i++)
{
String value = rs.getString(i);
record.add(value);
}
String[] st = new String[record.size()];
st = record.toArray(st);
return st;
}
catch(Exception ex)
{
String s[] = new String[1];
s[0] = "No Result";
return s;
}
}
}
Add_category.jsp
<html>

<head>
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>

<body>

<form method="POST" action="addcategory.jsp">

<div align="center">
<table border="1" width="50%">
<tr>
<td colspan="3" height="35"
bgcolor="#333333">&nbsp;</td>
</tr>
<tr>
<td rowspan="4" height="35" width="29%">
<p align="center">
<img border="0" src="imgs/category.png"
width="170" height="170"></td>
<td height="35" width="36%" style="border-right-
style: none; border-right-width: medium; border-bottom-style: none; border-
bottom-width: medium">&nbsp;</td>
<td height="35" width="32%" style="border-left-
style: none; border-left-width: medium; border-bottom-style: none; border-
bottom-width: medium">&nbsp;</td>
</tr>
<tr>
<td height="35" width="36%" style="border-right-
style: none; border-right-width: medium; border-top-style: none; border-top-
width: medium; border-bottom-style: none; border-bottom-width: medium">
<font size="2">MEDIA TYPE</font></td>
<td height="35" width="32%" style="border-left-
style: none; border-left-width: medium; border-top-style: none; border-top-width:
medium; border-bottom-style: none; border-bottom-width: medium">
<select size="1" name="T1" style="border-style:
solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px;
padding-bottom: 1px">
<option value="AUDIO">AUDIO</option>
<option value="VIDEO">VIDEO</option>
</select></td>
</tr>
<tr>
<td height="35" width="36%" style="border-right-
style: none; border-right-width: medium; border-top-style: none; border-top-
width: medium; border-bottom-style: none; border-bottom-width: medium">
<font size="2">CATEGORY</font></td>
<td height="35" width="32%" style="border-left-
style: none; border-left-width: medium; border-top-style: none; border-top-width:
medium; border-bottom-style: none; border-bottom-width: medium">
<input type="text" name="T2" size="20"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td height="35" width="36%" style="border-right-
style: none; border-right-width: medium; border-top-style: none; border-top-
width: medium">&nbsp;</td>
<td height="35" width="32%" style="border-left-
style: none; border-left-width: medium; border-top-style: none; border-top-width:
medium">&nbsp;</td>
</tr>
<tr>
<td colspan="3" height="35" bgcolor="#333333">
<p align="center"><input type="submit"
value="ADD" name="B1"></td>
</tr>
</table>
</div>
<p align="center">&nbsp;</p>
</form>

</body>

</html>
Addcategory.jsp
<html>
<%@page import="java.sql.*,java.io.*, vod.*"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>
<%
try
{
String s[] = new String[2];

for(int i = 1; i <= s.length; i++)


{
s[i-1] = request.getParameter("T"+i);
}

boolean bo = DB.insertDB("category", s);

if(!bo)
{
File fol= new File(request.getRealPath("/")+s[0]+"/"+s[1]);
fol.mkdir();
response.sendRedirect("catesuccess.jsp");
}
}
catch(Exception ex)
{
out.println(ex);
}
%>
</body>

</html>
Admin_upload_audio.jsp
<html>
<%@page import="java.sql.*, java.io.*, vod.*"%>
<head>
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>

<body>

<form method="GET" enctype="multipart/form-data"


action="adminuploadaudio.jsp">
<%
String s = ""+System.currentTimeMillis();
String user = ""+session.getAttribute("admin");
%>

<div align="center">
<table border="1" width="59%">
<tr>
<td colspan="3" height="35"
bgcolor="#333333">&nbsp;</td>
</tr>
<tr>
<td rowspan="12" height="35" width="36%"
style="border-right-style: none; border-right-width: medium">
<img border="0" src="imgs/audio.png"
width="269" height="445"></td>
<td style="border-right-style: none; border-right-
width: medium; border-bottom-style: none; border-bottom-width: medium;
border-left-style:none; border-left-width:medium" height="35"
width="28%">&nbsp;</td>
<td style="border-left-style: none; border-left-
width: medium; border-bottom-style: none; border-bottom-width: medium"
height="35" width="33%">&nbsp;</td>
</tr>
<tr>
<td style="border-style:none; border-width:medium;
" height="35" width="28%">
ID</td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium; border-
bottom-style: none; border-bottom-width: medium" height="35" width="33%">
<input readonly type="text" value=<%=s%>
name="T1" size="31" style="border-style: solid; border-width: 1px; padding-left:
4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td style="border-style:none; border-width:medium;
" height="35" width="28%">
MEDIA TYPE</td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium; border-
bottom-style: none; border-bottom-width: medium" height="35" width="33%">
<input readonly type="text" name="T2" size="14"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px" value="AUDIO"></td>
</tr>
<tr>
<td style="border-style:none; border-width:medium;
" height="35" width="28%">
CATEGORY</td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium; border-
bottom-style: none; border-bottom-width: medium" height="35" width="33%">
<select size="1" name="T3">
<%
try
{
ResultSet rs =
DB.getSt().executeQuery("select category from category where
media_type='AUDIO'");
while(rs.next())
{
String A = rs.getString(1);
%>
<option value="<%=A%>"><%=A%></option>
<%
}
}
catch(Exception ex)
{
out.println(ex);
}
%>
</select></td>
</tr>
<tr>
<td style="border-style:none; border-width:medium;
" height="35" width="28%">
ACTOR </td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium; border-
bottom-style: none; border-bottom-width: medium" height="35" width="33%">
<input type="text" name="T4" size="27"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td style="border-style:none; border-width:medium;
" height="35" width="28%">
ACTRESS</td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium; border-
bottom-style: none; border-bottom-width: medium" height="35" width="33%">
<input type="text" name="T5" size="27"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td style="border-style:none; border-width:medium;
" height="35" width="28%">
MUSIC</td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium; border-
bottom-style: none; border-bottom-width: medium" height="35" width="33%">
<input type="text" name="T6" size="27"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td style="border-style:none; border-width:medium;
" height="35" width="28%">
MOVIE</td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium; border-
bottom-style: none; border-bottom-width: medium" height="35" width="33%">
<input type="text" name="T7" size="27"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td style="border-style:none; border-width:medium;
" height="35" width="28%">
MALE SINGER</td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium; border-
bottom-style: none; border-bottom-width: medium" height="35" width="33%">
<input type="text" name="T8" size="27"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td style="border-style:none; border-width:medium;
" height="35" width="28%">
FEMALE SINGER</td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium; border-
bottom-style: none; border-bottom-width: medium" height="35" width="33%">
<input type="text" name="T9" size="27"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td style="border-style:none; border-width:medium;
" height="35" width="28%">
UPLOADED BY</td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium; border-
bottom-style: none; border-bottom-width: medium" height="35" width="33%">
<input readonly value=<%=user%> type="text"
name="T10" size="27" style="border-style: solid; border-width: 1px; padding-
left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td style="border-right-style: none; border-right-
width: medium; border-top-style: none; border-top-width: medium; border-left-
style:none; border-left-width:medium" height="35" width="28%">
SONG</td>
<td style="border-left-style: none; border-left-
width: medium; border-top-style: none; border-top-width: medium" height="35"
width="33%">
<input type="file" name="F1" size="20"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td colspan="3" height="35" bgcolor="#333333">
<p align="center"><input type="submit"
value="UPLOAD" name="B1"></td>
</tr>
</table>
</div>
<p align="center">&nbsp;</p>
</form>
</body>
</html>
Adminaudio.jsp
<html>
<%@page import="java.sql.*, java.io.*, vod.*"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>

<body>
<%
try
{
String id = request.getParameter("id");
String query = "select media_type, category from songs where
id='"+id+"'";
ResultSet rs = DB.getSt().executeQuery(query);
rs.next();
String path = rs.getString(1)+"/"+rs.getString(2)+"/"+id;
%>
<p align="center">
&nbsp;</p>
<center>
<audio controls>
<source src="<%=path%> " type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</center>
<%
}
catch(Exception ex)
{
out.println(ex);
}
%>
</body>

</html>
Admin_video_pending.jsp
<html>
<%@page import="java.sql.*, java.io.*, vod.*"%>
<head>
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>

<body>

<p><b>PENDING AUDIO SONGS</b></p>


<table border="1" width="40%">
<%
try
{
String query="select id from songs where media_type='VIDEO'";
ResultSet rs = DB.getSt().executeQuery(query);
while(rs.next())
{
String id = rs.getString(1);
%>
<tr>
<td>&nbsp;<%=id%></td>
<td>
<p align="center"><a href=adminvideo.jsp?id=<%=id
%>>VIEW</a></td>
<td>
<p align="center"><a href=avapprove.jsp?id=<%=id
%>>APPROVE</a></td>
</tr>
<%
}
}
catch(Exception ex)
{
out.println(ex);
}
%>
</table>
</body>
</html>
Useruploadaudio.jsp
<html>
<%@page import="java.sql.*, java.io.*, vod.*"%>
<head>
<%!
public void copy(File src,File dst)throws IOException
{
InputStream in=new FileInputStream(src);
OutputStream out=new FileOutputStream(dst);
byte[] buf=new byte[1024];
int len;
while((len=in.read(buf))>0)
{
out.write(buf,0,len);
}
in.close();
out.close();
}
%>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>

<body>
<%
try
{
String id = request.getParameter("T1");
String mtype = request.getParameter("T2");
String category = request.getParameter("T3");
String actor = request.getParameter("T4");
String actress = request.getParameter("T5");
String music = request.getParameter("T6");
String movie = request.getParameter("T7");
String singerm= request.getParameter("T8");
String singerf = request.getParameter("T9");
String uploader = request.getParameter("T10");

String filename = request.getParameter("F1");

String ext = filename.substring(filename.indexOf("."),


filename.length());
id = id+ext;

// out.println(filename+"<br>");
filename = request.getRealPath("/upaudio/")
+"/"+filename;

String tofile = request.getRealPath("/")


+mtype+"/"+category+"/"+id;

String query = "insert into songs


values('"+id+"','"+mtype+"','"+category+"','"+actor+"','"+actress+"','"+music+"','"
+movie+"','"+singerm+"','"+singerf+"','"+uploader+"')";

/* out.println(filename);
out.println("<br>");
out.println(tofile);
out.println(ext);
out.println(query);

*/ copy(new File(filename), new File(tofile));


boolean bo = DB.getSt().execute(query);

if(!bo)
{
response.sendRedirect("uploadsuccess.jsp");
}

//out.println(filename);
}
catch(Exception ex)
{
out.println(ex);
}
%>
</body>

</html>

Login.jsp
<html>

<head>
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<form method="POST" action="log.jsp">


<div align="center">
<table border="1" width="53%">
<tr>
<td colspan="3" bgcolor="#333333"
height="35">&nbsp;</td>
</tr>
<tr>
<td rowspan="6" width="31%" height="35">
<p align="center">
<img border="0" src="imgs/login.jpg" width="298"
height="223"></td>
<td width="31%" style="border-right-style: none;
border-right-width: medium; border-bottom-style: none; border-bottom-width:
medium" height="35">&nbsp;</td>
<td width="34%" style="border-left-style: none;
border-left-width: medium; border-bottom-style: none; border-bottom-width:
medium" height="35">&nbsp;</td>
</tr>
<tr>
<td width="31%" style="border-right-style: none;
border-right-width: medium; border-top-style: none; border-top-width: medium;
border-bottom-style: none; border-bottom-width: medium" height="35">
&nbsp;</td>
<td width="34%" align="center" style="border-left-
style: none; border-left-width: medium; border-top-style: none; border-top-width:
medium; border-bottom-style: none; border-bottom-width: medium" height="35">
&nbsp;</td>
</tr>
<tr>
<td width="31%" style="border-right-style: none;
border-right-width: medium; border-top-style: none; border-top-width: medium;
border-bottom-style: none; border-bottom-width: medium" height="35">
&nbsp;</td>
<td width="34%" align="center" style="border-left-
style: none; border-left-width: medium; border-top-style: none; border-top-width:
medium; border-bottom-style: none; border-bottom-width: medium" height="35">
&nbsp;</td>
</tr>
<tr>
<td width="31%" style="border-right-style: none;
border-right-width: medium; border-top-style: none; border-top-width: medium;
border-bottom-style: none; border-bottom-width: medium" height="35">
<font size="2">USER NAME</font></td>
<td width="34%" align="center" style="border-left-
style: none; border-left-width: medium; border-top-style: none; border-top-width:
medium; border-bottom-style: none; border-bottom-width: medium" height="35">
<input type="text" name="T1" size="20"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td width="31%" style="border-right-style: none;
border-right-width: medium; border-top-style: none; border-top-width: medium;
border-bottom-style: none; border-bottom-width: medium" height="35">
<font size="2">PASSWORD</font></td>
<td width="34%" align="center" style="border-left-
style: none; border-left-width: medium; border-top-style: none; border-top-width:
medium; border-bottom-style: none; border-bottom-width: medium" height="35">
<input type="password" name="T2" size="20"
style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right:
4px; padding-top: 1px; padding-bottom: 1px"></td>
</tr>
<tr>
<td width="31%" style="border-right-style: none;
border-right-width: medium; border-top-style: none; border-top-width: medium"
height="35">&nbsp;</td>
<td width="34%" style="border-left-style: none;
border-left-width: medium; border-top-style: none; border-top-width: medium"
height="35">&nbsp;</td>
</tr>
<tr>
<td colspan="3" bgcolor="#333333" height="35">
<p align="center">
<input type="submit" value="LOGIN"
name="B1"></td>
</tr>
</table>
</div>
<p align="center">&nbsp;</p>
</form>

</body>

</html>
Log.jsp
<html>
<%@page import="java.sql.*, vod.*"%>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>
<%
try
{
String s1 = request.getParameter("T1");
String s2 = request.getParameter("T2");
String t1 = "";
String t2 = "";

String query = "select username, password from usermaster


where username='"+s1+"'";

ResultSet rs = DB.getSt().executeQuery(query);

rs.next();

t1 = rs.getString(1);
t2 = rs.getString(2);

if(s1.equals(t1))
{
if(s2.equals(t2))
{
session.setAttribute("user", s1);
response.sendRedirect("usersuccess.jsp");
}
else
{
out.println("Error in Password");
}
}
else
{
out.println("Error in Username");
}
}
catch(Exception ex)
{
out.println("Error in Username");
}
%>
</body>

</html>
SYSTEM TESTING AND IMPLEMENTATION

TESTING

OBJECTIVES OF TESTING

 Testing is a process of executing a program with the

intent of finding an error.

 A good test case is one that has a high probability of

finding on as yet undiscovered error.

 A successful test is one that uncovers on as yet

undiscovered error.

The above objectives imply a dramatic change in view point. They

move counter to the commonly held view that a successful list is one in

which no errors are found. Any engineered product can be listed in one of

two ways:

1. Knowing the specified function that a product

has been designed to perform test can be

conducted that demonstrates each functions is

fully operational.
2. Knowing the internal working of the product,

test can be conducted to ensure that “all gears

mesh” that is, the internal operation of the

product performs according to specification and

all internal components have been adequately

exercised.

TYPES OF TESTING

The software testing process commences once the program is created

& the Documentation and the related data structures are designed. Software

testing is essential for correcting errors. Otherwise the program is not said

to be complete.

The following are the types of Testing:

 Unit Testing

 Integrating Testing

 Validating Testing

 System Testing

UNIT TESTING

Unit testing focuses verification effort on the smallest unit of

software designs the module. Unify the procedural design description as a

guide; important control paths are tested to uncover errors within the

boundary of the module. The relative complexity of tests and uncovered

errors is limited by the constrained scope established for unit testing.


The module interface is tested to ensure that information properly

flows into and out of the program unit under test. Boundary conditions are

tested to ensure that the module operates properly at boundaries established

to limit or restrict processing. Proposed check list for interface tests are

1. Number of input parameters equals to number

of arguments?

2. parameter and argument attributes match?

3. parameter and argument units systems match?

Unit testing is normally considered as an adjunct to the coding step.

After source level code has been developed, received, and verified for

correct syntax, unit test case design begins. A review of design information

provides guidance for establishing test cases that are likely to uncover

errors in each of the categories.

INTEGRATION TESTING

Integration testing is a systematic technique for constructing the

program structure while conducting tests to uncover errors associated with

interfacing. The objective is to take unit tested modules and build a

program structure that has been dictated by design.

The integration process is performed in a series of steps:

1. The main control module is used as a test driver and

stubs are substituted for all modules directly subordinates

to the main control module.


2. Depending on the integration approach selected, subordinate

stubs are replaced one at a time with actual modules.

3. Tests are conducted as each module is integrated. Hereafter

stock module is integrated job scheduling has to test with

different data.

4. On completion of each set of tests, another stub is

replaced with the real module.

VALIDATION TESTING

At the culmination of integration testing, software is completely

assembled as a package; Interfacing errors have been uncovered and

corrected, and a final series of software tests-validation testing begin.

Validation can be defined in many ways, but a simple definition is that

validation succeeds when software functions in a manner that can be

reasonably expected by the customer.

SYSTEM TESTING

System testing is series of different tests whose purpose is to

fully exercise the computer based system. Although each test has a

different purpose, all the work should verify that all system elements have

been properly integrated and perform allocated functions.

IMPLEMENTATION PLAN

An important aspect of a system analyst job is to make sure


that the new design is implemented to the established standards. The term
implementation has different meanings, ranging from the conversion of a
basic application, to a complete replacement of a computer system.
Implementation used here is to mean the process of converting a new
system design into an operational one. Conversion is one aspect of
implementation.

There are three types of implementation:

Implementation of a computer system is to replace a manual


system. The problems encountered are converting file, training users, creating
accurate files, and verifying printouts for integrity.

Implementation of a new computer system is to replace an


existing one. This is usually a difficult conversion. If not properly manned,
there can be many problems. Some large computer systems have taken as
long as a year to convert. Implementation of a modified application to
replace an existing one using the same computer. This type of conversion
is relatively easy to handle, provided there are no major changes in the
files. Implementation is the process of converting a new or revised
system design into an operational one. It is the key stage in achieving a
successful new system, because usually involves a lot of uplevel in the
user department.

Therefore it must be carefully planned and controlled. Apart


from planning the three major tasks of preparing for implementation are
education, training of users and testing of the system. Education of users
should really have taken place much earlier in the project when they
involved in the investigation and design work. Training has to be given to
the staff regarding the new system. Once the staff is trained the system
can be tested.
CHANGE OVER
The change over from the old system to the new system
takes place when the first system has been provided to the satisfaction of
the system analyst and the other implementation activities have been
completed.

User manager is satisfied with the result of the system test,


staff training and reference manuals.

The operation manager is satisfied with the performance of


equipment, operation staff and time table.

The target date for the change over is due. The change over
may be achieved in several ways. The most common method is direct
change over, staged change over, parallel running and pilot running.
Occasionally a combination of these methods will be used.
SCREEN SHOTS
CONCLUSION

This project is designed as much as user friendly and fulfill the expected

need of the user the project is developed using ‘JAVA MEDIA FRAME WORK ‘

it can be further uploaded as a web page and can be accessed through internet .

The project may be further developed to access all type of media files and

to process requests through Emails . In future uploading and downloading

options will be provided. Various skins will be produced during every display.

Lists of movie clippings and songs will be displayed with logos. Preview of every

song will be displayed. In this project I handle the latest technologies of Java

Java Media Framework, Java Servlet Development Kit, Java Standard Tool kit 1.4

( Platform 2). This is very useful to me to understand the above subjects.


BIBLIOGRAPHY

1. Java 1.2 Programming Bible - Aoron Walsh and John


Fronckowiak
2. Java 2 Black Book - Steven Holzner
3. Java Network Programming - Elliote Rusty Harold
4. Pure JavaScript - R.Allen Wyke, Jason

You might also like