Sie sind auf Seite 1von 59

1

INTRODUCTION
As it is a competitive world and very Iast world, every thing in the universes is to be
internet. In this internet world all the things are on-line. II you are sitting on a machine on
which Java is not installed and you can not even download Java because oI some reason
but you have internet connectivity then there is no one stopping you Irom compiling and
testing your source code. This soItware 'On-line java compiler with security editor
project is an online compiler which can be used to see the output oI the java code you
have written. This is a web-based application where the clients can compile their java
code without need oI downloading and installing java on their systems. For security
reasons, a security editor is also developed where security Ior user Iiles is provided using
RSA algorithm.
PURPOSE OF SYSTEM
The main aim oI this project is that we can easily write a java program and compile it
and debug in on-line using this soItware. The client machine need not have java compiler
installed on its machine. The client machine should to be connected to the server. The
server has java compiler installed on its machine. So server executes the java code and
produce`s the error message (iI any) to the appropriate client machine.
In this project, we have also created a security editor. This editor perIorms Encryption
and decryption oI the Iiles. Encryption and decryption processes are perIormed using
RSA Algorithm. There are many security algorithms, but RSA algorithm is very eIIicient
to encrypt and decrypt the Iile. Hence we have chosen RSA algorithm Ior our project.
In this project we can view all type oI java API (Application Programming InterIace).
It is very useIul Ior writing the java program easily, Ior example iI any error in the Iormat
oI API means we can able to view API throw this modules.
PROBLEM`S IN THE EXISTING SYSTEM
In the existing system every client has to have java compiler installed on its system.
Then only the clients can compile their java code. Every client machine has to write their
java programs in the editor present in their system and have to compile in their system
only. Moreover to view any API InIormation, the clients have to search all the libraries
present in JDK. Thus it is a time consuming process. No security is provided Ior the user
programs. The existing system is a stand alone application. II any update is available Ior


the soItware it has to be updated in each and every client system. For any organization,
this becomes very tedious, time consuming and costly aIIair.
PROPOSED SYSTEM
The proposed system is designed to eliminate the drawbacks oI the existing system. It
is designed to eliminate the drawbacks oI the present system in order to provide a
permanent solution to the problems. The primary aim oI the new system is to save time
and memory space Ior each client. Here, we have proposed a client server sytem in which
only the server has java compiler installed on its machine and all the clients can compile
their java applications without having java compiler installed on their sytems. For
security purposes a security editor is also developed.
This is a web-based application. It avoids all the management service issues which we
Iace in the existing system. The Present System is having the advantages like Iast
accessing oI the data, Iast compilation oI java Iiles and good Security Mechanism.
SCOPE OF THE PRO1ECT
This document describes the requirements oI the system. It is meant Ior the use by the
developers, and will also be the basis Ior validating the Iinal delivered system.
This project has a very large scope oI expansion. It can be Iurther enhanced in such a
way that it not only compiles the java code but also perIorms execution and produce the
desired output Ior the user program. Moreover the system can be Iurther enhance in such
a way that it compiles code oI all languages in java.









SOFTWARE REQUIREMENTS
FEATURES
The proposed system should have the Iollowing Ieatures
Each registered client should be allowed to login with his user id and password.
II the client is not yet registered he should be registered as a new user aIter taking
enough details about the client.
The Server and Client`s InterIace should be as simple as possible so that they can
be conIigured even by a nave user.
Every client can create Iile, compile it, view any API inIormation, encrypt or
decrypt his Iiles.
Server should be able to serve all the client requests properly without consuming
much oI time
&sers should able to view error report on compilation.
A user should be able to save the Iiles.

SOFTWARE REQUIREMENTS
Operating System : Windows 7
Front End : HTML,CSS,JavaScript,JDBC
Middle Ware : Java Servlets
Back End : Oracle
Server : Tomcat 6.0
HARDWARE REQUIREMENTS
Processor : Intel Pentium IV
Clock Speed : 700 MHZ or above
RAM : 51 MB
Hard Disk : 40GB
4

SYSTEM ANALYSIS
System analysis Iocuses on speciIying Ior what the system or the application is required
to do. It allows the individuals to see the logical elements (what the system should do)
apart Irom the physical components it uses (computers, terminals and storage system).

STUDY OF THE SYSTEM
To provide Ilexibility to the users, the interIaces have been developed that are accessible
through a browser. The G&I at the top level is The operational or generic user interIace.
The operational or generic user interIace` helps the end users oI the system in
transactions through the existing data and required services. The operational user
interIace also helps the ordinary users in managing their own inIormation in a customized
manner as per the included Ilexibilities.

INPUT & OUTPOUT REPRESENTATION
The main objective is as given below:
O To produce a cost-eIIective method oI input and output.
O To achieve the highest possible level oI accuracy.
O To ensure that the input and output are acceptable and understood by the user.

INPUT STAGES
The main input stages can be listed as below:
&ser enters his user id and password.
New user enters his name, password, email id and address.
&ser create java Iiles.
&ser inputs the java Iile name that he wants to compile.
&ser inputs the name oI API class he wants inIormation about.
&ser enters the text to be encrypted.
&ser inputs any two prime numbers Ior generation oI secret keys.

OUTPUT STAGES
The main output stages can be listed as below:
5

&ser can view Iile storage report.
&ser can view error report on compilation oI java Iile.
&ser can view inIormation oI the API class`s constructors and its methods.
&ser can view the generated keys.
&ser can view the encrypted text (Cipher text).
&ser can view the decrypted text (Plain text) on supplying secret key.

PROCESS MODEL WITH 1USTIFACTION

SDLC (Umbrella Model)


Fig.1 SDLC (umbrella model)





&2-70,
&2-70,
&2-70,
- FeasIbIlIty Study
- TEA| FDF|ATDN
- Project
SpecIfIcatIon
PFEPAFATDN

8usIness FequIrement
0ocumentatIon
ANALYSS
E0ESCN
CD0E UNT TEST
0DCU|ENT CDNTFDL
ASSESS|ENT

TFANNC
NTECFATDN
E SYSTE|
TESTNC

0EL7EFY/NS
TALLATDN
ACCEPTANCE
TEST
FequIrements
CatherIng
6

SDLC is nothing but SoItware Development LiIe Cycle. It is a standard which is used by
soItware industry to develop good soItware. This process model is used because all
requirements were known beIorehand and the objective oI our soItware development is the
computerization/automation oI a manual working system.

Stages in SDLC
i. Requirement Gathering
ii. Analysis
iii. Designing
iv. Coding
v. Testing
vi. Maintenance
i Requirements Gathering stage
The requirements gathering process takes as its input the goals identiIied in the high-
level requirements section oI the project plan. Each goal will be reIined into a set oI one or
more requirements. These requirements deIine the major Iunctions oI the intended
application, deIine operational data areas and reIerence data areas, and deIine the initial data
entities. Major Iunctions include critical processes to be managed, as well as mission critical
inputs, outputs and reports. A user class hierarchy is developed and associated with these
major Iunctions, data areas, and data entities. Each oI these deIinitions is termed a
Requirement. Requirements are identiIied by unique requirement identiIiers and, at
minimum, contain a requirement title and textual description.
These requirements are Iully described in the primary deliverables Ior this stage: the
Requirements Document and the Requirements Traceability Matrix (RTM). The requirements
document contains complete descriptions oI each requirement, including diagrams and
reIerences to external documents as necessary. Note that detailed listings oI database tables
and Iields are not included in the requirements document.
The title oI each requirement is also placed into the Iirst version oI the RTM, along with
the title oI each goal Irom the project plan. The purpose oI the RTM is to show that the
product components developed during each stage oI the soItware development liIecycle are
Iormally connected to the components developed in prior stages.
7



Fig. Requirements Gathering in SDLC
In the requirements stage, the RTM consists oI a list oI high-level requirements, or
goals, by title, with a listing oI associated requirements Ior each goal, listed by requirement
title. In this hierarchical listing, the RTM shows that each requirement developed during this
stage is Iormally linked to a speciIic product goal. In this Iormat, each requirement can be
traced to a speciIic product goal, hence the term requirements traceability.
The outputs oI the requirements deIinition stage include the requirements document,
the RTM, and an updated project plan.
O Feasibility study is all about identiIication oI problems in a project.
O No. oI staII required to handle a project is represented as Team Formation, in this case
only modules are individual tasks will be assigned to employees who are working Ior
that project.
O Project SpeciIications are all about representing oI various possible inputs submitting
to the server and corresponding outputs along with reports maintained by
administrator

ii Analysis Stage
The planning stage establishes a bird's eye view oI the intended soItware product, and
uses this to establish the basic project structure, evaluate Ieasibility and risks associated with
the project, and describe appropriate management and technical approaches. The most critical


section oI the project plan is a listing oI high-level product requirements, also reIerred to as
goals.
All oI the soItware product requirements to be developed during the requirements
deIinition stage Ilow Irom one or more oI these goals. The minimum inIormation Ior each
goal consists oI a title and textual description, although additional inIormation and reIerences
to external documents may be included. The outputs oI the project planning stage are the
conIiguration management plan, the quality assurance plan, and the project plan and
schedule, with a detailed listing oI scheduled activities Ior the upcoming Requirements stage,
and high level estimates oI eIIort Ior the out stages.


Fig. Analysis stage in SDLC

iii Designing Stage
The design stage takes as its initial input the requirements identiIied in the approved
requirements document. For each requirement, a set oI one or more design elements will be
produced as a result oI interviews, workshops, and/or prototype eIIorts. Design elements
describe the desired soItware Ieatures in detail, and generally include Iunctional hierarchy
diagrams, screen layout diagrams, tables oI business rules, business process diagrams, pseudo
code, and a complete entity-relationship diagram with a Iull data dictionary. These design
elements are intended to describe the soItware in suIIicient detail that skilled programmers
may develop the soItware with minimal additional input.


When the design document is Iinalized and accepted, the RTM is updated to show
that each design element is Iormally associated with a speciIic requirement. The outputs oI
the design stage are the design document, an updated RTM, and an updated project plan.



Fig.4 Designing stage in SDLC
iv Development (Coding) Stage
The development stage takes as its primary input the design elements described in the
approved design document. For each design element, a set oI one or more soItware artiIacts
will be produced. SoItware artiIacts include but are not limited to menus, dialogs, data
management Iorms, data reporting Iormats, and specialized procedures and Iunctions.
Appropriate test cases will be developed Ior each set oI Iunctionally related soItware artiIacts,
and an online help system will be developed to guide users in their interactions with the
soItware.
The RTM will be updated to show that each developed artiIact is linked to a speciIic
design element, and that each developed artiIact has one or more corresponding test case
items. At this point, the RTM is in its Iinal conIiguration. The outputs oI the development
stage include a Iully Iunctional set oI soItware that satisIies the requirements and design
elements previously documented, an online help system that describes the operation oI the
soItware, an implementation map that identiIies the primary code entry points Ior all major
system Iunctions, a test plan that describes the test cases to be used to validate the correctness
and completeness oI the soItware, an updated RTM, and an updated project plan.
10


Fig.5 Coding stage in SDLC
v Integration & Test Stage
During the integration and test stage, the soItware artiIacts, online help, and test data
are migrated Irom the development environment to a separate test environment. At this point,
all test cases are run to veriIy the correctness and completeness oI the soItware. SuccessIul
execution oI the test suite conIirms a robust and complete migration capability. During this
stage, reIerence data is Iinalized Ior production use and production users are identiIied and
linked to their appropriate roles. The Iinal reIerence data (or links to reIerence data source
Iiles) and production user list are compiled into the Production Initiation Plan.
The outputs oI the integration and test stage include an integrated set oI soItware, an
online help system, an implementation map, a production initiation plan that describes
reIerence data and production users, an acceptance plan which contains the Iinal suite oI test
cases, and an updated project plan.
11


Fig.6. Integration & test stage in SDLC
Installation & Acceptance Test
During the installation and acceptance stage, the soItware artiIacts, online help, and
initial production data are loaded onto the production server. At this point, all test cases are
run to veriIy the correctness and completeness oI the soItware. SuccessIul execution oI the
test suite is a prerequisite to acceptance oI the soItware by the customer.
AIter customer personnel have veriIied that the initial production data load is correct
and the test suite has been executed with satisIactory results, the customer Iormally accepts
the delivery oI the soItware.
The primary outputs oI the installation and acceptance stage include a production
application, a completed acceptance test suite, and a memorandum oI customer acceptance oI
the soItware. Finally, the PDR enters the last oI the actual labor data into the project schedule
and locks the project as a permanent project record. At this point the PDR "locks" the project
by archiving all soItware items, the implementation map, the source code, and the
documentation Ior Iuture reIerence.

1


Fig.7 Installation & acceptance test in SDLC

vi Maintenance
Outer rectangle represents maintenance oI a project, Maintenance team will start with
requirement study, understanding oI documentation later employees will be assigned work
and they will under go training on that particular assigned category.
For this liIe cycle there is no end, it will be continued so on like an umbrella (no ending point
to umbrella sticks).










1

SYSTEM ARCHITECTURE
ARCHITECTURE FLOW
Below architecture diagram represents mainly Ilow oI requests Irom users to database
through servers. In this scenario overall system is designed in three tires separately using
three layers called presentation layer, business logic layer and data link layer. This project
was developed using -tire architecture.





















Fig. -tier Architecture






--
%7/6
.
:
,. ,.
14

URL PATTERN
&RL pattern represents how the requests are Ilowing through one layer to another layer
and how the responses are getting by other layers to presentation layer through server in
architecture diagram.


























Fig. &RL pattern



...


--
~ -
--
.-
, ,.
. ... .
.
,. .
,. .
.
.~~:~-
.,..
.,.. .
. ...
..
,. ,. .
.
.. .
..
15

SYSTEM DESIGN
System design is transition Irom a user oriented document to programmers or data
base personnel. The design is a solution, how to approach to the creation oI a new system.
This is composed oI several steps. It provides the understanding and procedural details
necessary Ior implementing the system. Designing goes through logical and physical stages
oI development, logical design reviews the present physical system, prepare input and output
speciIication, details oI implementation plan and prepare a logical design walkthrough.
The database tables are designed by analyzing Iunctions involved in the system and
Iormat oI the Iields is also designed. The Iields in the database tables should deIine their role
in the system. The unnecessary Iields should be avoided because it aIIects the storage areas oI
the system. Then in the input and output screen design, the design should be made user
Iriendly. The menu should be precise and compact.

SOFTWARE DESIGN
Modules of the Project
i. JAVA FILE CREATION
ii. JAVA FILE COMPLILATION
iii. JAVA API INFORMATION
iv. ENCRYPTION
v. DECRYPTION

i 1AVA FILE CREATION
In this module we can create a java Iile and save it in our local Iile system. Any client
can create a java Iile using this web page. The client can create as many java Iiles and save
it. The web page also used as an editor Ior the clients to create java Iiles. &sing this the
client can easily create a java Iile. It is also user Iriendly Ior the clients.
ii 1AVA FILE COMPLILATION
In this module, we can compile any java application that we are creating. The client
machine is not required to have the JDK installed on their machines. The client can use this
web application and he can compile the java Iile. The client machines java application is
16

compiled with the help oI the JDK installed in the server machine. The JDK installed in the
server machine does the compilation Ior all the java programs available in the server
machines
iii 1AVA API INFORMATION
In this module, we can know the inIormation oI all the API (Application programming
InterIace) available in java. &sing this module we can know all the methods that are available
in a class or an interIace. The application programming interIace is a collection oI classes and
interIaces available in a package. It is not possible Ior a programmer to remember all the
methods available in a class or an interIace available in a package so at that time the
programmer can make use oI these JAVA API
iv ENCRYPTION
In this module, we are doing encryption using RSA (Ron Rivest, Adi Shamir and Len
Adleman) Algorithm. We are encrypting the Iile with the help oI RSA Algorithm. For
encrypting a Iile, we need to get two prime number`s Irom the user. With the help oI these
prime numbers we are encrypting the Iile. Now the actual text oI the Iile is converted to a
cipher text. So it will not be visible Ior the user. It will not be in the known Iormat.
v DECRYPTION
In this module, we are doing decryption using RSA (Ron Rivest, Adi Shamir and Len
Adleman) Algorithm. We are decrypting the Iile with the help oI RSA Algorithm. For
decrypting a Iile, we need to decrypt it by giving the private keys. With the help oI these
private keys we are decrypting the Iile. Now the cipher text oI the Iile is converted to the
actual text. So it will visible Ior the user. It will be in a known Iormat.

INPUT DESIGN
Input design is the bridge between users and inIormation system. It speciIies the
manner in which data enters the system Ior processing it can ensure the reliability oI
the system and produce reports Irom accurate data or it may results in output oI error
inIormation. In E-Compiler Ior Java With Security Editor, a Iorm which has inputs
in the system is discussed below:
1. &ser login
17

. New user registration
. Creating java Iile and saving
4. View java API
5. Compile Iile
6. Encrypt Iile
7. Decrypt Iile

Also the measures are taken Ior the Iollowing
Controlling the amount oI input
Avoid unauthorized access
Eliminating extra steps
Keeping the process simple

OUTPUT DESIGN
All the screens oI the system are designed with a view to provide the user with easy
operations in simpler and eIIicient way, minimum key strokes possible. Instructions and
important inIormation is emphasized on the screen. Almost every screen is provided with no
error and important messages and option selection Iacilitates. Emphasis is given Ior speedy
processing and speedy transaction between the screens. Each screen assigned to make it as
much user Iriendly as possible by using interactive procedures. So to say user can operate the
system without much help Irom the operating manual.

UML DIAGRAMS
UML stands Ior UNIFIED MODELLING LANGUAGE The uniIied modeling language
allows the soItware engineer to express an analysis model using the modeling notation that is
governed by a set oI syntactic, semantic and pragmatic rules.







1

Class Diagram


Fig.10 Class diagram Ior user module


Usecase Diagram



Fig.11 &secase diagram Ior user module





Decryption
Encryption Key
Decryptiom Key
SecretKey
Decryption()
User1
Username
Password
Login()
NewUser()
Reset()
Java
Filename
Extention
Compile()
Error()
AP
FilenputStream
FileOutputStream
Methods()
Encryption
Prime no1
Prime no2
Encryption()
Login
User
Registration
1



Fig.1 &secase diagram Ior registration module





FirstName
LastName
Emailid
Password
Submit
User
Reset
0


Fig.1 &secase Diagram Ior All modules
























compile java file
View AP information
Encryption
Decryption
User
create java file
1


Sequence Diagram


Fig.14 Sequence Diagram Ior &ser Module














f the User s NewUser
User Username Password DataBase NewUser
Click on UserName
Click on Password
Username&Password Sent to Database
Verify
Return to Successful Page


Collaboration diagram

Fig.15 Collaboration Diagram Ior &ser module























NewUser
User
Usernam
e
Passwor
d
Data
Base
4: Verify
1: Click on UserName
2: Click on Password
3: Username&Password Sent to Database
5: Return to Successful Page
6: f the User s NewUser


Component diagram


Fig.16 Component Diagram Ior &ser Module



Fig.17 Comonent Diagram Ior Encrtption and Decryption



Decryption
User
Create java
file
Encryption
Compile
javafile
View javaAP
Prime
Number p
Prime
Number q
Send Keys
User1
Encryption
Decryption
4

Deployement diagram



Fig.1 Deployment Diagram Ior &serModule










User
Create
Javafile
Compile
Javafile
View
JavaAP
Encrypti
on
Decrypti
on
5

OVERVIEW OF SOFTWARE DEVELOPMENT TOOLS
1ava Technology
Java technology is both a programming language and a platIorm.
The 1ava Programming Language
The Java programming language is a high-level language that can be characterized by
all oI the Iollowing buzzwords:
O Simple
O Architecture neutral
O Object oriented
O Portable
O Distributed
O High perIormance
O Interpreted
O Multithreaded
O Robust
O Dynamic
O Secure
With most programming languages, you either compile or interpret a program so that you can
run it on your computer. The Java programming language is unusual in that a program is both
compiled and interpreted. With the compiler, Iirst you translate a program into an
intermediate language called ava byte codes the platIorm-independent codes interpreted
by the interpreter on the Java platIorm. The interpreter parses and runs each Java byte code
instruction on the computer. Compilation happens just once; interpretation occurs each time
the program is executed. The Iollowing Iigure illustrates how this works.


Fig.1 WORKING OF JAVA
You can think oI Java bytecode as the machine code instructions Ior the ava Jirtual
Machine (Java VM). Every Java interpreter, whether it`s a development tool or a Web
6

browser that can run applets, is an implementation oI the Java VM. Java bytecodes help make
'write once, run anywhere possible. You can compile your program into bytecodes on any
platIorm that has a Java compiler. The bytecodes can then be run on any implementation oI
the Java VM. That means that as long as a computer has a Java VM, the same program
written in the Java programming language can run on Windows 000, a Solaris workstation,
or on an iMac.
The 1ava Platform
A 5latform is the hardware or soItware environment in which a program runs. We`ve
already mentioned some oI the most popular platIorms like Windows 000, Linux, Solaris,
and MacOS. Most platIorms can be described as a combination oI the operating system and
hardware. The Java platIorm diIIers Irom most other platIorms in that it`s a soItware-only
platIorm that runs on top oI other hardware-based platIorms.
The Java platIorm has two components:
O The ava Jirtual Machine (Java VM)
O The ava A55lication Programming Interface (Java API)
You`ve already been introduced to the Java VM. It`s the base Ior the Java platIorm
and is ported onto various hardware-based platIorms. The Java API is a large collection oI
ready-made soItware components that provide many useIul capabilities, such as graphical
user interIace (G&I) widgets. The Java API is grouped into libraries oI related classes and
interIaces; these libraries are known as 5ackages. The next section, what can Java
Technology do? It highlights what Iunctionality some oI the packages in the Java API
provide.
The Iollowing Iigure depicts a program that`s running on the Java platIorm. As the
Iigure shows, the Java API and the virtual machine insulate the program Irom the hardware.

Fig.0 THE JAVA PLATFORM
Native code is code that aIter you compile it, the compiled code runs on a speciIic
hardware platIorm. As a platIorm-independent environment, the Java platIorm can be a bit
slower than native code. However, smart compilers, well-tuned interpreters, and just-in-time
bytecode compilers can bring perIormance close to that oI native code without threatening
portability.
7

SWINGS and AWT:
When developing a Java program it is important to select the appropriate Java
Graphical &ser InterIace (G&I) components. There are two basic sets oI components that you
will most likely build your Java programs with. These two groups oI components are called
the Abstract Window Toolkit (AWT) and Swing. Both oI these groups oI components are
part oI the Java Foundation Classes (JFC).
An Overview of the AWT
AWT stands Ior Abstract Window ToolKit. The Abstract Window Toolkit supports
G&I Java programming. It is a portable G&I library Ior stand-alone applications and/or
applets. The Abstract Window Toolkit provides the connection between your application and
the native G&I. The AWT provides a high level oI abstraction Ior your Java program since it
hides you Irom the underlying details oI the G&I your program will be running on.
AWT Ieatures include:
O A rich set oI user interIace components.
O A robust event-handling model.
O Graphics and imaging tools, including shape, color, and Iont classes.
O Layout managers, Ior Ilexible window layouts that don't depend on a particular
window size or screen resolution.
Data transIer classes, Ior cut-and-paste through the native platIorm clipboard. The
AWT components depend on native code counterparts (called peers) to handle their
Iunctionality. Thus, these components are oIten called "heavyweight" components.
An Overview of Swing
Swing implements a set oI G&I components that build on AWT technology and
provide a pluggable look and Ieel. Swing is implemented entirely in the Java programming
language, and is based on the JDK 1.1 Lightweight &I Framework.
Swing Ieatures include:
O All the Ieatures oI AWT.
O 100 Pure Java certiIied versions oI the existing AWT component set (Button,
Scrollbar, Label, etc.).
O A rich set oI higher-level components (such as tree view, list box, and tabbed panes).


O Pure Java design, no reliance on peers.
O Pluggable Look and Feel.
Swing components do not depend on peers to handle their Iunctionality. Thus, these
components are oIten called "lightweight" components.
AWT
Pros:
O Speed: use oI native peers speeds component perIormance.
O Applet Portability: most Web browsers support AWT classes so AWT applets can run
without the Java plugin.
O Look and Feel: AWT components more closely reIlect the look and Ieel oI the OS
they run on.
Cons:
O Portability: use oI native peers creates platIorm speciIic limitations. Some
components may not Iunction at all on some platIorms.
O Third Party Development: the majority oI component makers, including Borland and
Sun, base new component development on Swing components. There is a much
smaller set oI AWT components available, thus placing the burden on the
programmer to create his or her own AWT-based components.
O Features: AWT components do not support Ieatures like icons and tool-tips.

Swing
Pros:
O Portability: Pure Java design provides Ior Iewer platIorm speciIic limitations.
O Behavior: Pure Java design allows Ior a greater range oI behavior Ior Swing
components since they are not limited by the native peers that AWT uses.
O Features: Swing supports a wider range oI Ieatures like icons and pop-up tool-tips Ior
components.


O Vendor Support: Swing development is more active. Sun puts much more energy into
making Swing robust.
O Look and Feel: The pluggable look and Ieel lets you design a single set oI G&I
components that can automatically have the look and Ieel oI any OS platIorm
(MicrosoIt Windows, Solaris, Macintosh, etc.). It also makes it easier to make global
changes to your Java programs that provide greater accessibility (like picking a hi-
contrast color scheme or changing all the Ionts in all dialogs, etc.).
Cons
O Applet Portability: Most Web browsers do not include the Swing classes, so the Java
plugin must be used.
O PerIormance: Swing components are generally slower and buggier than AWT, due to
both the Iact that they are pure Java and to video issues on various platIorms. Since
Swing components handle their own painting (rather than using native API's like
DirectX on Windows) you may run into graphical glitches.
O Look and Feel: Even when Swing components are set to use the look and Ieel oI the
OS they are run on, they may not look like their native counterparts.
SERVLETS OVERVIEW
INTRODUCTION
Servlet extend the request-response-oriented servers, such as Java-enabled
Web servers. For example, a servlet can retrieve data Irom an HTML Iorm and
applying the business logic used to update Product database.

Fig.1 Servlet updating product DB
Client System






HTTP
Server
Servlet

Product
Database
0

Applets used in browsers, Similarly Servlets Ior server. The servlet API assumes
nothing about the server`s environment or protocol. So Servlet can be embedded in
many diIIerent servers.
Uses of Other Servlets
There are many applications Ior servlets:
A Servlet can handle multiple requests concurrently, it allows servlets to
support systems and concurrently requests.
Servlets can be used to balance load among several servers that mirror the
same content, and to partition a single logical service over several servers,
thus servlets can Iorward requests.
Web Servers
A Web server receives the request it then springs into action. Depending on
the type oI request, the webserver might look Ior a web page or it might execute
program on the server, usually, as discussed earlier, CGI script or an advanced
server-side program.
The Servlet API
The two packages contains the code to build the servlets:
i. javax.servlet
ii. javax.servlet.http
i javaxservlet package
The javax.servlet package contains a number oI interIaces and classes that
establish the Iramework in which servlets operate. The ServletRequest and
ServletResponse are very important.
The ServletRequest interIace is used to read data Irom a client request.
The ServletResponse interIace is used to write data to a client response.
Servlet Interface
All servlets must implement Servlet interIace. Generic Servlet must
implement Servlet and ServletconIig interIace. HttpServlet extends GenericServlet.
It is commonly used to servlets that receives and process HTTP requests.
1


Fig.1 Servlet interIace
ServletRequest Interface
The ServletRequest interIace is implemented by the server. It enables to
obtain about a client request.The parameter oI the names passed by the client, and
the names oI the remote host that made the request. Servlets use to get data Irom
clients that use application protocols such as the HTTP POST and P&T methods in
an InputStream such as ServletInputStream. The HttpServletRequest interIace
contains methods Ior accessing HTTP-speciIic header inIormation.
Servlet Response Interface
The ServletResponce interIace is implemented by the server. It enables to
obtain about a client response. It allows the servlet to set the content length. Servlet
can send the reply data which writer through n output stream such as
ServletOutputStream. The HttpResponse interIace contains allow the servlet to
manipulate HTTP-speciIic header inIormation.
ii. javaxservlethttp Package
The javax.servlet.http package contains several interIaces and classes that are
commonly used by servlet developers.
Http Request and Responses
The Http Requests and Responses contains two arguments:
GenericServlets
ServletConIig
Servlet
HttpServlet


HttpServletRequest
An HttpServletRequest is used to enables servlets to read data Irom an HTTP
request. An HttpServletResponse is used to enables servlets to write data to an
HTTP response.
HttpServletResponse
An HttpServletResponse object provides the HTTP method. To access the
data Irom the user:
The getWriter method returns a Writer.
The getOutputStream method returns the ServletOutputStream.
Servlets Features:
Servlets are eIIicient when compared to any other server-side programs.
They allow persistence oI data to be maintained. More important is the Iact they are
portable, robust security Ieatures.
Servlets Better than CGI:
Servlets oIIer advantages over CGI in the areas oI perIormance, portability
and security. Each oI these advantages will be discussed in turn:
PerIormance is perhaps the most visible diIIerence between servlets and
CGI. Since most servlets run in the same process space as the server and
are loaded only once, they are able to respond much more quickly and
eIIiciently to client requests. In contrast, CGI must create a new process to
service each new request. The overhead involved with creating a new
process incurs a signiIicant perIormance penality. &nlike servlets, CGI
cannot share a single database connection across multiple requests.
Portability is another strong advantage Ior servlets. &nlike many CGI
applications, servlets can be run on diIIerent servers and platIorms without
modiIications. This characteristic can be extremely important when
building enterprise-wide distributed applications.
Servlets are much more secure than CGI. Though CGI scripts can be
written in Java, they are oIten written in more error-prone language such as
C, since C programs can inadvertently or maliciously access invalid


memory locations, CGI programs are less secure. OI course, these
restrictions can be liIted according to the security policies set by the Java
Security Manager.
Life Cycle of Servlet:
Each Servlet has the same liIe cycle:
Sever loads and initializes the servlets calls the init () method.
The sever handles zero or more client requests calls the service () method.
The server removes the servlets calls the destroy () method. (Some servers do
this step only when they shutdown Destroy ())
HTML
HyperText Markup Language is a language which is used to create web pages with html
marking up a page to indicate its Iormat, telling the web browser where you want a new line
to begin or how you want text or images aligned and more are possible.
HTML is not a programming language but it is an application oI ISO Standard
7,SGML(Standard Generalized Markup Language),but Specialized to hypertext and
adapted to the Web. The idea behind Hypertext is one point to another point. We can navigate
through the inIormation based on out interest and preIerence. A markup language is simply a
series oI items enclosed within the elements should be displayed. Hyperlinks are underlined
or emphasized works that load to other documents or some portions oI the same document.
Html can be used to display any type oI document on the host computer, which can be
geographically at a diIIerent location. It is a versatile language and can be used on any
platIorm or desktop.
HTML provides tags(special codes) to make the document look attractive.HTML tags are
not case-sensitive. &sing graphics,Ionts,diIIerent sizes, color, etc.. can enhance the
presentation oI the document. Anything that is not a tag is part oI the document it selI.
Basic Html Tags:
!-- --~ SpeciIic Comments.
A~...../A~ Creates Hypertext links.
Big~..../Big~ Formats text in large-Iont
Body~.../Body~ Contains all tags and text in the Html-document
Center~../Center~ Creates Text
4

DD~...../DD~ DeIinition oI a term.
TABLE~../TABLE~ creates table
Td~...../Td~ indicates table data in a table.
Tr~...../Tr~ designates a table row
Th~..../Th~ creates a heading in a table.

HTML TABLE`S
Tables are so popular with web page authors is that they let you arrange the elements
oI a web page in such a way that the browser won`t rearrange them web page authors
Irequently use tables to structure web pages.
<TR>
<TR> is used to create a row in a table encloses TH~ and TD~ elements.
TR~ contain many attributes. Some oI them are:
ALIGN: speciIies the horizontal alignment oI the text in the table row.
BGCOLOR: SpeciIies the background color Ior the row.
BORDERCOLOR: Sets the external border color Ior the row.
VALIGN: Sets the vertical alignment oI the data in this row.
<TH>
TH~ is used to create table heading.
ALIGN: Sets the horizontal alignment oI the content in the table cell. Sets LEFT,
RIGHT, CENTER.
BACKGRO&ND: Species the back ground image Ior the table cell.
BGCOLOR: SpeciIies the background color oI the table cell
VALIGN: Sets the vertical alignment oI the data. Sets to TOP, MIDDLE, BOTTOM
or BASELINE.
WIDTH: SpeciIies the width oI the cell. Set to a pixel width or a percentage oI the
display area.
<TD>
TD~ is used to create table data that appears in the cells oI a table.
ALIGN: Species the horizontal alignment oI content in the table cell. Sets to LEFT,
CENTER, RIGHT.
BGCOLOR: SpeciIies the background image Ior the table cell.
BGCOLOR: sets the background color oI the table cells.
WIDTH: Species the width oI the cell
5

HTML FRAME`S
Frames are used Ior either run oII the page or display only small slices oI what
are supposed to be shown and to conIigure the Irame we can use FRAMESET~. There are
two important points to consider while working with FRAMESET~.
FRAMESET~ element actually takes the place oI the BODY~ element in a
document.
SpeciIying actual pixel dimensions Ior Irames.

FRAME~ Elements are used to create actual Irames. From the Irameset point oI view
dividing the browser into tow vertical Irames means creating two columns using the
FRAMESET~ elements COLS attribute.
The syntax Ior vertical Iragmentation is,
FRAMESET COLS 50, 50~
/FRAMESET~
Similarly iI we replace COLS with ROWS then we get horizontal Iragmentation.
The syntax Ior horizontal Iragmentation is,
FRAMESET ROWS50, 50~
/FRAMESET~
HTML FORM`S
The purpose oI FORM is to create an HTML Iorm; used to enclose HTML controls,
like buttons and text Iields.
ATTRIB&TES
O ACTION: Gives the &RL that will handle the Iorm data.
O NAME: Gives the name to the Iorm so you can reIerence it in code set to an
alphanumeric string.
O METHOD: method or protocol is used to sending data to the target action &RL. The
GET method is the deIault, it is used to send all Iorm name/value pair inIormation in
an &RL. &sing the POST method, the content oI the Iorm are encoded as with the
GET method, but are sent in environment variables.
CONTROLS IN HTML
<INPUT TYPE BUTTON>
Creates an html button in a Iorm.

6

ATTRIB&TES:
O NAME: gives the element a name. Set to alphanumeric characters.
O SIZE: sets the size.
O VAL&E: sets the caption oI the element.

<INPUT TYPE PASSWORD>
Creates a password text Iield, which makes typed input.
ATTRIB&TES:
O NAME: gives the element a name, set to alphanumeric characters.
O VAL&E: sets the deIault content oI the element.

<INPUT TYPERADIO>
Creates a radio button in a Iorm.
ATTRIB&TES:
O NAME: Gives the element a name. Set to alphanumeric character.
O VAL&E: Sets the deIault content oI the element.

<INPUT TYPESUBMIT>
Creates a submit button that a user can click to send data in the Iorm back to web server.
ATTRIB&TES:
O NAME: Gives the element a name. Set to alphanumeric characters.
O VAL&E: Gives this button another label besides the deIault, Submit Query. Set to
alphanumeric characters.
<INPUT TYPETEXT>
Creates a text Iield that the user can enter or edit text in.
ATTRIB&TES:
O NAME: Gives the element a name. Set to alphanumeric characters.
O VAL&E: Holds the initial text in the text Iield. Set to alphanumeric characters.
ADVANTAGES OF HTML
A HTML document is small and hence easy to send over the net.It is small because it
does not include Iormatted inIormation.
HTML is platIorm independent
HTML tags are not case-sensitive.
7

ORACLE
Oracle is a relational database management system, which organizes data in the Iorm
oI tables. Oracle is one oI many database servers based on RDBMS model, which manages a
seer oI data that attends three speciIic things-data structures, data integrity and data
manipulation. With oracle cooperative server technology we can realize the beneIits oI open,
relational systems Ior all the applications. Oracle makes eIIicient use oI all systems resources,
on all hardware architecture; to deliver unmatched perIormance, price perIormance and
scalability. Any DBMS to be called as RDBMS has to satisIy Dr.E.F.Codd`s rules.

DISTINCT FEATURES OF ORACLE

ORACLE IS PORTABLE:
The Oracle RDBMS is available on wide range oI platIorms ranging Irom PCs to
super computers and as a multi user loadable module Ior Novel NetWare, iI you develop
application on system you can run the same application on other systems without any
modiIications.
ORACLE IS COMPATIBLE:
Oracle commands can be used Ior communicating with IBM DB mainIrame
RDBMS that is diIIerent Irom Oracle, that is Oracle compatible with DB. Oracle
RDBMS is a high perIormance Iault tolerant DBMS, which is specially designed Ior
online transaction processing and Ior handling large database applications.
MULTITHREADED SERVER ARCHITECTURE:
Oracle adaptable multithreaded server architecture delivers scalable high perIormance
Ior very large number oI users on all hardware architecture including symmetric
multiprocessors (sumps) and loosely coupled multiprocessors. PerIormance is achieved
by eliminating CP&, I/O, memory and operating system bottlenecks and by optimizing
the Oracle DBMS server code to eliminate all internal bottlenecks.
FEATURES OF ORACLE:
Most popular RDBMS in the market because oI its ease oI use
O Client/server architecture.
O Data independence.
O Ensuring data integrity and data security.


O Managing data concurrency.
O Parallel processing support Ior speed up data entry and online transaction processing
used Ior applications.
O DB procedures, Iunctions and packages.







TESTING
SOFTWARE TESTING
SoItware testing is a critical element oI soItware quality assurance and represents the
ultimate review oI speciIication, design and coding.
TESTING OB1ECTIVES
O To ensure that during operation the system will perIorm as per speciIication.
O TO make sure that system meets the user requirements during operation
O To make sure that during the operation, incorrect input, processing and output will be
detected
O To see that when correct inputs are Ied to the system the outputs are correct
O To veriIy that the controls incorporated in the same system as intended
O Testing is a process oI executing a program with the intent oI Iinding an error
O A good test case is one that has a high probability oI Iinding an as yet undiscovered
error
The soItware developed has been tested successIully using the Iollowing testing strategies
and any errors that are encountered are corrected and again the part oI the program or the
procedure or Iunction is put to testing until all the errors are removed. A successIul test is one
that uncovers an as yet undiscovered error.
Note that the result oI the system testing will prove that the system is working
correctly. It will give conIidence to system designer, users oI the system, prevent Irustration
during implementation process etc.,
STRATEGIC APPROACH TO SOFTWARE TESTING
The process oI testing a soItware in a well planned and systematic way is known as
soItware testing liIe cycle(STLC). SDLC is SoItware Development LiIeCycle, it is a
systematic approach to develop a soItware.
SoItware development liIe cycle (SDLC) and SoItware Testing LiIe cycle (STLC) go
parallely.
SDLC (Software
Development Life cycle)
STLC (Software Test Life Cycle)
Requirements gathering
Stage

Requirements Analysis is done is this phase, soItware
requirements are reviewed by test team.

40

Design Stage

Test Planning, Test analysis and Test design is done in this phase.
Test team reviews design documents and prepares the test plan.

Coding or development
Stage

Test construction and veriIication is done in this phase, testers
write test cases and Iinalizes test plan.


Testing Stage

Test Execution and bug reporting, manual testing, automation
testing is done, deIects Iound are reported.
Re-testing and regression testing is also done in this phase.

Deployment Stage

Final testing and implementation is done is this phase andIinal
test report is prepared.

Maintenance Stage

Maintenance testing is done in this phase.


OUTPUT TESTING

S.No. sd TestCaseID Test Case Description Execution Method Expected
Result
Actual
Outcome
TestCase
Result
1. 1. On entering the &RL Ior
application does login
page opens?
Open browser and
type the url
Login page
should be
opened
Login
page Ior
user
opened
pass
. 1.1 Are USER ID textIield
&PASWORD textIield
available?
Open browser &
go to login page
Text Iields
should be
available
Text Iields
are
available
Pass
. 1. Is user denied access iI
user enters wrong id or
wrong pswd?
Type wrong user
id or wrong
password in given
text Iields
Error stating
'not a
member oI
this site
Error
stating
'not a
member
pass
41

page should
be displayed
& user
should be
asked iI he
wants to get
registered
oI this
site page
is
displayed
& user is
asked iI he
wants to
get
registered
4. 1. Is user provided access
iI user enters correct id
& correct pswd?
Type correct &ser
ID & password in
text Iields
Home page
should be
displayed
Home
page is
displayed
Pass
5. Are all the buttons on
the home page
validated?
Click on the each
button available
on home page oI
user
Each button
should take
to their
respective
pages
Each
button
takes to
the
respective
pages
pass
6. .1 Is Iile saved on clicking
the save Iile button?
Enter Iile name &
click on save Iile
in create java Iile
section
File action
report page
should be
displayed
File action
report
page is
displayed
pass
7. . Is error report displayed
aIter compiling java
Iile?
Enter Iile name to
be compiled and
click on compile
under compile
java Iile section
Error report
oI
appropriate
Iile should
be displayed
Error
report oI
appropriat
e Iile is
displayed
pass
. . Does correct inIo about
java class or interIace is
displayed?
Enter any java api
class or interIace
under view api
class inIormation
Description
& Methods
oI that API
class or
interIace
should be
displayed
Descriptio
n &
Methods
oI that
API class
or
interIace
is
displayed
Pass
. .4 II user enters numbers
which are not prime,is
that denied?
Enter two primes
in textIields
provided under
encryption section
&ser should
be asked to
enter prime
no.`s Ior key
generation
&ser is
asked to
enter
prime
no.`s
pass


Test Results: All the test cases mentioned above passed successIully. No deIects
encountered.


4

SNAPSHOTS OF OUTPUT SCREENS

USER LOGIN PAGE


4




USER LOGIN ERROR REPORT


















44






NEW USER INFORMATION PAGE



45




USER HOME PAGE




46





CREATE 1AVA FILE PAGE




47



SAVEFILE REPORT




4




COMPILE 1AVA FILE PAGE




4





COMPILATION ERROR REPORT



50




1AVA API INFORMATION PAGE




51




1AVA API CLASS PAGE



5




GENERATION OF KEYS




5



ENCRYTION OF TEXT




54




ENCRYPTED TEXT





55




DECRYPTION PROCESS





56





DECRYPTED TEXT













57

CONCLUSION
It has been a great pleasure Ior me to work on this exciting and challenging project.
This project proved good Ior me as it provided practical knowledge oI not only in
programming web based application and to some extent Windows Application and SQL
Server, but also about handling procedure related with ~ONLINE 1AVA COMPILER It
also provides knowledge about the latest technology used in developing web enabled
application and client server technology that will be great demand in Iuture. This will provide
better opportunities and guidance in Iuture Ior developing projects independently.
BENEFITS
The project is identiIied by the merits oI the system oIIered to the user. The merits oI this
project are as Iollows :-
O It`s a web-enabled project.
O It's useIul when you want to try code Iast and easily without having a JDK installed on
your system.
O This project oIIers user to enter the data through simple and interactive Iorms. This is
very helpIul Ior the client to enter the desired inIormation through so much simplicity.
O From every part oI the project the user is provided with the links through Iraming so that
he can go Irom one option oI the project to other as per the requirement. This is bound to
be simple and very Iriendly as per the user is concerned. That is, we can sat that the
project is user Iriendly which is one oI the primary concerns oI any good project.
O Data storage and retrieval will become Iaster and easier to maintain because data is stored
in a systematic manner and in a single database.
O All the inIormation about the API classes and interIaces can be easily viewed with the
help oI this project.

LIMITATIONS:
O The size oI the database increases day-by-day, increasing the load on the database back
up and data maintenance activity.



5

SCOPE OF EXPANSION
O This project can be Iurther enhanced in such a way that it not only compiles java code but
other language codes also in java.
O This project can be Iurther enhanced to provide a runner also.
O This System being web-based need`s to be thoroughly tested to Iind out any security
gaps.
O Moreover, it is just a beginning; Iurther the system may be utilized in various similar
process/workIlow based applications...


5

BIBLIOGRAPHY

O Herbert Schildt, The Complete ReIerence Java 5
th
edition,
Tata Mc Graw-Hill.
O Chris Bates, Web Programming ( Building Internet Applications)
nd
edition,
WILEY dreamtech.
O For Oracle installation
http://www.oracle.com
O For deployment and packing on server
www.developer.com
www.15seconds.com
O For Java installation
http://java.sun.com
O For Apache Tomcat installation
http://tomcat.apache.org

Das könnte Ihnen auch gefallen