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

A Personal Storage Cloud for Integrating Web Data Services

A Dissertation submitted in partial fulfillment of the requirements for the award of the Degree of

Master of Philosophy

in Computer Science
by

<FS: 12; bold>

R S.Dhivya (Reg. No.)

DEPARTMENT OF COMPUTER SCIENCE

PRIST UNIVERSITY, VALLAM


THANJAVUR - 613 403. June, 2011

A Personal Storage Cloud for Integrating Web Data Services

A Personal Storage Cloud for Integrating Web Data Services


INTRODUCTION: Personal data spreading on the web differs significantly from traditional files in PCs. It is a great challenge to integrate all the data into a single system with different organization and management mechanism. Some state-of-the-arts, like WebOS, web file systems, and menagerie system, use operating system concepts and abstractions to build applications over the internet, treat web data as abstract files and offer support to the hierarchy data objects. But it is still far from easy to manage these data. ABSTRACT:

In this paper, we design and implement file sharing, a prototype of storage cloud for computer scientists and graduate students to manage personal data that spreads over the web. (1) Integrates personal data with various meta info structures that comes from different web sites and personal computers;

(2) Provides a global, unified environment to users and supports user-defined file views via flexible combination of tags; 3) Offers an easy way to integrate new web services

ABOUT CLOUD COMPUTING:

Cloud computing is a general term for anything that involves delivering hosted services over the Internet. These services are broadly divided into three categories: Infrastructure-as-a-Service Platform-as-aService and Software-as-a-Service. The name cloud computing was inspired by the cloud symbol that's often used to represent the Internet in flowcharts and diagrams. Cloud computing is Internet-based computing, whereby shared resources, software, and information are provided to computers and other devices on demand, like the electricity grid. In general, cloud computing customers do not own the physical infrastructure, instead avoiding capital expenditure by renting usage from a third-party provider. They consume resources as a service and pay only for resources that they use.

Many cloud-computing offerings employ the utility computing model, which is analogous to how traditional utility services (such as electricity) are consumed, whereas others bill on a subscription basis. Sharing "perishable and intangible" computing power among multiple tenants can improve utilization rates, as servers are not unnecessarily left idle (which can reduce costs significantly while increasing the speed of application development). EXISTING SYSTEM: Already we have developed some applications to support to integrate persona data from PCs and the following web services: Google Docs, Flickr, Picasa and Zoho.

PROPOSED SYSTEM: Personal data spreading on the web differs significantly from traditional files in PCs. It is a great challenge to integrate all the data into a single system with different organization and management mechanism. Some state-of-the- arts, like WebOS, web file systems, and menagerie system, use operating system concepts and abstractions to build applications over the internet, treat web data as abstract files and offer

support to the hierarchy data objects. But it is still far from easy to manage these data. We introduce a personal storage cloud named IRain, as an abstraction layer to manage web-based personal data distributed in many web servers and personal computers. We focus on the design and the development of the system to simplify the management and integration of personal data. In this paper, we design and implement IRain, a prototype of storage cloud to manage personal data that spreads over the web for computer scientists and graduate students. One of our systems goals is to provide the scientists with better services. To date, we have developed some applications to support to integrate persona data from PCs and the following web services: Google Docs, Flickr, Picasa and Zoho.

APPLICATION: In Online Applications. To provide the personal storage cloud in web applications.

PROBLEM STATEMENT

The logic layer consists of two parts: Cloud naming and Data reorganization. On one hand, Cloud naming manages the drivers developed by application developers, provides users with personal clouds. Each personal could store the data from web sites and personal computers. In addition, each cloud has unique identifier, gives unified cloud naming to users, and ensures the scalability of the system. On the other hand, this project reorganizes the structure of meta-info, combines traditional tree file system and the collaborative tagging to provide a user-level storage system, which could support some applications and facilitate the users in managing their distributed data objects. We design and implement some important applications supported by the re-organized structure of meta-info in the application layer. Especially, the data views should be more suitable for users to browse their data objects and locate the needed files by various queries.

LITERATURAL SURVEY 1. A Dataspace Odyssey: The iMeMex Personal Dataspace Management System Author: Lukas Blunschi,JensPeter Dittrich ,Olivier Ren Girard, Shant Kirakos Karakashian,Marcos Antonio Vaz Salles. A Personal Data space includes all data pertaining to a user on all his local disks and on remote servers such as network drives, email and web servers. This data is represented by a heterogeneous mix of files, emails, bookmarks, music, pictures, calendar, personal information streams and so on. We demonstrate a new breed of system that is able to handle the entire Personal Data space of a user. Our system, named iMeMex (integrated memex), is a first implementation of a Personal DataSpace Management System (PDSMS). We showcase how iMeMex allows dataspace navigation across data source/file boundaries, how iMeMex offers rich

contextual information on query results and how our system returns best-effort results. 2. Organizing and Sharing Distributed Personal WebService Data Author: Roxana Geambasu, Cherie Cheung, Alexander Moshchuk, Steven D. Gribble, and Henry M. Levy The migration from desktop applications to Web-based services is scattering personal data across a myriad of Web sites, such as Google, Flickr, YouTube, and Amazon S3. This dispersal poses new challenges for users, making it more difficult for them to: (1) organize, search, and archive their data, much of which is now hosted by Web sites; (2) create heterogeneous, multi-Web-service object collections and share them in a protected way; and (3) manipulate their data with standard applications or scripts.

In this paper, we show that a Web-service interface supporting standardized naming, protection, and object-access services can solve these problems and can greatly simplify the creation of a new generation of object-management services for the Web. We describe the implementation of Menagerie, a proof-ofconcept prototype that provides these services for Web-based applications. At a high level, Menagerie creates an integrated file and object system from heterogeneous, personal Webservice objects dispersed across the Internet. We present several object-management applications we developed on Menagerie to show the practicality and benefits of our approach.

Feasibility Study Feasibility study is a preliminary study undertaken to determine and document a project's viability. The results of this study are used to make a decision whether to proceed with the project. If it indeed leads to a project being approved, it will - before the real work of the proposed project starts - be used to ascertain the likelihood of the project's success. It is an analysis of possible alternative solutions to a problem and a recommendation on the best alternative. Technical Feasibility This involves questions such as whether the technology needed for the system exists, how difficult it will be to build, and whether the firm has enough experience using that technology. The assessment is based on an outline design of system requirements in terms of Input, Output, Fields, Programs, and Procedures. This can be qualified in

terms of volumes of data, trends, frequency of updating, etc. in order to give an introduction to the technical system. Economical Feasibility This involves questions such as whether the firm can afford to build the system, whether its benefits should substantially exceed its costs, and whether the project has higher priority and profits than other projects that might use the same resources. This also includes whether the project is in the condition to fulfill all the eligibility criteria and the responsibility of both sides in case there are two parties involved in performing any project. Operational Feasibility This involves questions such as whether the firm and it users can be able to easily operate and navigate the system, whether any special training or technical knowledge is needed to operate the system with ease.

Project Planning The purpose of Software Project Planning is to establish reasonable plans for performing the software engineering and for managing the software project. Software Project Planning involves developing estimates for the work to be performed, establishing the necessary commitments, and defining the plan to perform the work. The software planning begins with a statement of the work to be performed and other constraints and goals that define and bound the software project. This plan is developed at the beginning of the software project and is continually refined and improved as the work processes.

Project Scheduling The project schedule is the core of the project plan. It is used by the project manager to commit people to the project and show the organization how the work will be performed. Schedules are used to communicate final deadlines and, in some cases, to determine resource needs. They are also used as a kind of checklist to make sure that every task necessary is performed. If a task is on the schedule, the team is committed to doing it. In other words, the project schedule is the means by which the project manager brings the team and the project under control.

MODULE DESCRIPTION: There are two main modules in this project, 1. Non-share cloud 2. Share cloud Non-share cloud In this module, any new user can register and then login to use this cloud. After registering a separate folder will be created for each and every user with 4GB memory space. In that folder, four subfolders like audio, video, image and document will be created to store their particular datas. The main purpose of this cloud is to store user personal datas. Image In this module, user can upload any image file into this cloud for their personal use. That image file will be automatically stored in image folder of that particular user. Once the data is uploaded

we can view that data, download it and also can delete that data. Audio In this module, user can upload any audio file into this cloud for their personal use. That audio file will be automatically stored in audio folder of that particular user. Once the data is uploaded we can view that data, download it and also can delete that data. Video In this module, user can upload any video file into this cloud for their personal use. That video file will be automatically stored in video folder of that particular user. Once the data is uploaded we can view that data, download it and also can delete that data.

Document In this module, user can upload any text file into this cloud for their personal use. That text file will be automatically stored in document folder of that particular user. Once the data is uploaded we can view that data, download it and also can delete that data. Share cloud In this module, any new user can register and then login to use this cloud. The main purpose of this cloud is to display all data to all registered users. Image In this module, user can upload any image file into this cloud which they want to display to all users. That image file will be stored commonly in

share cloud. Once the data is uploaded any user can view and download that data. Audio In this module, user can upload any audio file into this cloud which they want to display to all users. That audio file will be stored commonly in share cloud. Once the data is uploaded any user can view and download that data. Video In this module, user can upload any video file into this cloud which they want to display to all users. That video file will be stored commonly in share cloud. Once the data is uploaded any user can view and download that data. Document In this module, user can upload any text file into this cloud which they want to display to all users.

That text file will be stored commonly in share cloud. Once the data is uploaded any user can view and download that data.

SYSTEM ARCHITECTURE:
Brows er Busines s Objects Web
server

Data

Base
(SQL Server)

SYSTEM DESIGN:

Home
New User Registration

Login

Share CCCloud Upload

Non-Share

Upload

Audi o

Vide o

Image

Documen t

Audi o

Vide o

Imag e

Documen t

DFD:
Data Flow Diagram Level 0

FUCTIONAL REQUIREMENTS: Use Case Diagram: We have identified 2 actors in these diagrams, the actual Machine Users and the Unix Developers. The Machine user can begin using the system this represents whichever method the user will use in order to make initial interaction with the system. For example, they may need to turn the system on via a button, simply turn the key in the ignition or some over method. They can also view a page, click on a link or back button, scroll up and down and close the system. The Microsoft Developer inherits all these use cases, as well as being able to upload an html file and view a list of problems.

Key Genaration

BaseStation

Energy Calculation

RC4Encrption

RC4Decryption

Sensor

Checking Dynamic Key

Receive Acknowledgement

Use Case Diagram

Class Diagram: We have identified 5 classes in total. A Lexer class and a Parser class - which comprise the Analyser package a ParsedTreeStructure class, a Renderer class and a Frontend class. The Lexers job is to build a set of tokens from a source file. The Parser uses these tokens built and deciphers their types. It then builds the tokens seen into nodes and parses them to the ParsedTreeStructure class, where a tree structure of nodes is stored. This tree is then used by the Renderer class to form a model of the page, which is in turn, is used by the Front end in order to display the final rendered page.

login uname Pwd PhoneNo signin()

Audio Sharing Non Share Video Document Images

Audio Document

Class Diagram

NON FUNCTIONAL REQUIREMENTS: USABILITY: Resist making statements such as The system shall be user friendly. It is entirely insufficient. The non-functional requirements document template breaks the section down into seven subsections and prompts for completion of each section. Be specific about the mechanism by which each aspect will be met. For example, in the section Learn ability say whether the user is expected to learn how to use the system by looking up the help or using a tutorial or whether the system can be put into a learner mode whereby it guides a learner user through a use case by offering detailed prompts at every step. If there is to be no documentation at all and the system is to be learnt from the developers demonstrating it to the users, then say so.

RELIABILITY: Reliability is notoriously difficult to test before the system goes live as it relies on continuous use and metrics. Some guidance here on what is realistic to expect should be sought in consultation with stakeholders. Figures should be defined on the basis of the metrics available for existing systems and the expectations for improvement or relaxation of these values. It will only be known if the system meets these requirements if proper metrics and requirements gathering are put in place. Notes to this effect should be included. If no serious attempt is to be made to do this, then write None in each section. PERFORMANCE: Performance can and should be tested early on the development as part of the architectural development phase. Care needs to be taken to specify throughput and response times in terms of the creation and processing of major data entities with reference to specific use cases in the use case model. Ensure that the requirements are written in such a way that the

testing of them will be straightforward. If the system is to share infrastructure resources with other systems specify what proportion of those resources must be available if the response times are to be met. Also include any dependencies on outside systems and specify how these are expected to respond if resource and throughput targets are to be met. SECURITY: Security includes all steps that are to be taken to secure the system against both voluntary and involuntary corruption. This includes management of usernames and passwords; encryption of data transfers both internally and across external systems such as the internet; firewalls and protection against viruses, Trojans, worms and all kinds of malicious code attacks including denial of service.

SUPPORTABILITY: Specify ease of installation, configuration and testing in terms both of the time to achieve the goal and specific means for achieving it. Consider, for example, installation software and scripts, use cases for configuration and automatic self-testing. Think carefully about how each of these requirements will actually be tested. INRFASTRUCTURE REQUIREMENTS: These should include description of existing or new hardware, software and networks on which the system is expected to run. Create a deployment diagram, or equivalent which shows all processing nodes, peripherals and communication links. Specify the required capacity for each of these, or, where the system runs on existing infrastructure, the amount of capacity that needs to be available for the system to meet its performance requirements. Also specify any external systems of services upon which this system will depend in terms

of the performance that is required of these systems if this system is to meet its performance targets. IMPLEMENTATION CONSTRAINTS: A constraint is a requirement which leaves no design option. Implementation constraints, rather than describing what the system will do, describe constraints on the design by which what it is to do will be achieved. If there is no constraint in a section, e.g. the developers could use any language they like then say so. Otherwise describe just the constraint. When referring to system interfaces, legacy systems and databases refer to the design documentation for these. If there is insufficient information about these external systems then mention that this information will need to be completed for the purposes of the development of this system.

SYSTEM REQUIREMENTS: Hardware Requirements:


System Hard Disk Floppy Drive Monitor Mouse RAM

: Pentium IV 2.4 GHz. : 40 GB. : 1.44 MB. : 15 VGA Colour. : Logitech. : 256 MB.

Software Requirements:

Operating system : WINDOWS XP PROFESSIONAL. Front-end Back-end : JSP : SQL SERVER 2000

SOFTWARE SPECIFICATION About SQL (Structured Query Language) This article is the first in an educational series offered by SQL AB aimed towards providing the reader with valuable insight into the SQL database server. Although future articles will delve into some of the more complicated topics surrounding SQL, including replication, ODBC and optimization, it was thought to be prudent if the first tutorial started, well, at the beginning. Therefore the goal of this article is to thoroughly acquaint the reader with various topics surrounding the basic functioning of SQL. A synopsis of what is covered is shown in the Table of Contents, listed below. You can go to any topic listed in the Table of Contents simply by clicking on its title. Assumptions: At this point, it is assumed that the reader has successfully installed the SQL database server. If SQL has not yet been installed, please take some time to review the information

provided in the installation section of the SQL documentation. It is also assumed that sql database has been created (using sql_install_db), and the SQL database server has been started using safe_sqld. If this has not yet been accomplished, take a moment to read, located in the SQL documentation. It is also assumed that the reader has at least a basic comprehension of SQL (Structured Query Language) syntax. Conclusion: So You've Installed SQL. Now What? The installation instructions were scrutinized, the latest distribution was downloaded, coffee was brewed and drank and brewed again. The familiar configure, make and make install were wielded to once again produce another beautifully compiled application. Nods were exchanged, pats on the back traded, frothy capuccino toasts are proposed in succession. Yes, there is reason to celebrate in the office today, as the SQL database server has been successfully installed.

You lounge back in your desk chair, surrounded by colleagues hailing the wisdom of you, the newly-christened SQL administrator. If they only knew the pain and anguish swirling around in your mind right now, as you ponder the question, "So now what?". The purpose of this tutorial is to acquaint new SQL users with several of the key aspects of this wonderful database server. Issues regarding general server functionality, security, user and privilege administration, working with databases and tables, and data backups will all be introduced to some degree. While the reader will likely find much of this material easy to understand, keep in mind that these concepts lay much of the foundation for efficiently and properly working with the SQL database server, in addition to implementing more complicated aspects which will be discussed in later tutorials. Therefore it is suggested that the reader take the time to not only read the tutorial, but also to actually follow along with the steps described herein, experimenting with his own SQL installation.

It's very likely that the first task the administrator will want to undertake is proper configuration of SQL's configuration file. This file, entitled my.cnf, stores default startup options for both the server and for clients. Correct configuration of this file can go a long way towards optimizing SQL, as various memory buffer settings and other valuable options can be set here. Interestingly, the scope of this file can be set according to its location. The settings will be considered global to all SQL servers if stored in /etc/my.cnf. It will be global to a specific server if located in the directory where the SQL databases are stored (/usr/local/mysql/data for a binary installation, or /usr/local/var for a source installation). Finally, its scope could be limited to a specific user if located in the home directory of the SQL user (~/.my.cnf). Keep in mind that even if SQL does locate a my.cnf file in /etc/my.cnf (global to all SQL servers on that machine), it will continue its search for a server-specific file, and then a user-specific file. You can think of the final configuration settings as being the result of the /etc/my.cnf, mysql-data-dir/my.cnf, and ~/.my.cnf files.

In order to aid administrator's in the proper configuration of this file, the SQL developers have included four sample my.cnf files within the distribution. Their names are my-huge.cnf.sh, my-large.cnf.sh, my-medium.cnf.sh, and my-small.cnf.sh, and each denotes recommended configuration settings in accordance with system resource availability. THE SQL SERVER Microsoft SQL Server is a relational database management system produced by Microsoft. It supports a superset of Structured Query Language SQL, the most common database language. It is commonly used by businesses for small to medium sized databases, but the past five years have seen greater adoption of the product for larger enterprise databases. Microsoft SQL Server uses a variant of SQL called T-SQL, or Transact-SQL, an implementation of SQL-92 (the ISO standard for SQL, certified in 1992) with some extensions. TSQL mainly adds additional syntax for use in stored procedures, and affects the syntax of transaction support. (Note that SQL

standards require Atomic, Consistent, Isolated, Durable or "ACID" transactions.) Microsoft SQL Server and Sybase/ASE both communicate over networks using an application-level protocol called Tabular Data Stream (TDS). The TDS protocol has also been implemented by the FreeTDS project [2] in order to allow more kinds of client applications to communicate with Microsoft SQL Server and Sybase databases. Microsoft SQL Server also supports Open Database Connectivity (ODBC). Scalability and reliability features: Partition workload among multiple servers with distributed partitioned views, a new data tier "scale-out" feature that distributes data among a group of servers and coordinates query processing. As your business grows, you can add servers for even greater scalability. Achieve scalability for mission-critical, line-of-business applications with support for large symmetric multiprocessing (SMP) systems with up to 32 processors and 64 gigabytes (GB) of RAM. Improve overall system performance with built-in support for a system area network (SAN)

Grow data warehouses and reporting solutions with indexed (materialized) views, distributed partitioned cubes, and support for dimensions with hundreds of millions of members. Indexed views improve performance by storing result sets so they do not have to be regenerated for future access. Distributed partitioned cubes improve performance by allowing access to cubes stored on multiple systems. Take full advantage of your hardware resources by running multiple, isolated applications on a single computer using SQL Server 2000 multi-instance support.

TESTING INTRODUCTION: After finishing the development of any computer based system the next complicated time consuming process is system testing. During the time of testing only the development company can know that, how far the user requirements have been met out, and so on. Following are the some of the testing methods applied to this effective project: SOURCE CODE TESTING: This examines the logic of the system. If we are getting the output that is required by the user, then we can say that the logic is perfect.

SPECIFICATION TESTING: We can set with, what program should do and how it should perform under various condition. This testing is a comparative study of evolution of system performance and system requirements. MODULE LEVEL TESTING: In this the error will be found at each individual module, it encourages the programmer to find and rectify the errors without affecting the other modules. UNIT TESTING: Unit testing focuses on verifying the effort on the smallest unit of software-module. The local data structure is examined to ensure that the date stored temporarily maintains its integrity during all steps in the algorithms execution. Boundary conditions are tested to ensure that the module operates properly at boundaries established to limit or restrict processing.

INTEGRATION TESTING: Data can be tested across an interface. One module can have an inadvertent, adverse effect on the other. Integration testing is a systematic technique for constructing a program structure while conducting tests to uncover errors associated with interring. VALIDATION TESTING: It begins after the integration testing is successfully assembled. Validation succeeds when the software functions in a manner that can be reasonably accepted by the client. In this the majority of the validation is done during the data entry operation where there is a maximum possibility of entering wrong data. Other validation will be performed in all process where correct details and data should be entered to get the required results.

RECOVERY TESTING: Recovery Testing is a system that forces the software to fail in variety of ways and verifies that the recovery is properly performed. If recovery is automatic, re-initialization, and data recovery are each evaluated for correctness. SECURITY TESTING: Security testing attempts to verify that protection mechanism built into system will in fact protect it from improper penetration. The tester may attempt to acquire password through external clerical means, may attack the system with custom software design to break down any defenses to others, and may purposely cause errors.

PERFORMANCE TESTING: Performance Testing is used to test runtime performance of software within the context of an integrated system. Performance test are often coupled with stress testing and require both software instrumentation. BLACKBOX TESTING: Black- box testing focuses on functional requirement of software. It enables to derive ets of input conditions that will fully exercise all functional requirements for a program. Black box testing attempts to find error in the following category: Incorrect or missing function Interface errors Errors in data structures or external database access and performance errors.

OUTPUT TESTING: After performing the validation testing, the next step is output testing of the proposed system since no system would be termed as useful until it does produce the required output in the specified format. Output format is considered in two ways, the screen format and the printer format. USER ACCEPTANCE TESTING: User Acceptance Testing is the key factor for the success of any system. The system under consideration is tested for user acceptance by constantly keeping in touch with prospective system users at the time of developing and making changes whenever required.

SPECIAL FEATURES: This project combines the advantages of traditional tree structured file system and semantic-based system to organize and manage personal data files. It provides a global, unified environment to users, supports user-defined file views via flexible combination of tags which could help users o locate specified data files. 1.Security to store in a cloud 2. To accessing more than one server 3. To allocate every user location in a cloud 4. Sharing data is helpful to spread the sharing cloud

COCLUSION: This paper describes a personal storage cloud for computer scientists and graduate students to manage personal data that spreads over the web. It mainly simplify the management and integration of personal data,provide userdefined file views via flexible combination of tags, and offer an easy way to integrate new web services via a VFS-liked interface. We have implemented the platform, to manage research data for researchers, and show the usability by our measurements.

FUTURE ENHANCEMENT: In future the projec t can be modified as per the clients requirements. The storage cloud can be protected by the users in the storage. The encryption of the stored data can be done by the users and the reciever of the data should decrypt the data.
REFERENCE PAPER: 1. Roxana Geambasu, Cherie Cheung, Alexander Moshchuk, Setven D.Gribble, and Henry M.Levy. Organizing and Sharing Distributed Personal Web-Service Data, In Proceeding of the 17th international conference on World Wide Web. 2. Lukas Blunsehi, Jens-Peter Dittrich, O. R. Girard, S. K. Karakashian, and M. A.V. Salles, A Dataspace Odyssey: The iMeMex Personal Dataepace Management System, In Proceedings of the 3rd Conference on Innovative Data Systems Research (CIDR), Asilomar, USA, 2007.

Sample Coding :

Home.jsp
<html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta name="GENERATOR" content="Microsoft FrontPage 5.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> <p Personal align="center"><p Data Storage In align="center"><i><font Cloud size="6" size="6"

color="#0033CC"><b> Computing</b></font></i><p color="#000080"><form align="center"><b><font

method="POST" action="http://192.168.1.21/irain/loginvali.jsp"> </p> <p align="left"></font><i><font size="4" color="#003366">Existing

User Sign-In Here...........</font></i><font size="4" color="#000080">&nbsp; </font><font size="6" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p> <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" style="bordercollapse: <tr> <td width="100%" height="30" colspan="2" bgcolor="#000000"> <p align="center"><b><font size="5" color="#FFFFFF">Login Form</font></b></td> </tr> <tr> <td width="71%" height="19"><b><font size="4">Enter The User Name</font></b></td> <td width="54%" height="19"><font size="4"> <b> collapse" bordercolor="#111111" width="55%" id="AutoNumber1" height="49">

<input type="text" name="T1" size="37"></b></font></td> </tr> <tr> <td width="71%" height="19"><b><font size="4">Enter The Password</font></b></td> <td width="54%" height="19"><font size="4"> <b> <input type="password" name="T2" size="37"></b></font></td> </tr> <tr> <td width="71%" height="19" bgcolor="#000000"> <p align="center"><font color="#FFFFFF" size="4"> <b> <input type="reset" value="Reset" name="B2"></b></font></td> <td width="54%" height="19" bgcolor="#000000"> <p align="center"><font color="#FFFFFF" size="4"> <b> <input type="submit" value="Submit" name="B1"></b></font></td> </tr> </table> </center> </div>

</font><font size="5" color="#003366"> <p></font><i><font size="5" color="#003366">New User :</font><font size="5" color="#000080"> <a href="signupform.jsp"> <font color="#00CC00">Registration</font></a></i></p> </form> <font size="6" color="#000080"> <p align="center">&nbsp;</p> </body> </html> Loginval.jsp <html> <%@page import="java.sql.*;"%> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.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 String uname=request.getParameter("T1"); pword=request.getParameter("T2");

session.setAttribute("username",uname); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con= DriverManager.getConnection("Jdbc:Odbc:irain"); Statement stmt=con.createStatement(); ResultSet rs=stmt.executeQuery("select * from userdata"); ResultSetMetaData int int { String String s1=rs.getString("uname"); s2=rs.getString("pword"); rsmd=rs.getMetaData(); n=rsmd.getColumnCount(); k=0;

while(rs.next())

if(uname.equals(s1) && pword.equals(s2)) { k=1; } } if(k==1) { response.sendRedirect("http://192.168.1.21/irain/loginsuccess.jsp"); } else { response.sendRedirect("http://192.168.1.21/irain/loginfail.jsp"); } } catch(Exception ex) { } %> </body> </html>

Loginsuccess.jsp
<html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta name="GENERATOR" content="Microsoft FrontPage 5.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> <p align="center"><p align="center"><i><font size="6" color="#0033CC"><b> Personal Data Storage In Cloud Computing</b></font></i><b><font size="6" color="#000080"><p align="left"><font size="5">Welcome: <%= session.getAttribute("username") %> </font> &nbsp;&nbsp;&nbsp; </p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp; <font size="5">Select The Cloud</font><font size="4">.........................</font></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<font size="6">&nbsp;&nbsp;&nbsp; <a href="nsharing.jsp">NonShare Cloud</a></font></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font size="6">&nbsp;&nbsp;&nbsp; <a href="sharing.jsp">Share Cloud</a></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp; </p> <p align="center">&nbsp;</p> </body> </html>

Screen Shots:

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