Você está na página 1de 96

INTRODUCTION

1.1 PROBLEM DEFINITION

The project aims at developing a blog application for Virtusa. Users are allowed to create their own blogs. Each blog is allowed to receive comments from other users. Each blog is valued based on ratings provided. The blog application allows users to express their own ideas. Users are free to enter their thoughts. This is initially developed as an intranet application and the scope can be extended to an internet application with some additional features in the hosting. To develop a system for Blog Application named VirBlog ! to enable posts such as personal journals! interest on particular topic. A typical blog combines text! images! and lin"s to other blogs! web pages! and other media related to its topic. The ability for readers to leave comments in an interactive format is an important part of many blogs. The project deals with designing a blog application for the company intranet portal. This system application includes displaying the recent blogs! data archives! tags for the posted blogs. The system includes search area to search the posts by its category. The user can create! edit! view their blogs in his#her home page.

ORGANIZATION PROFILE
Virtusa %orporation is a leading provider of enterprise class &roducts and 'olutions for (lobal $))) companies and leading *ndependent 'oftware Vendors +*'Vs,. Based in -estborough! .A! Virtusa employs the finest technology talent in the U'! U/! *ndia! and 'ri 0an"a. Virtusa1s client list includes industry leaders across several domains! such as 2& .organ %hase! Vignette! &ega'ystems! e3ocs ! %ircuit %ity! .c3onald1s! %onvergys! 4west! 0ightbridge! 5erox! 'iemens and (E. &roduct development imperatives are deeply embedded in Virtusa1s process framewor" and institutionali ed as best practices. *t6s process includes a focus on modularity of design! component technology! re7usability! scalability! portability! extensibility! maintainability! and supportability. Virtusa1s ongoing success with leading *'Vs and enterprise clients has resulted in six years of se8uential double digit growth! a roster of impressive client relationships! and a cadre of high caliber employees. Virtusa %orporation +9A'3A4: V;TU, is a global information technology +*T, services company providing *T consulting! technology and outsourcing services. Using our enhanced global delivery model! innovative platforming approach and industry expertise! it provide cost7effective services that enable our clients to use *T to enhance business performance! accelerate time7to7mar"et! increase productivity and improve customer service. *t serves (lobal <))) enterprises and the leading software vendors in communications = technology> ban"ing! financial services = insurance> and media = information industries. *t builds and sustains application platforms for it6s clients that create competitive advantage. ?ounded in $@@A and head8uartered in .assachusetts! it has offices and technology centers throughout the U.'.! U./. and Asia.

Services
Conceive *t applies platforming principles to help clients visuali e their future state through <

roadmaps! business process visuali ation! business and technical architecture and operational assessments. Transfor *t applies platforming principles to accelerate the actuali ation of future state! through software development and integration! consolidation and rationali ation! 4A and legacy transformation. O!"i i#e Unli"e traditional outsourcing! it applies platforming principles to provide outsourcing services to continuously improve applications and software products7it ma"e these systems into appreciating assets for our clients. In$%s"ries Every business is uni8ue. At the same time! businesses within a given industry tend to share similar challenges. Virtusa partners with leading organi ations in various industries to deliver Bbuild7to7orderC solutions that address our clients1 most difficult business challenges. Ban&in' ( Financia) Services Virtusa helps ban"s and financial services firms enhance innovation! manage transformation and comply with regulations while driving efficiency and managing ris"s. Co %nica"ions ( Tec*no)o'+

0eading telecom services providers have increased customer loyalty and reduced operational cost by delivering self7service! D''! e7billing solutions and more.

S,STEM ANAL,SIS
-.1 INTRODUCTION
'ystems are created to solve problems. Dne can thin" of the systems approach as an organi ed way of dealing with a problem. *n this dynamic world! the subject B'ystem Analysis and 3esignC mainly deals with the software development activities.

-.. DEFINITION
'ystem analysis is an important phase in project development life cycle where the re8uirements of the new system are identified by thoroughly investigating the existing system. Analysis is used to gain an understanding of the existing system and what is re8uired of it. At the conclusion of analysis there is a system description and set of re8uirements for new system. *f there is no existing system analysis defines only the re8uirements.

-.- PROPOSED S,STEM


The proposed system is mainly developed in such a way that! it uses the latest technology and hence ensures faster! reliable and consistent transaction. *n this application Tags! 3ataArchive! Tiles concepts are used and embedded with the technology 2ava 'truts. The proposed system is designed in such a way that! it has all the advanced features of web applications. MERITS The user creates a blog if he#she is an employee of an organi ation. *f the user is registered user then only user can create his blog and the login page is redirected to user6s home page. *n the user6s home page all the posts that are created by the user are displayed. The user can view his all posts by monthwise. -hen the user clic"ed on the month then only the posts are displayed that were created on that month.

RE/UIREMENT ANAL,SIS
0.1 SOFT1ARE RE/UIREMENT SPECIFICATION
Any computer based system development phase will begin with preliminary analysis of the project scope and feasibility. This phase is also "nown as survey phase. This phase determines whether or not significant resource to be committed to other phases of the life cycle. 3uring the survey phase we will define the feasibility study! operational feasibility! business and technical constraints and possible solutions. 3uring the space we will define scope of this system! including all end users perceived problem and opportunities! project goals and possible solutions.

0.. FEASIBILIT, STUD,


Basically feasibility study is a high level theory of the entire process intended to answer the 8uestions such as -hat is the problemG Are there any feasible solutions to the given problemsG *s the problem even worth for solvingG Dnce an acceptable problem definition has been generated! the analyst develops a logical model of a system. A search for the alternative solutions then begins! using the model as a basis. The system is treated the types of feasibility in the following aspects Dperational feasibility Technical feasibility Economical feasibility

0...1 OPERATIONAL FEASIBILIT, The users re8uire the basis functions of using a computer and the "nowledge about browsing a web page. The system consists good user interface design which is user friendly and easy to use. The proposed system is operationally feasible. &roposed system gives no harm and it will not produce poor results and there will be almost no problem occurring after implementing the system. 0.... TEC2NICAL FEASIBILIT, Technical feasibility is a study of function performance and constraints that may affect the ability to achieve the acceptable system. This feasibility analysis begins with an assessment of technical viability of the proposed system. The proposed system needs the following technical re8uirements &ersonal computers with printers. .icrosoft -indows 5& Dperating system 2ava'cript! 2ava 'ervlets! 2ava 'erver &ages! 'truts $ Dracle @i+3atabase pac"age, The organi ation is ready to provide the re8uirements for the proposed system. 'o! the proposed system is technically feasible. 0...- ECONOMICAL FEASIBILIT, 9o need expensive or complicated web editors or web design software to create a blog. Blog vendors offer you a variety of templates you can choose from. .ost li"ely you will find among them one that offers the loo" and feel you1re loo"ing for. Iour only web design expense may very well be to pay a graphics artist to design an attractive logo that ma"es your site uni8ue. The economical feasibility focuses on the cost analysis of the proposed system.

0.- USE CASE DIAGRAM AND ITS DESCRIPTION TABLE

Use Case Dia'ra

DESCRIPTION TABLE USE CASE View Blog ;egister 'earch Blog DESCRIPTION View all the posts created by the different users can be viewed by visitor. Visitor can ;egister to create his#her blog. Visitor can search the blog based on the category name. ;egistered user can login into his#her home page to view his#her all post! manage all posts! edit all posts. ;egistered user only can create post. %ustomi e the pages i.e.! edit! update the post can be done from registered user6s home page. &ublish the post to view all users from a registered user6s home page. ;egistered user can see all his#her own posts. ;egistered user can only edit! publish his#her posts. ;egistered user can delete his#her posts. ;egistered user can edit his#her own posts. ;egistered user can comments and rating the blogs. 0ogout from the ;egistered user login page. The rating for a blog exceeds H! it is noticed to the admin to delete the blog.

0ogin %reate &ost %ustomi e &ages &ublish View .yBlog .anage &ost 3elete &ost Edit &ost %omments = ;ating 0ogout .anage Blogs

.anage Users ;eports

The admin can bloc" the user if the abused rating count is greater than E for a blog. The admin can view registered users! deleted posts! deleted users.

0.0 ACTI3IT, DIAGRAM

0.4 DATA DICTIONAR,

$)

A DATA DICTIONAR, as the name implies! is a repository of information about data. *n some database systems! the stored definitions of data +schemas, provide all the necessity data dictionary information. *n others! the DATADICTIONAR, is supplementary. The information in the DATA DICTIONAR, is about types of data and uses of data. The DATA DICTIONAR, provides list of data items se8uenced alphabetically classification! "eyword etc.! the DATA DICTIONAR, provides a consistent description of data as well as consistent data names for programming and retrieval. The advantages of a DATA DICTIONAR, are not only consistent of data description and naming! but also ease of updating where one data description serves many purposes. DATA DICTIONAR, may be used by the database administrator to enforce standards for names and descriptions those who create data must follow these standards. %reating and DATA DICTIONAR, re8uires significant effort to remove past inconsistencies and ambiguities. Da"a Dic"ionar+ of B)o' A!!)ica"ion S.No. $. <. E. F. H. A. J. K. @. $). FIELD UserLid Username &assword 3isplayname ;ole UserLstatus Abusecount BlogLid &ostLid &ostLtitle T,PE 9umber Varchar< Varchar< Varchar< 9umber 9umber 9umber Varchar< Varchar< Varchar< SIZE $) <H <) <H < < < $) $) H) LOCATION userLinfo userLinfo userLinfo userLinfo userLinfo userLinfo userLinfo postdet postdet postdet DESCRIPTION Uni8ue userid for each user Uni8ue username for each user &assword 3isplay name of each user $7Admin! <7User $70ogged in! <70ogged out 9o of abuse posts created Blogid for each user Uni8ue postLid Title of each post $$

$$. $<. $E. $F. $H. $A. $J.

&ostLcontent *mageLurl TagLid %reationLtime AbuseLrating Lcount AverageLratin g %ommentsLid

%lob Varchar< 9umber Timestamp 9umber 9umber Varchar<

.ax. F(B $H) < A < < $)

postdet postdet postdet postdet postdet postdet

%ontent created by the user U;0 where image is stored. $7Admin <7User Time of creation of the blog Abuse ratings on the blog The average

rating of the blog commentsLhis Uni8ue tory %ommentid for each %omment commentsLhis 9ame of the user tory who has commented commentsLhis ;ating given by tory others commentsLhis %omments given tory emp by others Uni8ue Employee id for each Employee Employee name &assword of the employee 3eleted by user or admin 3ate on which post is deleted ;eason for deletion Uni8ue id of the administrator ;eason for deletion Time at which the user is bloc"ed

$K.

&ostLby

Varchar<

<H

$@. <). <$.

;ating %ontent empLno

9umber Varchar< 9umber

< H)) $)

<<. <E. <F. <H. <A. <J. <K. <@.

empLname empLpasswd 3eletedLby 3eletedLdate ;eason adminLid ;eason 3eletedLtime

Varchar< Varchar< Varchar< Timestamp Varchar< 9umber Varchar< Timestamp

E) <) <H A E) $) <)) A

emp emp deleteLpost deleteLpost deleteLpost abuseLbloc"L admin abuseLbloc"L admin abuseLbloc"L admin

$<

S,STEM DESIGN
4.1 CLASS DIAGRAM

$E

4.. INTERACTION DIAGRAM

$F

Se5. 61

Fi'%re 1. Se5%ence Dia'ra

for Lo'in

$H

Se5. 6.

Fi'%re .. Se5%ence Dia'ra

for Crea"e Pos"

$A

Se5. 6-

Fi'%re -. Se5%ence Dia'ra Se5. 60

for E$i" Pos"

$J

Fi'%re 0. Se5%ence Dia'ra Se5. 64

for Searc* B)o'

Fi'%re 4. Se5%ence Dia'ra Se5. 67

for Co

en"s an$ Ra"in'

$K

Fi'%re 7. Se5%ence Dia'ra Se5. 69

for 3ie8 Pos"

Fi'%re 9. Se5%ence Dia'ra

for De)e"e Pos"

$@

Se5. 6:

Fi'%re :. Se5%ence Dia'ra Se5. 6<

for De)e"e A;%se

<)

Fi'%re <. Se5%ence Dia'ra

for Lo'o%"

4.- DATABASE DESIGN


The database design transforms the information domain model created during analysis into the data structure that will be re8uired into the implement software. The assumption on which M*&D+Mierarchy plus *nput7&rocess7Dutput, is based i.e.! it is easy to loss trac" of the intended function of a system or component in a large system. This is one reason why it is difficult to compare existing systems against their original specification. ?rom the users view! single functions can be often extending across several modules. The concern of the analyst then it is understanding! describing and documenting the modules and their interaction in a way that provides sufficient details but that does not lose sight of the large picture 4.-.1 TABLE NORMALIZATION PROCEDURE 9ormali ation is the process of simplifying the relationship between data elements in a record. Though this techni8ue is the collection of data in a record structure is replaced by successive record structures that are simpler and more predictable and therefore more manageable. =or> 9ormali ation is the formal <$

approach which examines data and group data item together in a form i.e.! better able to accommodate feature change and to minimi e the impact of that change on that application. *t is mainly caused to reduce the redundancy of data items and also for increasing the speed of database manipulation. ?E,S PRIMAR, ?E, A primary "ey is some or more column+s, in a table used to uni8uely identify each row in the table. A primary "ey column in a table has special attributes.

*t defines the column! as a mandatory column i.e.! the column cannot be left blan". The no" n%)) attribute is active. The data held across the column must be %ni5%e.

S+n"a@A %olumn name data type +si e, !ri ar+ &e+. FOREIGN ?E, ?oreign "ey represents relationship between tables. A foreign "ey is a column +or a group of columns, whose values are derived from the primary "ey or uni8ue "ey of some other table. The table in which the foreign "ey is defined is called a forei'n "a;)e or $e"ai) "a;)e. The table that defines the primary "ey in the S+n"a@A %olumn name datatype +si e, references table name N+column name,O NORMALIZATION IS CARRIED FOR FOLLO1ING REASONSA

as"er "a;)e.

To the structure the data so that any pertinent relationship between entities can be represented. To permit simple retrieval of data in response to 8uery and report re8uest. To simplify the maintenance of the data through updates! insertion and deletions. To reduce the need to the restructure or reorgani e data when new application re8uirements arise.

<<

This attempt to remove redundant data! avoid data inconsistencies and prevent up data anomalies. This results in a simpler or more natural data model. A normali ed database more clearly reflects the natural entities and relationships in the real world. ;elational database theory outline five normal forms! of which there normal

forms are used popularly for designing relational tables. The rules and methods of first three normal forms are given below. FIRST NORMAL FORM A relation is a first normal form if the intersection of any column and row contain only one value +no repeating groups,. MET2ODS *dentify suitable primary "ey from a pool of un7normali ed data. ;emove any that repeats with in a single value of this "ey to another relation bringing within the primary "ey to form part of a new composite "ey in the new relation. *n this application many tables are in the ?irst 9ormal ?orm. ?or Example! the column blogLid in the table abuseLdeleteLadmin! username in the table userLinfo is normali ed through the primary "ey userLid of both the tables abuseLdeleteLadmin = userLinfo. SECOND NORMAL FORM A table in first normal form is also in second normal form. *f the values in every columns are functionally dependent on the complete primary "ey. *n this application all the tables are in the second normal form. MET2ODS ?or every relation within a single data item ma"ing up the primary "ey! this rule should always be true. ?or those with compound "ey examine every column and determines whether its value depends on the whole of the compound "ey or just some of the part of it. ;emove those that depend only on part of the "ey to a new relation with that part as the primary "ey.

<E

T2IRD NORMAL FORM %olumns are not transitively dependent on the primary relation in second normal form is also in third normal form with the values in every non7"ey. *n this application those columns are not transitively dependent on the primary relation also in third normal form. MET2ODS Examine every non7"ey column and 8uestion its relationship with every other non7"ey column. *f for a value for column A there is only one value for column B! remove both columns to a separate relation and mar" the 8uestion uni8ue as a primary "ey. As database tables involved here needs normali ation techni8ues so that it should be flexible to access and store the values in it. 'o that third normal form is applied and all the tables are normali ed according to that.

4.-.. TABLE STRUCTURE Table 9umber: $ Table 9ame: userLinfo Table 3escription: This table stores the details of the user. Na e UserLid Username &assword 3isplayname ;ole UserLstatus Abusecount Da"a T+!e 9umber+$), Varchar<+<H, Varchar<+<), Varchar<+<H, 9umber+<, 9umber+<, 9umber+<, Descri!"ion 3istinct userid for each user 3istinct username for each user &assword 3isplay name of each user $7Admin! <7User $70ogged in! <70ogged out 9o. of abuse posts created

Table 9umber: < Table 9ame: postdet Table 3escription: This table stores the details of the posts created by the user.

<F

Na e BlogLid &ostLid &ostLtitle &ostLcontent *mageLurl TagLid %reationLtime AbuseLratingLcount AverageLrating

Da"a T+!e Varchar<+$), Varchar<+$), Varchar<+H), %lob Varchar<+$H), 9umber+<, Timestamp+A, 9umber+<, 9umber+<,

Descri!"ion Blogid for each user 3istinct postLid Title of each post %ontent created by the user U;0 where image is stored. $7Admin <7User Time of creation of the blog Abuse ratings on the blog The average rating of the blog

Table 9umber: E Table 9ame: BlogLmaster Table 3escription: The appropriate blogLid for the particular userLid Na e BlogLid Da"a T+!e Varchar<+$), Descri!"ion 3istinct BlogLid for each user

UserLid 9umber+$), 3istinct id for the user Table 9umber: F Table 9ame: commentsLhistory Table 3escription: This table stores the details regarding the comments. Na e %ommentsLid &ostLid &ostLby ;ating %ontent userLid Da"a T+!e Varchar<+$), Varchar<+$), Varchar<+<H, 9umber+<, Varchar<+H)), 9umber+$), Descri!"ion 3istinct %ommentid for each %omment 3istinct postLid 9ame of the user who has commented ;ating given by others %omments given by others Uni8ue id of the user

Table 9umber: H Table 9ame: emp Table 3escription: This table stores the details of the employee. Na e empLno Da"a T+!e 9umber+$), Descri!"ion Uni8ue Emloyee id for each Employee <H

empLname empLpasswd

Varchar<+E), Varchar<+<),

Employee name &assword of the employee

Table 9umber: A Table 9ame: deleteLpost Table 3escription: This table stores the details of posts which have been deleted by admin or user. Na e &ostLid 3eletedLby 3eletedLdate ;eason Da"a T+!e Varchar<+$), Varchar<+<H, Timestamp+A, Varchar<+E), Descri!"ion 3istinct post id for each post 3eleted by user or admin 3ate on which post is deleted ;eason for deletion

Table 9umber: J Table 9ame: abuseLbloc"Ladmin Table 3escription: This table stores the details of those users who have been bloc"ed by admin. Na e UserLid adminLid ;eason 3eletedLtime BlogLid Da"a T+!e 9umber+$), 9umber+$), Varchar<+<)), Timestamp+A, Varchar<+$), Descri!"ion Uni8ue id for users Uni8ue id of the administrator ;eason for deletion Time at which the user is bloc"ed Uni8ue id generated for each blog

<A

4.0 ARC2ITECTURAL DESIGN


4.0.1 4.0.1.1 NET1OR? ARC2ITECTURE TEC2NOLOG, ARC2ITECTURE

S"r%"s Fra e8or& AB 'truts ?rame wor" is the implementation of .odel7View7 %ontroller +.V%, design pattern for the 2'&. 'truts is maintained as a part of Apache 2a"arta project and is open source. 'truts ?ramewor" is suited for the application of any si e. Mo$e)B3ie8BCon"ro))er =M3C> Arc*i"ec"%re AB .odel7View7%ontroller

architecture is all about dividing application components into three different categories .odel! View and the %ontroller. %omponents of the .V% architecture has uni8ue responsibility and each component is independent of the other component. %hanges in one component will have no or less impact on other component. ;esponsibilities of the components are Mo$e) AB .odel is responsible for providing the data from the database and saving the data into the data store. All the business logic is implemented in the .odel. 3ata entered by the user through View are chec" in the model before saving into the database. 3ata access! 3ata validation and the data saving logic are part of .odel.

<J

3ie8 AB View represents the user view of the application and is responsible for ta"ing the input from the user! dispatching the re8uest to the controller and then receiving response from the controller and displaying the result to the user. MT.0! 2'&s! %ustom Tag 0ibraries and ;esources files are the part of view component. Con"ro))er AB %ontroller is intermediary between .odel and View. %ontroller is responsible for receiving the re8uest from client. Dnce re8uest is received from client it executes the appropriate business logic from the .odel and then produce the output to the user using the View component. Action'ervlet! Action! Action?orm and struts7config.xml are the part of %ontroller. The S"r%"s 3ie8 Co !onen"s are responsible for presenting information to the users and accepting the input from them. They are responsible for displaying the information provided by the model components. .ostly we use the 2ava 'erver &ages +2'&, for the view presentation. To extend the capability of the view we can use the %ustom tags! java script etc.

S"r%c"%re of S"r%"s A!!)ica"ion

T*e S"r%"s Con"ro))er Co !onen"s


-henever a user re8uest for something! then the re8uest is handled by the 'truts Action 'ervlet. -hen the Action'ervlet receives the re8uest! it intercepts the U;0 and based on the 'truts %onfiguration files! it gives the handling of the re8uest to the Action class. Action class is a part of the controller and is responsible for communicating with the model layer. Ac"ion C)ass <K

An

Action

class

in

the

struts

application

extends

'truts

Borg.apache.struts.action.ActionC %lass. Action class acts as wrapper around the business logic and provides an interface to the application1s .odel layer. *t acts as glue between the View and .odel layer. *t also transfers the data from the view layer to the specific business process layer and finally returns the processed data from business layer to the view layer. An Action wor"s as an adapter between the contents of an incoming MTT& re8uest and the business logic that corresponds to it. Then the struts controller +Action'ervlet, selects an appropriate Action and creates an instance if necessary! and finally calls execute method. Cava Server Pa'es =CSP> 2ava 'erver &ages +2'&, is a 2ava technology that allows software developers to a -eb client re8uest. The technology allows 2ava code and certain pre7defined actions to be embedded into static content. S"r%"s CSP Ta' Li;raries MT.0 Bean 0ogic Tiles 2TML Ta' Li;rar+ Tags used to create 'truts input form Examples include +chec"box! lin"! submit! text! textarea, Bean Ta' Li;rar+ Tags used for accessing 2avaBeans and their properties Examples include +define! message! write, Lo'ic Ta' Li;rar+ .anaging conditional generation of output text. 0ooping over object collections for repetitive generation of output text. Application flow management. <@

Examples include +empty! less Than! greater Than! redirect! iterate, Ti)es Ta' Tiles is an open source framewor" *t6s used for ma"ing the presentation layer wor" much easier by elimination of lot of are needed. Tiles ma"es the code maintenance very easy! tiles ma"es a separation of layout from content. Dis!)a+ Ta' The display tag library is an open source suite of custom tags that provide high level web presentation patterns. 3isplay tag which will wor" in a .V% model! and provide a significant amount of functionality while still being simple and straight7forward to use. rewor" and repeated codes. Tiles are very useful where a common loo" and feel among all pages

T*e S"r%"s

o$e) co !onen"

The model components provide a model of the business logic behind a 'truts program. *t provides interfaces to databases or bac"7ends systems. .odel components are generally a java class. There is not any such defined format for a .odel component! so it is possible for us to reuse 2ava code which is written for other projects. -e should choose the model according to our client re8uirement. Serv)e"s A servlet is a 2ava programming language class that is used to extend the capabilities of servers that host applications access via a re8uest7response programming model. Although 'ervlets can respond to any type of re8uest! they are commonly used to extend the applications hosted by web servers. ?or such applications! 2ava 'ervlet technology defines MTT&7specific servlet classes. The Mttp'ervlet class provides methods! such as do(et+, and do&ost+,! for handling MTT&7specific services. E@ce!"ion 2an$)in' E)

'truts $.E provides a small! but effective exception7handling framewor" for the applications. There are two approaches available for the exception handling in struts. $. Declarative: 7 *n this approach the exceptions are defined in the struts7 config.xml file and in case of the exception occurs the control is automatically passed to the appropriate error page. The PexceptionQ tag is used to define the exception in the struts7config.xml file. The following are the attributes of the PexceptionQ tag. $. Key : 7 The "ey defines the "ey present in .essage;esources.properties file to describe the exception occurred. <. Type: 7 The class of the exception occurred. E. Path: 7 The page where the control is to be followed in case exception occurred. F. Handler:7 The exception handler which will be called before passing the control to the file specified in path attribute. There are following two sections in struts-config.xml where you can define the exceptions. o With Any Action mapping:7 *n this approach the action class is identified which may throw the exception li"e password failure! resource access etc. ?or example! Paction pathRS#exceptionS typeRScom.visualbuilder.ExampleActionS parameterRSmethodS inputRS#index.jspS Q Pexception keyRSerror.systemS typeRSjava.lang.;untimeExceptionS pathRS#index.jspS #Q P#actionQ o Defining the Exceptions Globally for the struts config!xml :7 *f the application control is to pass on a single page for all similar type of exception then the exception can be defined globally. 'o if in any circumstance the exception occurs the control is passed globally to the exception and control is passed to the error page. ?or Example:7 Pglobal7exceptionsQ Pexception keyRSerror.systemS typeRSjava.lang.;untimeExceptionS

E$

pathRS#index.jspS #Q P#global7exceptionsQ
2.

Programmatic: 7 *n this approach the exceptions are caught using normal java language try#catch bloc" and instead of showing the exception some meaningful messages are displayed. *n this approach the flow of control is also maintained by the programs. The main drawbac" of the approach is the developer has to write the code for the flow of the application.

S"r%"s 1 Arc*i"ec"%re The following diagram depicts the architecture of 'truts $ ?ramewor" and also shows the initial re8uest goes to the servlet container such as tomcat! which is then passed through standard filer chain. The filter chain includes

Ac"ionCon"e@"C)eanU!fi)"er : The Action%ontext%leanUp filter is optional and it is useful when integration has to be done with other technologies li"e 'ite.ash &lugin.

Fi)"erDis!a"c*erA 9ext the ?ilter3ispatch is called! which in turn uses the Action.apper to determine whether to invo"e an Action or not. *f the action is re8uired to be invo"ed! the ?ilter3ispatcher delegates the control to the Action&roxy.

Ac"ionPro@+A The Action&roxy ta"es help from %onfiguration ?iles manager! which is initiali ed from the struts.xml. Then the Action&roxy creates an ac"ionInvoca"ionD which implements the command pattern. The Action*nvocation process invo"es the *nterceptors +if configured, and then invo"es the action. The Action*nvocation loo"s for proper result. Then the result is executed! which involves the rendering of 2'& or templates.

Then the *nterceptors are executed again in reverse order. ?inally the response returns through the filters configured in web.xml file. *f the Action%ontext%leanUp filter is configured! the ?ilter3ispatcher does not clean the Thread0ocal Action%ontext. *f the Action%ontext%leanUp filter is not present then the ?ilter3ispatcher will cleanup all the Thread0ocals present.

E<

Fi'. A S"r%"s 1 Arc*i"ec"%re

4.0.1..

APPLICATION ARC2ITECTURE

EE

4.0.. 4.0...1

INTERFACE DESIGN NA3IGATION FLO1 DIAGRAM

EF

PROCESS FLO1 DIAGRAM

EH

4.0....

FORM PROTOT,PE

EA

REPORT PROTOT,PE

EJ

EK

E@

PSEUDO CODE
A$$Co en"sAc"ion.Eava

pac"age com.vign.virblog .actionclasses> import java.io.&rint-riter> import java.s8l.%onnection> import javax.servlet.http.Mttp'ervlet;e8uest> import javax.servlet.http.Mttp'ervlet;esponse> import javax.servlet.http.Mttp'ession> import javax.s8l.3ata'ource> import org.apache.struts.action.Action> import org.apache.struts.action.Action?orm> import org.apache.struts.action.Action?orward> import org.apache.struts.action.Action.apping> import com.vign.virblog .actionform.Add%omments?orm> import com.vign.virblog .dao.Add%omments3ao> public class Add%ommentsAction extends Action T %onnection connection'tring> ## .ethod to store the user comments and rating for the user post. boolean is*nserted> ## To chec" the condition public Action?orward execute +Action.apping mapping! Action?orm form! Mttp'ervlet;e8uest re8uest! Mttp'ervlet;esponse response , throws Exception T Action?orward nextpage R null> ## Variable to store nextpage mapping 3ata'ource data'ource> ## Variable to store the datasource &rint-riter pw> try T Mttp'ession sessionRre8uest.get'ession+,> pwRresponse.get-riter+,> data'ource R get3ata'ource+re8uest,> connection'tring R data'ource.get%onnection+,> Add%omments?orm cobjR+Add%omments?orm,form> ## Dbject to access the bean Add%omments3ao daoDbjRnew Add%omments3ao+,> ## Dbject to access the Add%omments3ao class is*nsertedRdaoDbj.Add%omments + cobj!session!data'ource!pw! connection'tring ,> ## calling the add%omments method nextpageRmapping.find?orward+SS,> Ucatch+Exception e,T U finally T connection'tring.close+,> U return mapping.find?orward+ScommentupdateS,> U U F)

A$$Co

en"sFor .Eava

pac"age com.vign.virblog .actionform> import org.apache.struts.action.Action?orm> public class Add%omments?orm extends Action?ormT private static final long serialVersionU*3 R $0> private 'tring commentL%ontent> private 'tring UserL;ating> private 'tring %ommentsLby> public 'tring get%ommentL%ontent+, T return commentL%ontent> U public void set%ommentL%ontent+'tring commentL%ontent, T this.commentL%ontent R commentL%ontent> U public 'tring getUserL;ating+, T return UserL;ating> U public void setUserL;ating+'tring userL;ating, T this.UserL;ating R userL;ating> U public 'tring get%ommentsLby+, T return %ommentsLby> U public void set%ommentsLby+'tring commentsLby, T %ommentsLby R commentsLby> U U A$$Co en"sDao.Eava

pac"age com.vign.virblog .dao> import java.io.&rint-riter> import java.s8l.%onnection> import java.s8l.&repared'tatement> import java.s8l.;esult'et> import javax.servlet.http.Mttp'ession> import javax.s8l.3ata'ource> import com.vign.virblog .actionform.Add%omments?orm> import com.vign.virblog .constants.%onstants> public class Add%omments3ao T ;esult'et rs> &repared'tatement ps> &repared'tatement psLauthor> 'tring 8ueryR%onstants.A33L%D..E9T'> boolean is*nsertedRtrue> public boolean Add%omments+Add%omments?orm cobj!Mttp'ession session!3ata'ource ds!&rint-riter pw!%onnection con,T int userid> 'tring uidRS)S> tryT F$

'tring commentsRcobj.getUserL;ating+,> int comR)> comR*nteger.parse*nt+comments,> 'tring commenttextRcobj.get%ommentL%ontent+,> 'tring postedbyRSS> if+session.getAttribute+SuseridS,RRnull,T useridR)> postedbyRSvisitorS> U elseT uidRsession.getAttribute+SuseridS,.to'tring+,> psLauthorRcon.prepare'tatement+%onstants.'E0E%TLAUTMD;,> psLauthor.set*nt+$!*nteger.parse*nt+uid,,> ;esult'et rsRpsLauthor.execute4uery+,> if+rs.next+,, T postedbyRrs.get'tring+$,> U U 'tring postidRsession.getAttribute+SpostLiidS,.to'tring+,> useridR*nteger.parse*nt+uid,> ps R con.prepare'tatement+8uery,> ps.set'tring+$!postid,> ps.set'tring+<!postedby,> ps.set*nt+E!com ,> ps.set'tring+F!commenttext,> ps.set*nt+H!userid,> int i R ps.executeUpdate+,> if+iP), T is*nsertedRtrue> UelseT is*nsertedRfalse> U Ucatch+Exception e,T pw.print+e,> U return is*nserted> U U Crea"ePos"Ac"ion.Eava pac"age com.vign.virblog .actionclasses> import java.io.?ileDutput'tream> import java.io.*nput'tream> import java.io.&rint-riter> import java.s8l.%onnection> import java.util.&roperties> import javax.servlet.http.Mttp'ervlet;e8uest> import javax.servlet.http.Mttp'ervlet;esponse> import javax.servlet.http.Mttp'ession> import javax.s8l.3ata'ource> F<

import org.apache.struts.action.Action?orm> import org.apache.struts.action.Action?orward> import org.apache.struts.action.Action.apping> import org.apache.struts.actions.3ispatchAction> import org.apache.struts.upload.?orm?ile> import com.vign.virblog .actionform.%reate&ost?orm> import com.vign.virblog .dao.%reate&ost3ao> public class %reate&ostAction extends 3ispatchAction T %onnection connection'tring> public Action?orward execute +Action.apping mapping! Action?orm form! Mttp'ervlet;e8uest re8uest! Mttp'ervlet;esponse response , throws Exception T 3ata'ource ds> ## To get the datasource. Action?orward nextpage R null> ## To store the .apping &rint-riter pw R null> int 3or'bitR$> ## To 'tore the bit whether the post is to publish or to draft. try T Mttp'ession sessionRre8uest.get'ession+true,> ## 'ession attribute. 'tring usertypeRsession.getAttribute+SusertypeS,.to'tring+,> if+ usertype.e8uals+SnullS, , T return mapping.find?orward+SmainpageS,> U %reate&ost?orm %reate?ormDbj R +%reate&ost?orm, form> ## Dbject for bean %reate&ost3ao %reate&ostDbjectRnew %reate&ost3ao+,>## Dbject for %reate&ost3ao pw R response.get-riter+,> ds R get3ata'ource+re8uest,> ## (etting datasource connection'tringRds.get%onnection+,> ##(etting %onnection 'tring tempR%reate?ormDbj.get'tep+,>##(etting the user choose+to publish or to save, ## %hanging the bit if user choose was draft if+temp.e8uals+S3raftS,, T 3or'bitR<> U if+temp.e8uals+S&ublishS,VVtemp.e8uals+S3raftS,, T 'tring encoding R re8uest.get%haracterEncoding+,> if ++encoding WR null, == +encoding.e8uals*gnore%ase+Sutf7KS,,, T response.set%ontentType+Stext#html> charsetRutf7KS,> U ?orm?ile imgR%reate?ormDbj.get*mageurl+,> ##(etting the image filename 'tring filenameRimg.get?ile9ame+,> *nput'tream is R img.get*nput'tream+,> 'tring useridRsession.getAttribute+SuseridS,.to'tring+,> FE

##(etting the url from properties file &roperties propertyR&roperty0oader.get*nstance+,.get&roperties+,> 'tring urlRproperty.get&roperty+SurlS,> ## 'toring the image in the properties file path> ## &ath will be the properties file url X userid X the image name ?ileDutput'tream bos R new ?ileDutput'tream+url X userid XS#SXfilename,> ## This is to assign the relative path of the image to store in the database 'tring imageaddrR+Spostimage#SXuserid XS#SX filename,> byteNO buffer R new byteNK$@<O> int bytes;ead R )> while ++bytes;eadRis.read+buffer! )! K$@<,, WR 7$, T bos.write+buffer! )! bytes;ead,> U ## %alling the save method to store the post in database %reate&ostDbject.save+userid!%reate?ormDbj! ds!3or'bit! imageaddr! connection'tring,> bos.close+,> nextpage R mapping.find?orward+SsuccessS,> U U catch +Exception e, T pw.println+e.get.essage+,,> U finallyT connection'tring.close+,> U return nextpage> U U Crea"ePos"For .Eava pac"age com.vign.virblog .actionform> import org.apache.struts.action.Action?orm> import org.apache.struts.upload.?orm?ile> public class %reate&ost?orm extends Action?orm T private static final long serialVersionU*3 R $0> private 'tring search> private 'tring step> private 'tring title> private 'tring tag> private 'tring postcontent> private 'tring postid> protected ?orm?ile imageurl> public ?orm?ile get*mageurl+, T return imageurl> U public void set*mageurl+?orm?ile imageurl, T this.imageurl R imageurl> U FF

public 'tring get&ostcontent+, T return postcontent> U public void set&ostcontent+'tring postcontent, T this.postcontent R postcontent> U public 'tring getTag+, T return tag> U public void setTag+'tring tag, T this.tag R tag> U public 'tring getTitle+, T return title> U public void setTitle+'tring title, T this.title R title> U public 'tring get'earch+, T return search> U public void set'earch+'tring search, T this.search R search> U public 'tring get'tep+, T return step> U public void set'tep+'tring step, T this.step R step> U public 'tring get&ostid+, T return postid> U public void set&ostid+'tring postid, T this.postid R postid> U U Crea"ePos"Dao.Eava pac"age com.vign.virblog .dao> import java.io.'tring;eader> import java.s8l.%onnection> import java.s8l.&repared'tatement> import java.s8l.;esult'et> import javax.servlet.http.Mttp'ession> import javax.s8l.3ata'ource> import com.vign.virblog .actionform.%reate&ost?orm> import com.vign.virblog .constants.%onstants> public class %reate&ost3ao T int i R )> FH

Mttp'ession ses> &repared'tatement ps> ;esult'et rs> public int save+'tring User*d! %reate&ost?orm l!3ata'ource ds! *nteger 3or'bit!'tring imageurl!%onnection con, T try T java.s8l.Timestamp curdate R new java.s8l.Timestamp+new java.util.3ate+,.getTime+,,> 'tring post8uery R %onstants.*9'E;TL&D'TL%D9TE9T> 'tring re R l.get&ostcontent+,> 'tring;eader reader R new 'tring;eader+re,> ps R con.prepare'tatement+post8uery,> ps.set'tring+$! User*d,> ps.set*nt+<! 3or'bit,> ps.setTimestamp+E!curdate,> ps.set*nt+F! <,> ps.set*nt+H! ),> ps.set*nt+A! ),> ps.set%haracter'tream+J! reader! re.length+,,> ps.set'tring+K! l.getTitle+,,> ps.set'tring+@!imageurl,> ps.set'tring+$)!l.getTag+,,> i R ps.executeUpdate+,> U catch +Exception e, T U return i> U public int update+%reate&ost?orm l!3ata'ource ds!%onnection con, T try T 'tring post8uery R %onstants.U&3ATEL&D'TL%D9TE9T> 'tring content R l.get&ostcontent+,> 'tring tagRl.getTag+,> 'tring postidRl.get&ostid+,> 'tring titleRl.getTitle+,> psRcon.prepare'tatement+post8uery,> ps.set'tring+$!title,> ps.set'tring+<!content,> ps.set'tring+E!tag,> ps.set'tring+F! postid,> iRps.executeUpdate+,> U catch +Exception e, T U return i> U U Lo'inAc"ion.Eava pac"age com.vign.virblog .actionclasses> import java.io.&rint-riter> import java.s8l.%onnection> FA

import java.s8l.;esult'et> import javax.servlet.http.Mttp'ervlet;e8uest> import javax.servlet.http.Mttp'ervlet;esponse> import javax.servlet.http.Mttp'ession> import javax.s8l.3ata'ource> import org.apache.struts.action.Action> import org.apache.struts.action.Action?orm> import org.apache.struts.action.Action?orward> import org.apache.struts.action.Action.apping> import com.vign.virblog .actionform.0ogin?orm> import com.vign.virblog .dao.0ogin3ao> public class 0oginAction extends Action T %onnection connection'tring> 'tring strRSS> public Action?orward execute +Action.apping mapping! Action?orm form! Mttp'ervlet;e8uest re8uest! Mttp'ervlet;esponse response , throws ExceptionT int role> ## to store role of the user int status> ## to store status of the use int abusecount> ## to store abusecount of the user 3ata'ource ds> ## to get datasource ;esult'et rsRnull> ## to store the retrived the records from the database Action?orward nextpage Rnull> ## to store the mapping &rint-riter pw R null> 0ogin3ao l3aoRnew 0ogin3ao+,> ## object to access the 0ogin3ao nextpageRmapping.find?orward+SmainpageS,> Mttp'ession sessionRre8uest.get'ession+true,> session.setAttribute+SusertypeS!SnullS,> try T pw R response.get-riter+,> ds R get3ata'ource+re8uest,> ## getting the datasource connection'tring R ds.get%onnection+,> ##getting the connection 0ogin?orm lR+0ogin?orm,form> ##object to access the bean rsRl3ao.(etUser3etails+ds!l!pw!connection'tring,> ##calling the 0ogin3ao class method to get userdetails #Y Y To chec" whether the username and password are correct. Y# if + rs.next+, , T ## (etting the user details roleRrs.get*nt+H,> statusRrs.get*nt+A,> abusecountRrs.get*nt+J,> if + status RR $ , T session.setAttribute+SAlready 0oged *nS!SAlready 0oged *nS,> U if + abusecountQRH , T session.setAttribute+SAbuse%ountExceedsS!SAbuse%ountExceedsS,> FJ

U ## *f user is not already logged in and his abusecount satisfies the norm if + status RR < == abusecount P E , T session.setAttribute+SuseridS!'tring.valueDf+rs.get*nt+$,,,> session.setAttribute+SusernameS!rs.get'tring+<,,> session.setAttribute+SdisplaynameS!rs.get'tring+F,,> session.setAttribute+SpasswordS!rs.get'tring+E,,> session.setAttribute+SroleS!'tring.valueDf+rs.get*nt+H,,,> ## To update the user status as logged in. l3ao.Update'tatus+ds! l! rs.get*nt+$,!connection'tring,> ## %hec"ing whether the user is admin or a blogger if + role RR $ , T session.setAttribute+SusertypeS!SadminS,> nextpageRmapping.find?orward+SadmininitialpageS,> U else T nextpageRmapping.find?orward+SuserinitialpageS,> session.setAttribute+SusertypeS!SuserS,> U U Uelse T ## This is to chec" whether the user is a employee!if username and password does not match ## To chec" the in the employee table rsRl3ao.(etEmp3etails+ds! l!connection'tring,> if + rs.next+, , T nextpage R mapping.find?orward+SuserconfirmS,> session.setAttribute+SusertypeS!SvisitorS,> session.setAttribute+SuseridS!rs.get*nt+$,,> session.setAttribute+SusernameS!rs.get'tring+<,,> session.setAttribute+SpasswordS!rs.get'tring+E, ,> U else T session.setAttribute+S*nvalidUserS!S*nvalidUserS,> nextpageRmapping.find?orward+SmainpageS,> U U##end of else U catch+Exception e,TU finally T connection'tring.close+,> U return nextpage> U##end of execute function U Lo'inFor .Eava pac"age com.vign.virblog .actionform> import javax.servlet.http.Mttp'ervlet;e8uest> FK

import org.apache.struts.action.ActionError> import org.apache.struts.action.ActionErrors> import org.apache.struts.action.Action?orm> import org.apache.struts.action.Action.apping> public class 0ogin?orm extends Action?ormT private static final long serialVersionU*3 R $0> private 'tring user9ame> private 'tring pass-ord> private 'tring step> private 'tring post%ontent> private 'tring postTitle> private 'tring post*d> private 'tring blog*d> private 'tring search> public 'tring get'earch+, T return search> U public void set'earch+'tring search, T this.search R search> U public 'tring getBlog*d+, T return blog*d> U public void setBlog*d+'tring blog*d, T this.blog*d R blog*d> U public 'tring get&ass-ord+, T return pass-ord> U public void set&ass-ord+'tring pass-ord, T this.pass-ord R pass-ord> U public 'tring getUser9ame+, T return user9ame> U public void setUser9ame+'tring user9ame, T this.user9ame R user9ame> U public 'tring get&ost%ontent+, T return post%ontent> U public void set&ost%ontent+'tring post%ontent, T this.post%ontent R post%ontent> U public 'tring get&ost*d+, T return post*d> U public void set&ost*d+'tring post*d, T this.post*d R post*d> U public 'tring get&ostTitle+, T return postTitle> F@

U public void set&ostTitle+'tring postTitle, T this.postTitle R postTitle> U public 'tring get'tep+, T return step> U public void set'tep+'tring step, T this.step R step> U public ActionErrors validate+Action.apping mapping! Mttp'ervlet;e8uest re8uest, T ActionErrors errors R new ActionErrors+,> ## ?irstname cannot be empty if +user9ame RR null VV user9ame.trim+,.e8uals+SS,, T errors.add+Sname$S! new ActionError+Serror.sample.nameS,,> U ## 0astname cannot be empty if +pass-ord RR null VV pass-ord.trim+,.e8uals+SS,, T errors.add+SpassS! new ActionError+Serror.sample.passS,,> U return errors> U U Lo'inDao.Eava pac"age com.vign.virblog .dao> import java.io.&rint-riter> import java.s8l.%onnection> import java.s8l.&repared'tatement> import java.s8l.;esult'et> import javax.s8l.3ata'ource> import com.vign.virblog .actionform.0ogin?orm> import com.vign.virblog .constants.%onstants> public class 0ogin3ao T ;esult'et rs> &repared'tatement ps> public ;esult'et (etUser3etails+3ata'ource ds!0ogin?orm l!&rint-riter pw!%onnection con,T tryT ps R con.prepare'tatement+Sselect Y from userLinfo where usernameRG and password R GS,> ps.set'tring+$! l.getUser9ame+,,> ps.set'tring+<! l.get&ass-ord+,,> rs R ps.execute4uery+,> Ucatch+Exception e,T pw.write+e.get.essage+,,> U H)

return rs> U public ;esult'et (etEmp3etails+3ata'ource ds!0ogin?orm l!%onnection con,T tryT ps R con.prepare'tatement+Sselect empLno!empLname!empLpasswd from emp where empLnameRG and empLpasswd R GS,> ps.set'tring+$! l.getUser9ame+,,> ps.set'tring+<! l.get&ass-ord+,,> rs R ps.execute4uery+,> Ucatch+Exception e,T U return rs> U public void Update'tatus+3ata'ource ds!0ogin?orm l!int id!%onnection con, T tryT ps R con.prepare'tatement+Supdate userLinfo set userLstatusR$ where userLidRGS,> ps.set*nt+$!id,> ps.executeUpdate+,> Ucatch+Exception e,T U U public ;esult'et ;ecent&ost+3ata'ource ds!%onnection con, T 'tring recent&ost4uery R %onstants.;E%E9TL&D'TL4UE;I> try T ps R con.prepare'tatement+recent&ost4uery,> rsRps.execute4uery+,> U catch +Exception e, TU return rs> U public ;esult'et ;etrieveL&ost+3ata'ource ds!'tring &ost*d!%onnection con, T 'tring view&ost4uery R %onstants.;ET;*EVEL&D'TL4UE;I> try T ps R con.prepare'tatement+view&ost4uery,> ps.set'tring+$!&ost*d,> rsRps.execute4uery+,> U catch +Exception e, T 'ystem.out.println+e,> U return rs> U U Re!or"!ac&a'e.Eava pac"age com.vign.virblog .actionclasses> import java.io.&rint-riter> H$

import java.s8l.%onnection> import java.s8l.&repared'tatement> import java.s8l.;esult'et> import java.util.Array0ist> import java.util.0ist> import javax.servlet.http.Mttp'ervlet;e8uest> import javax.servlet.http.Mttp'ervlet;esponse> import javax.servlet.http.Mttp'ession> import javax.s8l.3ata'ource> import org.apache.struts.action.Action> import org.apache.struts.action.Action?orm> import org.apache.struts.action.Action?orward> import org.apache.struts.action.Action.apping> import com.vign.virblog .actionform.;eportbean> public class ;eportpac"age extends ActionT 3ata'ource ds> %onnection con> &repared'tatement ps> ;esult'et rs> Action?orward nextpage R null> &rint-riter pw R null> *nteger 3or'bitR$> 0istP;eportbeanQ data> public Action?orward execute+Action.apping mapping! Action?orm form! Mttp'ervlet;e8uest re8uest! Mttp'ervlet;esponse response, throws Exception T try T dataRnew Array0istP;eportbeanQ+,> pw R response.get-riter+,> ds R get3ata'ource+re8uest,> con R ds.get%onnection+,> ps R con.prepare'tatement+Sselect userLid!username from userLinfoS,> rs R ps.execute4uery+,> while+rs.next+,, T int iRrs.get*nt+$,> ;eportbean reportlistRnew ;eportbean+,> 'tring strRrs.get'tring+<,> reportlist.set*d+i,> reportlist.setUname+str,> data.add+reportlist,> U Mttp'ession sessionRre8uest.get'ession+true,> session.setAttribute+SdataS! data,> U catch +Exception e, T 'ystem.out.println+Serror SXe,> ## pw.println+e.get.essage+,,> U H<

finallyT con.close+,> U return mapping.find?orward+Sreport$S,> U U Re!or";ean.Eava pac"age com.vign.virblog .actionform> import org.apache.struts.action.Action?orm> public class ;eportbean extends Action?orm T private int id> private 'tring uname> private 'tring step> public int get*d+, T return id> U public void set*d+int id, T this.id R id> U public 'tring get'tep+, T return step> U public void set'tep+'tring step, T this.step R step> U public 'tring getUname+, T return uname> U public void setUname+'tring uname, T this.uname R uname> U U A$ inDe)e"eAc"ion.Eava pac"age com.vign.virblog .actionclasses> import java.io.&rint-riter> import java.s8l.%onnection> import java.s8l.&repared'tatement> import javax.servlet.http.Mttp'ervlet;e8uest> import javax.servlet.http.Mttp'ervlet;esponse> import javax.servlet.http.Mttp'ession> import javax.s8l.3ata'ource> import org.apache.struts.action.Action> import org.apache.struts.action.Action?orm> import org.apache.struts.action.Action?orward> import org.apache.struts.action.Action.apping> import com.vign.virblog .dao.Admin3eleteBlog3ao> public class Admin3eleteAction extends ActionT 3ata'ource ds> HE

'tring delete> %onnection con> &repared'tatement ps> &rint-riter pw R null> public Action?orward execute+Action.apping mapping! Action?orm form! Mttp'ervlet;e8uest re8uest! Mttp'ervlet;esponse response, throws Exception T try T pwRresponse.get-riter+,> ds R get3ata'ource+re8uest,> Mttp'ession sesRre8uest.get'ession+,> 'tring pidRses.getAttribute+SpidS,.to'tring+,> Mttp'ession sessionRre8uest.get'ession+,> 'tring blogidRsession.getAttribute+SblogidS,.to'tring+,> Admin3eleteBlog3ao admindeletedaoRnew Admin3eleteBlog3ao+,> admindeletedao.admindeleteblog+ds! pid!pw!blogid,> pw.print+pid,> Ucatch+Exception e,T pw.print+e,> U return mapping.find?orward+SadminfinalLpageS,> U U A$ inDe)e"eB)o'Dao.Eava pac"age com.vign.virblog .dao> import java.io.&rint-riter> import java.s8l.%onnection> import java.s8l.&repared'tatement> import java.s8l.;esult'et> import javax.s8l.3ata'ource> public class Admin3eleteBlog3ao T ;esult'et result> %onnection con> &repared'tatement ps> java.s8l.Timestamp curdate R new java.s8l.Timestamp+new java.util.3ate+,.getTime+,,> public ;esult'et admindeleteblog+3ata'ource ds!'tring postid!&rint-riter pw!'tring blogid,T tryT conRds.get%onnection+,> psRcon.prepare'tatement+Sinsert into deleteLpost values+G!G!G!G!G,S,> ps.set'tring+$! postid,> ps.set'tring+<! SAdminS,> ps.set'tring+E!SAbuseS,> ps.setTimestamp+F!curdate,> ps.set'tring+H!blogid,> ps.executeUpdate+,> psRcon.prepare'tatement+Sdelete from commentsLhistory where postLidRGS,> ps.set'tring+$! postid,> ps.executeUpdate+,> HF

psRcon.prepare'tatement+Sdelete from postdet where postLidRGS,> ps.set'tring+$! postid,> ps.executeUpdate+,> psRcon.prepare'tatement+Supdate userLinfo set abuseLcountRabuseLcountX$ where userLidRGS,> ps.set'tring+$! blogid,> ps.executeUpdate+,> con.commit+,> con.close+,> Ucatch+Exception e,T pw.print+e,> U return result> U public ;esult'et admindeleteuser+3ata'ource ds!'tring blogid!'tring userid!&rint-riter pw,T tryT java.s8l.Timestamp curdate R new java.s8l.Timestamp+new java.util.3ate+,.getTime+,,> conRds.get%onnection+,> psRcon.prepare'tatement+Sinsert into abuseLdeleteLadmin values+G!G!G!G!G,S,> ps.set'tring+$! blogid,> ps.set*nt+<! *nteger.parse*nt+blogid,,> ps.set*nt+E!*nteger.parse*nt+userid,,> ps.set'tring+F!SAbuseS,> ps.setTimestamp+H!curdate,> ps.executeUpdate+,> psRcon.prepare'tatement+Sdelete from postdet where blogLidRGS,> ps.set'tring+$! userid,> ps.executeUpdate+,> psRcon.prepare'tatement+Sdelete from commentsLhistory where userLidRGS,> ps.set'tring+$! userid,> ps.executeUpdate+,> psRcon.prepare'tatement+Sdelete from userLinfo where userLidRGS,> ps.set*nt+$!*nteger.parse*nt+userid,,> ps.executeUpdate+,> con.close+,> Ucatch+Exception e,T pw.print+e,> U return result> U U Recen"Pos"Ac"ion.Eava pac"age com.vign.virblog .actionclasses> import java.s8l.%lob> import java.s8l.%onnection> import java.s8l.;esult'et> import java.util.Array0ist> HH

import java.util.0ist> import javax.servlet.http.Mttp'ervlet;e8uest> import javax.servlet.http.Mttp'ervlet;esponse> import javax.servlet.http.Mttp'ession> import javax.s8l.3ata'ource> import org.apache.struts.action.Action> import org.apache.struts.action.Action?orm> import org.apache.struts.action.Action?orward> import org.apache.struts.action.Action.apping> import com.vign.virblog .actionform.;ecent&ost?orm> import com.vign.virblog .dao.0ogin3ao> public class ;ecent&ostAction extends Action T %onnection connection'tring> public Action?orward execute +Action.apping mapping!Action?orm form! Mttp'ervlet;e8uest re8uest!Mttp'ervlet;esponse response , throws Exception T tryT 3ata'ource ds> ## to get datasource 0istP;ecent&ost?ormQ recentpostLls> ##Variable for recentpost recentpostLlsRnew Array0istP;ecent&ost?ormQ+,> dsR get3ata'ource+re8uest,> connection'tring R ds.get%onnection+,> 0ogin3ao login3aoRnew 0ogin3ao+,> ;esult'et rsLrecentpostRlogin3ao.;ecent&ost+ds!connection'tring,> int iR)> ## Excuttes for first H records in the resultset . while+ rsLrecentpost.next+, == iPH , T ;ecent&ost?orm rpRnew ;ecent&ost?orm+,> rp.set&ost*d+rsLrecentpost.get'tring+$,,> rp.setBlog*d+rsLrecentpost.get'tring+<,,> rp.set&ostTitle+rsLrecentpost.get'tring+E,,> ##(etting a &ost %ontent that is stored along with html tags. %lob contentRrsLrecentpost.get%lob+F,> 'tring MT.0'tringRcontent.get'ub'tring+$!+int,content.length+,,> rp.set&ost%ontent+MT.0'tring,> ## getting the data as timestamp from the database and sperating the data and month 'tring date$RrsLrecentpost.get'tring+H,.to'tring+,> if+date$.substring+<! E,.e8uals+S7S,, rp.set&ost3ay+date$.substring+)! <,,> else rp.set&ost3ay+date$.substring+)! $,,> if+date$.substring+<! E,.e8uals+S7S,, rp.set&ost.onth+date$.substring+E! A,,> else rp.set&ost.onth+date$.substring+<! H,,> recentpostLls.add+rp,> iXX> U Mttp'ession session R re8uest.get'ession+true,> session.setAttribute+SpostLlsS!recentpostLls,> HA

Ucatch+Exception e, TU finallyT connection'tring.close+,> U return mapping.find?orward+S;ecent&ostS,> U U Recen"Pos"For .Eava pac"age com.vign.virblog .actionform> import org.apache.struts.action.Action?orm> public class ;ecent&ost?orm extends Action?orm T private static final long serialVersionU*3 R $0> private 'tring post*d> private 'tring blog*d> private 'tring postTitle> private 'tring post%ontent> private 'tring post3ay> private 'tring post.onth> private 'tring archive.onth> private 'tring monthLnum> public 'tring get.onthLnum+, T return monthLnum> U public void set.onthLnum+'tring monthLnum, T this.monthLnum R monthLnum> U public 'tring getArchive.onth+, T return archive.onth> U public void setArchive.onth+'tring archive.onth, T this.archive.onth R archive.onth> U public 'tring get&ost3ay+, T return post3ay> U public void set&ost3ay+'tring post3ay, T this.post3ay R post3ay> U public 'tring get&ost.onth+, T return post.onth> U public void set&ost.onth+'tring post.onth, T this.post.onth R post.onth> U public 'tring getBlog*d+, T return blog*d> U public void setBlog*d+'tring blog*d, T this.blog*d R blog*d> HJ

U public 'tring get&ost%ontent+, T return post%ontent> U public void set&ost%ontent+'tring post%ontent, T this.post%ontent R post%ontent> U public 'tring get&ost*d+, T return post*d> U public void set&ost*d+'tring post*d, T this.post*d R post*d> U public 'tring get&ostTitle+, T return postTitle> U public void set&ostTitle+'tring postTitle, T this.postTitle R postTitle> U U Searc*Ac"ion.Eava pac"age com.vign.virblog .actionclasses> import java.s8l.%onnection> import java.s8l.;esult'et> import java.util.Array0ist> import java.util.0ist> import javax.servlet.http.Mttp'ervlet;e8uest> import javax.servlet.http.Mttp'ervlet;esponse> import javax.servlet.http.Mttp'ession> import javax.s8l.3ata'ource> import org.apache.struts.action.Action> import org.apache.struts.action.Action?orm> import org.apache.struts.action.Action?orward> import org.apache.struts.action.Action.apping> import com.vign.virblog .actionform.;etrieve&ost?orm> import com.vign.virblog .dao.'earch3ao> public class 'earchAction extends ActionT %onnection connection'tring> public Action?orward execute +Action.apping mapping!Action?orm form! Mttp'ervlet;e8uest re8uest!Mttp'ervlet;esponse response , throws Exception T try T 3ata'ource ds> ## to get datasource ;esult'et rsRnull> ## to store the retrived the records from the database 0istP;etrieve&ost?orm Q 'earchLresult> 'earchLresultRnew Array0istP;etrieve&ost?orm Q+,> ;etrieve&ost?orm searchLobjR+;etrieve&ost?orm, form> ## Dbject to get the Bean property. 'tring 'earchL'tringRsearchLobj.get'earch+,> ##(eting the search Text HK

ds R get3ata'ource+re8uest,> ##(etting datasource connection'tring R ds.get%onnection+,> ##(etting %onnection 'earch3ao search3aoRnew 'earch3ao+,> ##Dbject to call 'earch3ao methods rsRsearch3ao.'earch+ds! 'earchL'tring!connection'tring,> ## To store the resulting title and postid in the bean ## The Bean will be stored in the Array0ist while+rs.next+,, T ;etrieve&ost?orm rpfRnew ;etrieve&ost?orm+,> rpf.setTitle+rs.get'tring+$,,> rpf.set&ost*d+rs.get'tring+<,,> rpf.setAuthor+rs.get'tring+E,,> 'earchLresult.add+rpf,> U Mttp'ession session R re8uest.get'ession+true,> session.setAttribute+SsearchLlistS!'earchLresult,> Ucatch+Exception e,T U finallyT connection'tring.close+,> U return mapping.find?orward+SsearchresultS,> U U Searc*Dao.Eava pac"age com.vign.virblog .dao> import java.s8l.%onnection> import java.s8l.&repared'tatement> import java.s8l.;esult'et> import javax.s8l.3ata'ource> import com.vign.virblog .constants.%onstants> public class 'earch3ao T ;esult'et rs> &repared'tatement ps> public ;esult'et 'earch+3ata'ource ds!'tring 'earchL'tring!%onnection con,T tryT 'tring 8ueryR%onstants.'EA;%ML4UE;I> 8ueryR8uery.replace?irst+SZZGS! 'earchL'tring,> 8ueryR8uery.replace?irst+SZZGS! 'earchL'tring,> 8ueryR8uery.replace?irst+SZZGS! 'earchL'tring,> ps R con.prepare'tatement+8uery,> rs R ps.execute4uery+,> Ucatch+Exception e,TU return rs> U U

H@

S,STEM TESTING
DEFINITION Testing software is a critical element of software 8uality assurance and represents the ultimate review of specification and coding software testing fundamentals define the overriding objectives for software testing. TESTING OBCECTI3ES Testing is a process of executing a program with the intent of finding an error. A good case is one that has a high probability of finding an error. A successful test is one that uncovers a yet undiscovered error. *f testing is conducted successfully it will uncover errors in the software. Testing cannot show the absence of defects! it can only show the software defects are present. TESTING PRINCIPLES Before applying methods to design effective test cases! a software engineer must understand the basic principles that guide software testing. All tests should be traceable to customer re8uirements. Test should be planned long before testing begins. Testing should begin Bin smallC and progress towards testing Bin largeC Exhaustive testing is not possible. To be most effective. An independent third party should conduct testing. TESTING TEC2NI/UES The primary objective for test case is to drive a set of tests that has the highest li"elihood for uncovering defects in the software. Testing is the process of executing a program with the intention of finding mista"es and discovered error. To accomplish this objective two different categories of test case techni8ues used.

A)

After test plan and before going to test design test case is important. According to the project re8uirements we have to test some conditions to ensure the 8uality of software. ?or the purpose of testing these conditions we have to write test cases. TESTING STRATEGIES Testing is a set of activities that can be planned in advance and connected systematically. A strategy for software testing must accommodate low level tests that are necessary to verify a small source code segment has been correctly implemented as well as high level tests that validate system functions against customer re8uirements. 9.1 TEST CASE PREPARATION 9.1.1 BLAC? BOF TESTING The concept of the blac" box is used to represent a system whose inside wor"ings or no available for inspection. *n a blac" box! the test item is treated as a Bblac"C since its logic is un"nown. All that is "nown is what goes in and what comes out! or the input and output. Mere! in this BBlog ApplicationC the internal functionalities have been tested. 9.1.. 12ITE BOF TESTING -hite box testing assumes that the specific logic is important and must be tested to guarantee the system6s proper functioning. The main use of the white box testing is in error based testing. *t is predict on close examination of procedural detail logical providing test cases that exercise specific sets of conditions and#or loops test path enough the software. Basis path testing is a white box testing techni8ue. The basis path method enables the test case designer to derive a logical complexity of a procedural design and use this measure as a guide for defining as basis set of execution path. *n this application both testing techni8ues are applied. The blac" box testing is used to testing the application inside because the logic is un"nown. The white box testing is applied for testing the execution path of the application.

A$

9.. TEST CASE 3ERIFICATION 9...1 UNIT TESTING Unit testing focuses on verifying the effort on the smallest unit of software7 module. *n this application! the local data structure is examined to ensure that the data stored temporarily maintains its integrity during all steps in the algorithm6s execution. Boundary conditions are tested to ensure that the module operates properly at boundaries established to limit or restrict processing. 9.... INTEGRATION TESTING 3ata can be tested across an interface. Dne module can have an inadvertent! adverse effect on the other. *ntegration testing is a systematic techni8ue for constructing a program structure while conducting tests to uncover errors associated with intergrating. *n this application the data is integrated among the interfaces is tested successfully. 9...- PERFORMANCE TESTING &erformance Testing is used to test runtime performance of software within the context of an integrated system. &erformance test are often coupled with stress testing and re8uire both software instrumentation. This application is having the good performance at runtime. 9...0 3ALIDATION 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 re8uired output in the specified format. Dutput format is considered in two ways! the screen format and the printer format. This application is tested for different input values! so that the validation testing is successfully done. 9...4 S,STEM TESTING 'ystem Testing is nothing but the testing the entire system. The following test cases are coming from the system testing. Tes" case 1 A<

"teps# Enter user name and password. "creen# login $b%ective# user authentication Pre conditions# $. username! password should match Expected $utput# if the user is a registered user +i.e. the user already has an account, it will search in the postdet! if it is available and directed to the registered user home page! otherwise all fields on the screen should be cleared and the message BAlready 0ogged inC should be displayed . Tes" case . "teps# Enter the title of the post for search category. "creen# home page $b%ective# chec" with the title of the post which is in the database. Pre conditions# search category should matches with the post title. Expected $utput# if the title matches! then the content of the post will be displayed! otherwise it won6t display. Tes" case "teps# Enter user name and password. "creen# login $b%ective# user authentication Pre conditions# username! password should match Expected $utput# if the user name is not available in the postdet it will create a new blog account for the user! otherwise all the fields should be clear. Tes" case 0 "teps# Enter user name and password. "creen# login $b%ective# user authentication Pre conditions# ;ole should match. Expected $utput# The role ta"es either $ for admin or < for user name accordingly. Tes" case 4 "teps# Enter user name and password. AE

"creen# login $b%ective# user authentication Pre conditions# Userstatus should match. Expected $utput# The userstatus is either $ for 0ogged *n or < for 0ogged Dut. accordingly. Tes" case 7 "teps# 3ata Archive for the month. "creen# Visitor Mome page! ;egistered Mome page $b%ective# display that month archive Pre conditions# fetch from the current timestamp. Expected $utput# displays the posts that were created for that month. Tes" case 9 "teps# Tags. "creen# Mome page $b%ective# Tags names in different si es. Pre conditions# should be set as font si e for the title. Expected $utput# 3isplays the tag names in different font si es based on the number of posts created by different users. Tes" case : "teps# Abuse Users. "creen# Admin page $b%ective# chec" abuse count. Pre conditions# should be greater than E. Expected $utput# The admin can bloc" the abuse user if the abuse count is greater than E. Tes" case < "teps# Abuse post. "creen# Admin page $b%ective# chec" abuse count for the post. Pre conditions# should be greater than H.

AF

Expected $utput# The admin can delete the abuse post after he reads. *f the abuse count is greater than H.

S,STEM IMPLEMENTATION
:.1 SOFT1ARE RE/UIREMENTS
Dperating 'ystem ?ront End Technology ?ramewor" Tools Bac" End : : : : : : -indows 5& 2ava 'erver &ages 2<EE! 23B%! 2ava 'cript 'truts ?ramewor"7$.<.@ Eclipse H.H! Apache Tomcat H.)! 3reamweaver K.) Dracle @i

2ARD1ARE RE/UIREMENTS
&rocessor ;A. Mard 3is" 'i e V3U /eyboard .ouse 3isplay : : : : : : : &entium *V $ (B F) (B 'V(A $)F /eys Dptical $)<F 5 JAK

AH

:.. SOFT1ARE DESCRIPTION


I"era"ive Sof"8are Deve)o! en" A!!roac* *terative development is a re8or& sc*e$%)in' s"ra"e'+ in which time is set aside to revise and improve parts of the system. *t does not presuppose incremental development! but wor"s very well with it. A typical difference is that the output from an increment is not necessarily subject to further refinement! and its1 testing or user feedbac" is not used as input for revising the plans or specifications of the successive increments. Dn the contrary! the output from an iteration is examined for modification! and especially for revising the targets of the successive iterations. S*terationsS to generally mean any combination of incremental and iterative development. The basic idea behind iterative enhancement is to develop a software system incrementally! allowing the developer to ta"e advantage of what was being learned during the development of earlier! incremental! deliverable versions of the system. 0earning comes from both the development and use of the system! where possible. /ey steps in the process were to start with a simple implementation of a subset of the software re8uirements and iteratively enhance the evolving se8uence of versions until the full system is implemented. At each iteration! design modifications are made and new functional capabilities are added. The &rocedure itself consists of the *nitiali ation step! the *teration step! and the &roject %ontrol 0ist. The initiali ation step creates a base version of the system. The goal for this initial implementation is to create a product to which the user can react. *t should offer a sampling of the "ey aspects of the problem and provide a solution that is simple enough to understand and implement easily. To guide the iteration process! a project control list is created that contains a record of all tas"s that need to be performed. *t includes such items as new features to be implemented and areas of redesign of the existing solution. The control list is constantly being revised as a result of the analysis phase.

AA

The iteration involves the redesign and implementation of a tas" from project control list! and the analysis of the current version of the system. The goal for the design and implementation of any iteration is to be simple! straightforward! and modular! supporting redesign at that stage or as a tas" added to the project control list. The level of design detail is not dictated by the interactive approach. *n a light7 weight iterative project the code may represent the major source of documentation of the system> however! in a mission7critical iterative project a formal 'oftware 3esign 3ocument may be used. The analysis of an iteration is based upon user feedbac"! and the program analysis facilities available. *t involves analysis of the structure! modularity! usability! reliability! efficiency! = achievement of goals.

(uidelines that drive the implementation and analysis include:

Any difficulty in design! coding and testing a modification should signal the need for redesign or re7coding. .odifications should fit easily into isolated and easy7to7find modules. *f they do not! some redesign is needed. .odifications to tables should be especially easy to ma"e. *f any table modification is not 8uic"ly and easily done! redesign is indicated. .odifications should become easier to ma"e as the iterations progress. *f they are not! there is a basic problem such as a design flaw or a proliferation of patches. &atches should normally be allowed to exist for only one or two iterations. &atches may be necessary to avoid redesigning during an implementation phase. The existing implementation should be analy ed fre8uently to determine how well it measures up to project goals.

AJ

&rogram analysis facilities should be used whenever available to aid in the analysis of partial implementations. User reaction should be solicited and analy ed for indications of deficiencies in the current implementation.

S,STEM MAINTENANCE
.aintenance phase focuses on change that is associated with error correction! adaptations re8uired as the software6s environment evolves! and changes due to enhancements brought about by changing customer re8uirements. <.1 USER MANUAL User .anual is li"e a guide to the novice user[

Each and every developed system should provide this manual. User .anual of the developed system BBlog ApplicationC is as follows. After the installation of the system successfully! a user can enter into the system. Through the login page! if a user registered user i.e. the user is already created the blog then his home page will open. Dtherwise a new blogger account will be created.

The User can create post! manage post after entered into his login. The user can view his posts! comments created by other users about his post. 'imilarly the Administrator can enter his homepage through the login page. The Administrator can view the view abuse post! view abuse users.. Also the Admin can view the reports regarding the deleted abuse users! deleted abuse posts and user details.

<.. DESCRIPTION OF FUNCTIONS The project GBLOG APPLICATIONH enable the employees of the organi ation to create an account for his blog! add posts and manage them. Blogs are an excellent way to share "nowledge! interests within the organi ation and have interesting comments and discussions. The project is subdivided into seven modules and they are User module AK

.y Blog module %omments and rating module Tag module 3ata Archive module Admin module 'earch module User o$%)e The user module includes the user registration and creation of blog account for the user. Dnce the user registers! a folder will be created in the server with the users name wherein the images posted by the user will be stored in the folder and identified by postid . M+ B)o' o$%)e

This module enables the registered users to navigate to his account. The user can create new posts and publish it. The user is given the option to draft it and later edit and publish it. The user can edit the existing posts and publish it. *f the user wishes to delete a post he can do the same. This module allows the users to manage the posts. Co en"s an$ ra"in' o$%)e

This module allows the bloggers to visit other users posts and give their comments on the posts. The user who is viewing has to give ratings for the posts. The rating is in various ranges \ Excellent! Very good! good! ?air and Abuse . The post which will be rated as abuse will be notified to the administrator for further verification. Even visitors are allowed to view! comment and rate on the posts. Ta' o$%)e This module displays the category of various posts on various font si es and colors. This is based on the number of posts created by users on various categories. This allows the users to identify on which category there are a large number of posts.

A@

Da"a Arc*ive

o$%)e

The data archive module displays past months post contents based on months. There are two types based upon the type of users using the system. ?or visitor! the data archive will be available on the home page based on month. ?or user! the data archive of user will be displayed on the users home page. %lic"ing on the month will display all the topics of that month. -hen the topic is chosen! the content will be displayed with all comments! average rating! abuse rating! creation time and image if any. A$ in o$%)e The admin module manages the entire system. Me can delete abuse posts! bloc" abuse users and generate reports. De)e"e A;%se Pos"s B The abuse posts rated by the readers are notified to the admin. The admin deletes the posts if it is abuse! after reading it. The admin has the privilege to delete the posts which is based on the abuse ratings i.e. abuse count rating greater than five. B)oc& A;%se Users B The user if repeatedly posts abuse posts is considered as an abuse user. The abuse users are reported to the admin. The admin can bloc" the abuse user when the abuse user count is greater than E. Genera"e Re!or"s B Various reports can be generated such as $, View registered users <, View deleted posts E, View bloc"ed users Searc* o$%)e &rovision for searching other posts and display the relevant posts which matches the search text is displayed. <.- FEATURES

J)

This application software has been computed successfully and was also tested successfully by ta"ing Btest casesC. *t is user friendly! and has re8uired options! which can be utili ed by the user to perform the desired operations. The software is developed using 2ava as front end and Dracle as bac" end in -indows environment. The goals that are achieved by the software are: *nstant access. *mproved productivity. Dptimum utili ation of resources. Efficient management of records. 'implification of the operations. 0ess processing time and getting re8uired information. User friendly.

J$

CONCLUSION
BLOG APPLICATION has been developed with the objective of fulfilling all the re8uirements as specified by the user. This project is very useful for the organi ation because it has been developed in a very simple and efficient manner. All the employees of the organi ation can use the system for sharing their personal experiences! thoughts! "nowledge among the organi ation and can have small discussions about their posts.

J<

REFERENCE
$. %ay '. Mortsman! (ary %ornell! B%ore 2ava] < Volume * \ ?undamentalsC! Jth Edition! &earson Education \ 'un .icrosystems N&age 9os. $)7K@! @H7$<A! $EH7<<JO <. %ay '. Mortsman! (ary %ornell! B%ore 2ava] < Volume ** \ AdvancedC! &earson Education \ 'un .icrosystems N&age 9os. KE7$HH! $KH7<AJ! E$<7FFK! HJ)7AKAO E. Eric ?reeman! Elisabeth ?reeman! BMead ?irst 'ervlets = 2'&C! D6;eilly \ '&3 N&age 9os. <H7@J! $EH7$@K! <$)7<J@O F. Thau! BThe Boo" of 2ava'criptC! <nd Edition! '&3 N&age 9os. EH7$HH! $KJ7<<AO H. (eorge ;eese! B2ava 3atabase Best &racticesC N&age 9os. $$K7<$A! EFJ7F<KO

1e;si"es

$. http:##www.roseindia.net# <. http:##www.visualbuilder.com# E. http:##tiles.apache.org# F. http:##displaytag.sourceforge.net# H. http:##blogger.com#

JE

H$&E PAGE

A1 T*is for is $irec"e$ "o ain"ain "*e sec%ri"+ so "*a" %na%"*ori#e$ %ser can no" access "*e A!!)ica"ion. If "*e %ser "ries "o )o'in in"o "*e !a'e 8i"*o%" UserNa e ( Pass8or$D "*en i" s*o8s a essa'e GUserNa e is Re5%ire$D Pass8or$ is Re5%ire$H. JF

H$&E PAGE'($G)* PAGE+

A. T*is is !a'e is $irec"e$ "o %ser *o e !a'e or a$ in *o e !a'e 8*en "*e %ser or a$ in )o'in res!ec"ive)+. JH

,A- PAGE

A- T*is !a'e 'ives "*e Fre5%en")+ As&e$ /%es"ions =FA/> a;o%" "*e ;)o' a!!)ica"ion "o "*e en$ %ser 8*en "*e FA/ ;%""on is c)ic&e$.

JA

HE(P PAGE

A0 T*is !a'e 'ives G*o8 "o s"ar" "*e ;)o''in'H "o "*e en$ %ser 8*en "*e 2e)! ;%""on is c)ic&e$. JJ

.$*TA.T /"

A4 T*is !a'e 'ives "*e con"ac" $e"ai)s a;o%" "*e co !an+ for 8*ic* "*e a!!)ica"ion is $eve)o!e$ 8*en "*e GCon"ac" UsH ;%""on is c)ic&e$ ;+ "*e en$ %ser.

JK

A0$/T /"

A7 T*is !a'e 'ives a;o%" "*e ;)o' a!!)ica"ion 8*en "*e GA;o%" %sH ;%""on is c)ic&e$ ;+ "*e en$ %ser.

J@

TAGs

A9 T*is !a'e 'ives a)) "*e "i")es in $ifferen" si#es ;ase$ on "*e n% ;er of *i"s 8*en "*e GTAGsH ;%""on is c)ic&e$ ;+ "*e en$ %ser. K)

DATA A1.H)2E

A: T*is !a'e 'ives "*e Da"a Arc*ive for "*e Mon"* of A!ri) 8*en "*e GA!ri) .66:H )in& is c)ic&e$ ;+ "*e en$ %ser. K$

"EA1.H

A< T*is for is %se$ for searc*in' !%r!ose ;ase$ on Pos" Na e. If "*e searc* "o!ic is fo%n$ in "*e $a"a;ase i" 8i)) $is!)a+D o"*er8ise no".

K<

AD&)* ($G)*

A16 T*is !a'e is $irec"e$ "o A$ in Lo'in !a'e 8*en "*e Lo'in ;%""on is c)ic&e$ ;+ "*e en$ %ser.

KE

AD&)* H$&E PAGE

A11 T*is !a'e 'ives "*e A$ in 2o e !a'e *avin' "*e )in&s 3ie8 A;%se Pos"sD 3ie8 A;%se UsersD Re!or"s 8*en "*e a$ in )o'in in"o "*e !a'e. KF

AD&)* PAGE 3 2)EW A0/"ED P$"T"

B1 T*is !a'e 'ives "*e n% ;er of "*e a;%se$ !os"s an$ "*e a%"*or na es 8*en "*e 3ie8 A;%se$ Pos"s )in& is crea"e$.

KH

AD&)* PAGE 3 2)EW A0/"E /"E1"

B. T*is !a'e 'ives "*e )is" of a;%se$ %serIs UserI$D UserNa eD A;%seCo%n" 8*en "*e )in& G3ie8 A;%se UsersH is c)ic&e$ ;+ "*e en$ %ser.

KA

AD&)* PAGE 1EP$1T"

B- T*is !a'e 'ives "*e a;o%" "*e User De"ai)sD De)e"e$ A;%se B)o'sD De)e"e$ A;%se User 8*en "*e )in& GRe!or"sH is c)ic&e$. KJ

AD&)* PAGE 1EP$1T"

B0 T*is !a'e 'ives "*e )is" of User De"ai)s *avin' UserIDD UserNa e 8*en "*e )in& GUser De"ai)H is c)ic&e$. KK

AD&)* PAGE 3 DE(ETED A0/"ED 0($G"

B4 T*is !a'e 'ives "*e )is" of De)e"e$ A;%se$ B)o's 8*en "*e )in& GDe)e"e$ A;%se$ B)o'sH is c)ic&e$ ;+ "*e a$ in.

K@

AD&)* PAGE 3 DE(ETED A0/"ED /"E1"

B7 T*is !a'e 'ives "*e )is" of De)e"e$ A;%se$ Users 8*en "*e )in& GDe)e"e$ A;%se$ UsersH is c)ic&e$ ;+ "*e a$ in.

@)

/"E1 H$&E PAGE

B9 T*is !a'e 'ives "*e )is" of !os"s crea"e$ ;+ "*e Lo''e$ User ;ase$ on Mon"*8ise 8*en "*e %ser c)ic&s on "*e Da"a Arc*ive Lin&. A)soD "*is !a'e *avin' "*e )in&s "o Crea"ePos"D Mana'ePos". @$

/"E1 PAGE 3 P$"T .$&&E*T"

B: T*is !a'e 'ives "*e con"en" of "*e "i")e GFML va)i$a"ionH 8*en "*e )in& GFML 3ALIDATIONH c)ic&e$ ;+ "*e )o''e$ %ser. A)so "*is !a'e *avin' "o 'ive "*e co en"s "o "*a" !os". @<

/"E1 PAGE 3 .1EATE P$"T

B< T*is !a'e 'ives "o Crea"e Pos" 8*en "*e %ser c)ic&s on "*e )in& GCrea"ePos"H. A)so *avin' "o E$i" "*e Pos" an$ I a'e U!)oa$. @E

/"E1 PAGE 3 &A*AGE P$"T

B16 T*is !a'e 'ives "*e )is" of !os"s crea"e$ ;+ "*e Lo''e$ User. A)soD *avin' "*e )in&s "o 3ie8D E$i" an$ De)e"e. So "*a" "*e %ser can vie8 *is !os"D e$i" *is !os" an$ $e)e"e *is !os". @F

/"E1 PAGE 3 &A*AGE P$"T

B11 T*is !a'e 'ives "*a" "*e ac&no8)e$'e en" for confir a"ion of o!era"ion s%c* as $e)e"e. T*ere are "8o )in&s on "*is for G,es an$ NoH. If "*e %ser c)ic&s on G,esH )in& "*e !os" 8i)) ;e s%ccessf%))+ $e)e"e$D if "*e %ser c)ic&s on GNoH )in& "*e !os" 8onI" ;e $e)e"e$ a" "*a" "i e. @H

@A

Você também pode gostar