50
PROJECT REPORT ON CONTENT MANAGEMENT TOOL Submitted in partial fulfillment of the requirements for the award of the degree of Bachelor of Technology in INFORMATION TECHNOLOGY Guide(s): Submitted by: Ms. Sapna Sinha ARPIT SHARMA B.Tech(IT) 7IT1 4 th Year 7 th Semester A2305307035

Content Management Tool-it

Embed Size (px)

DESCRIPTION

Word Document

Citation preview

PROJECT REPORTON

CONTENT MANAGEMENT TOOL

Submitted in partial fulfillment of the requirementsfor the award of the degree of

Bachelor of Technologyin

INFORMATION TECHNOLOGY Guide(s): Submitted by:Ms. Sapna Sinha ARPIT SHARMA

B.Tech(IT) 7IT1

4thYear 7th Semester

A2305307035

AMITY SCHOOL OF ENGINEERING ANDTECHNOLOGY

ACKNOWLEDGEMENT

I extend my sincere regards to the management of Amity School of Engineering and

Technology (ASET) for accepting my proposal to do summer training at ACL Wireless Ltd.

I would like to thank Mr. A.K JAIN (HOD IT) for his constant support and motivation.

I would like to put on records my sincere gratitude to the Management of ACL Wireless

Technologies Ltd. for giving me this opportunity to do my internship in the organization.

I would sincerely like to thank my Faculty guide Ms. Sapna Sinha and Industry guide

Mr.Vitesh Kohli for their unstinted support and constructive criticism throughout the duration

of the training.

The project would not look like it does had it not been for their interest and support.

Last but not the least, I am extremely happy and satisfied to have learned so much from the

company. The project has greatly enriched my knowledge.

DATE : 23/07/2010 Submitted By:

ARPIT SHARMA

A2305307035

7IT1

2

TOPIC NO. TITLE

1 Introduction 2 About Company 3 Project and Technology used 4 Software Requirement Specification 5 Abstract 6 Functional Requirements 7 Non-Functional Requirements 8 User and System Requirements 9 Hardware Requirements10 Software Requirements11 Milestones and Timelines12 Interface Specifications13 Flow Diagrams14 Databases15 Methodology-Overview16 Problem solving methodology and techniques17 Program Maintenance 18 Characteristics of a good program19 Stages of program development20 0Introduction to Eclipse IDE21 WebPage Designing22 Use of JavaScript23 Validations using JavaScript24 Use of Servlets25 Accessing Databases with JDBC Connection26 Use of JSP27 Snapshots28 Company Project Snapshots29 Results and Discussions30 Conclusion31 Recommendations32 References

3

ABSTRACT:

This project is aimed at developing a Content Management System which works on an

enhanced SMS-based chat service that enables a synchronous, text-based , chatting among

mobile users. With SMS as the bearer it caters to the widest possible mobile user audience,

second only to voice based solutions and services.

The project code has been written such that it achieves every single objective and also

allows the user to perform some functions that we thought of later..

In this project I have successfully accomplished the task of creating a Content Management

Tool.

SCOPE OF THE PROJECT

The project is currently being used by the organization I trained for in maintaining their M-

chat service.

The service enables mobile subscribers to meet new people around common interests, make

lots of new friends and chat with them in real time without ever having to reveal their mobile

number.

It also provides an option to subscribers to sign in to popular online IM services-access their

contacts and exchange messages with these contacts through SMS.

4

INTRODUCTION

The project given to me by my industry guide Mr. Vitesh Kohli was that to develop a

Content Management Tool to be used in their M-chat service which involves chatting through

SMS services.

Keywords

Generic Technology keywords

Databases, Programming, Network and middleware, Business logic ,

Validations ,KPA’s,KRA’s

Specific Technology keywords

JavaScript , Java Server Pages ,Servlets, HTML , DHTML, Microsoft Access

Database

Project type keywords

Analysis, Design, Implementation, Testing, User Interface

5

Functional components of the project

Following is a list of functionalities of the system. More functionalities that you find

appropriate can be added to this list. And, in places where the description of a functionality is

not adequate, you can make appropriate assumptions and proceed.

1. The system should have appropriate login facility. Relevant options like change password

and creating profile etc.

2. The system should allow administrator to control all the activities hence identify the roles

and accessibility of other users.

3. There will be three types of login: -User -Privileged -Supervisory.

Steps to start-off the project

1. Study and be comfortable with technologies such as Java Server Pages , JavaScript ,

Servlets , Postgres SQL. Concepts of Advance Java should be well understood. Be familiar

with Eclipse IDE 6.5.1 platform.

2. Understand the specification and come up with any suggestions that could be included.

3. Decide on the strategy or plan or software model to be used.

4. Create flowcharts or DFD’s.

5. Create Database design.6

6. Decide on GUI with good look and feel.

7. Start on creating the frontend and backend.

8. Go module wise in a simple step by step manner rather than rushing on all modules

together.

In the following sections of this report I aim to illustrate or explain the methodology,

requirement specification , software design document including flowcharts, data flow

diagrams, snapshots etc. that was central in the development of the code.

7

ABOUT THE COMPANY

ACL Wireless Limited is a leading developer of consumer and enterprise mobile value added services. A pioneer in the mobile VAS space the company has been building unique, innovative products for over 10 years.

ACL has over 40 mobile operator customers in 25 countries and services over 1000 enterprise customers in India. Focused on the development of mobile applications over SMS, IVR and GPRS/ 3G, the company currently manages over 4 billion SMSes and 4.5 billion page views per annum.

ACL’s products and services are spread across three key verticals – Mobile Communities, Enterprise Mobility and Mobile Content.

ACL’s flagship products include SMS Chat, Voice Chat, Mobile Social Networking, Bulk SMS, Short Codes, Mobile Radio and various Content and Subscription Services. 

Founded in 2000 by Sanjay Goyal & Vineet Jain, ACL is a privately owned company with investment from Naspers Group and Inter-Asia Venture Management. The Company has 225 employees, and is headquartered in Delhi (NCR) with offices in Mumbai, Kolkata and Dubai.

The company has also been a winner of ‘The Red Herring 100 Asia’ award and the ‘Deloitte Technology Fast 50 India’ award for three consecutive years.

 PROJECT AND TECHNOLOGY

The central aim of the project is to build a content management tool which will be a small version of the one currently being deployed in ACL Wireless Limited’s M-chat service which was designed and developed keeping in mind the goal of creating a healthy and clean Chat community. Here we try to put restriction on the users by restricting them to use words which are considered Badwords/Restricted words in their nickname. Therefore in order to stop this we have designed this content management tool.

8

SPECIFIC TECNOLOGY KEYWORDS: HTML, JSP, JAVASCRIPT, SERVLETS,

FRONT-END TECHNOLOGY: HTML, JSP, JAVASCRIPT and SERVLETS

HTML is used for designing of web pages.

JSP and SERVLETS are used for creating and implementing Business Logic.

JAVASCRIPT is used for applying validations at the required places.

BACK-END TECHNOLOGY: POSTGRES SQL

TOOLS USED: J2EE, ECLIPSE IDE

SOFTWARE REQUIREMENT SPECIFICATION(SRS)

ABSTRACT

This project is aimed at developing a Content Management System which works on an

enhanced SMS-based chat service that enables a synchronous, text-based , chatting among

mobile users. With SMS as the bearer it caters to the widest possible mobile user audience,

second only to voice based solutions and services.

FUNCTIONAL REQUIREMENTS

Following is a list of functionalities of the system. Later on as the requirements come up with

varied use of the software more functionalities can be added easily to the project.

9

Displaying of username will be login dependent, i.e., when a moderator is performing any action on certain nickname, that nickname will not be visible to the other moderator.

The nickname command list would be for a particular time period [user can specify this]. Default being last <48> hours.

There will be majorly three types of login accounts, one will be User level, second one will be for Privileged user and the third one for the Supervisory access.

All the three accounts will have different sets of control over the data.

The system has the following type of Login

I. Admin/Moderator

II. Superadmin

1) The users can perform the following tasks

Moderator:

He can disapprove a nickname if found associated to badwords/restricted words list. The name will be added to the list containing the users with badword as their nickname, to whom SMS notification will be sent, asking them to change their nickname.

He can approve a nickname if it does not belong to Badword/Restricted word list

NON-FUNCTIONAL REQUIREMENTS

I. Secure access of confidential data.

II. 24*7 availability.

III. Better component design to get better performance at peak time.

IV. Flexible service based architecture will be highly desirable for future extension.

10

USER AND THE SYSTEM REQUIREMENTS

Hardware requirements

Number Description Alternatives (If available)

1 PC with 2 GB hard-disk

and 256 MB RAM

Not-Applicable

Software requirements

Number Description Alternatives (If available)

1 Windows 95/98/XP with

MS-office

Not Applicable

2 Microsoft Access Not Applicable

3 JavaScript Not Applicable

4 HTML Not Applicable

INTERFACE SPECIFICATIONS

The system has the following interfaces

a) Login

1) User

2) Privileged

3) Supervisory

b) Control Management Tool window opens for different users

Status: Pending/Approved/Disapproved

Time: Today/Last 7 days/ Last 30 days/Last 60 days. Moderated by: All/{Different users}

'Search by' will only have the option to search a nickname in

all/pending/approved/disapproved category

'Current nickname' will show the most recent nickname of the

11

user.

If a nickname is marked 'Approve', it will be removed from the

pending list

If a nickname is marked 'Disapprove', it will be removed from the pending list, and the nickname is changed for that particular user, and the user is also informed about it.

When the ‘Status’ is set to Approved or Disapproved, a user will be displayed

Flow Diagrams

Flow CM Tool Sign-in

12

Flow-Sign-in checks

13

Flow – CM Tool(User)

14

Flow – CM Tool(Privileged User)

15

Flow – CM Tool (Supervisory User)

16

METHODOLOGY- OVERVIEW

PROBLEM SOLVING METHODOLOGY AND TECHNIQUES

Programs are not quick creations. In order to create an efficient and working program, one

needs to adopt proper problem solving methodology and use proper techniques.

The steps are:

1. UNDERSTAND THE PROBLEM WELL

To create a program, one must be totally aware of the problem. We must understand the

problem very well before attempting to design the program. Therefore a number of key

questions need to be answered:

What is required or desired out of the program to be designed.

What is it that is to be done to attain the desired results.

2. ANALYZE THE PROBLEM

The very first step is to carefully analyze the problems that the program should be able to

solve so that the applicable solution can be designed. Analyzing the problems involves

identifying the program specifications and defining each program’s minimum number of

inputs required for the correct output, and the processing components.

3. DESIGN PROCEDURE

In this step, the solution to the problem is planned. In this step, you are supposed to determine

the logical sequence of precise steps that solve that problem.

4. CODE THE PROGRAMS

Coding is the technical word for writing the program. In this step the algorithm is translated

into a programming language. While translating the algorithm into the programming

language,, we identify which structures are needed to attain the desired results. Also the

appropriate arithmetic and logical operators need to be decided.

5. TEST AND DEBUG THE PROGRAMS

17

Once the solution-algorithm has been coded, the next step is to testing and debugging it.

TESTING is the process of finding errors in a program, and DEBUGGING it is the process

of correcting those errors. Thorough testing is very important, because once the program is

put to use, users will rely on the program and its output, to support activities and decisions.

Thus the goal is to ensure that the program runs correctly and is error free.

6. COMPLETE THE DOCUMENTATION

Documentation is intended to allow another person or programmer at any later stage to

understand the program.

Internal documentation consists of statements in the program that is not executed, but points

out the purposes of the various parts of the program. Documentation might also consist of a

detailed description of what the program does and how to use the program. For commercial

purposes it may also include a user’s manual, but that is no needed for the current project.

7. MAINTAIN PROGRAMS

Maintaining programs involves modifying the programs to remove previously undetected

errors, to enhance the program with different features or functionality, or keep the program up

to date.

THE STEPS TO CREATE A WORKING PROGRAM:

Therefore the steps to create a working program are:

1. Understand the problem well.

2. Analyze the problem to

identify minimum number of inputs required for the output

identify processing components

3. Design the program by

Deciding step by step solution

Breaking down solution into simpler steps

4. Code the program by

Identifying arithmetic and logical operations required for solutions

Using appropriate control structures such as conditional or looping control

structure

18

5. Test and debug your program by

Finding errors in it

Rectifying the errors

6. Complete the documentation

7. Maintain the program

6.2 PROGRAM MAINTENANCE

Program maintenance refers to the modification of a program after it has been completed, in

order to meet changing requirements or to take care of the errors that show up. There are 4

kinds of maintenance:

1. Corrective maintenance: When a program after completion, is put to operations, some

errors might show up because of some unexpected situations, untested areas. Such

errors are fixed up and such maintenance is called corrective maintenance.

2. Adaptive maintenance: changes in the environment in which a system operates may

also lead to systems maintenance. To accommodate changing needs from time to time,

maintenance is done and is called adaptive maintenance.

3. Preventive maintenance: If possible errors are anticipated before they actually occur,

the maintenance done to avoid them and the system down time can be decreased.

Because this kind of maintenance aims at preventing the occurrence of errors it is

called preventive maintenance.

4. Perfective maintenance: If the existing system is maintained to keep attuned to the

new features, new facilities, new capabilities, it is said to be perfective maintenance.

PROPERTIES OF A SYSTEM EASY TO MAINTAIN:

1. The systems should be planned with an eye to the future.

2. User specifications should be correct.

3. The system should be modular.

4. Documentation should be complete.

5. Standards should be followed during developments.

6. Testing should be thorough.

7. Attention should be paid to the end users.

19

6.3 CHARACTERISTICS OF A GOOD PROGRAM

1. Effective and efficient: The program produces correct results and is faster, taking into

account the memory constraints.

2. User friendly: The program should be user friendly. The user should not be concerned

about what is happening inside the program. The program should interact with the user by

understandable messages and user’s work should be as low as possible. The user should be

only responsible for providing the input data values and everything else should be the

programs responsibility.

The output produced should also be easily understandable and presentable.

3. Self-documenting code: A good program must have self documenting code. The source

code that uses meaningful names for constant, variable and subprogram identifiers to clarify

their meaning in the program, is called a self documenting code.

4. Reliable: The program should be reliable i.e., it must be able to handle unexpected

situations like wrong data or no data. The program should display proper error message.

5. Portable: The program should be portable i.e., it should be able to run on different

platforms.

6.4 STAGES OF PROGRAM DEVELOPMENT:

1. Crack the problem: In the first stage, the problem is cracked and an algorithm is

formulated which gives the solution for the problem.

2. Code the simple steps: In this stage the steps are translated into a program (called

the source code) using the selected programming language. This process is called

coding. The coded program is then fed into the computer for further processing.

3. Compile the program: After feeding the program, the next step is to compile the

program. Compilation is a process to convert the source code (in the programming

language) into the object code (machine language). For compilation, the appropriate

compiler is used which can translate the program written in a specific programming

language.

4. Execute the program: After compilation, of an error free program, the program is

executed. This phase is called run time, the phase of program execution during which

20

the program instructions are carried out.

METHODOLOGY

I was instructed by my industry guide to use ECLIPSE platform. I made use of ECLIPSE IDE. Eclipse is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written primarily in Java and can be used to develop applications in Java and, by means of various plug-ins, other languages including C, C++, COBOL, Python, Perl, PHP, Scala and Ruby (including Ruby on Rails framework). The IDE is often called Eclipse ADT for Ada, Eclipse CDT for C/C++, Eclipse JDT for Java and Eclipse PDT for PHP. Eclipse employs plug-ins in order to provide all of its functionality on top of (and including) the runtime system, in contrast to some other applications where functionality is typically hard coded. The runtime system of Eclipse is based on Equinox, an OSGi standard compliant implementation.

This plug-in mechanism is a lightweight software component framework. In addition to allowing Eclipse to be extended using other programming languages such as C and Python, the plug-in framework allows Eclipse to work with typesetting languages like LaTeX, networking applications such as telnet, and database management systems. The plug-in architecture supports writing any desired extension to the environment, such as for configuration management. Java and CVS support is provided in the Eclipse SDK, with Subversion support provided by third-party plug-ins.

With the exception of a small run-time kernel, everything in Eclipse is a plug-in. This means that every plug-in developed integrates with Eclipse in exactly the same way as other plug-ins; in this respect, all features are "created equal". Eclipse provides plug-ins for a wide variety of features, some of which are through third parties using both free and commercial models. Examples of plug-ins include a UML plug-in for Sequence and other UML diagrams, a plug-in for DB Explorer, and many others.

The Eclipse SDK includes the Eclipse Java Development Tools (JDT), offering an IDE with a built-in incremental Java compiler and a full model of the Java source files. This allows for advanced refactoring techniques and code analysis. The IDE also makes use of a workspace, in this case a set of metadata over a flat filespace allowing external file modifications as long as the corresponding workspace "resource" is refreshed afterwards.

Eclipse implements widgets through a widget toolkit for Java called SWT, unlike most Java applications, which use the Java standard Abstract Window Toolkit (AWT) or Swing. Eclipse's user interface also uses an intermediate GUI layer called JFace, which simplifies the construction of applications based on SWT.

Language packs provide translations into over a dozen natural languages.

21

An Integrated Development Environment (IDE) also known as integrated design

environment or integrated debugging environment is a software application that provides

comprehensive facilities to computer programmers for software development. An IDE

normally consists of:

a source code editor

a compiler and/or an interpreter

build automation tools

a debugger

ECLIPSE IDE is based on Java 2 Platform, Enterprise Edition (J2EE), the standard platform

used to create Java-based multi-tier enterprise applications. It looks like

22

Web Pages are designed using HTML Technology.

Programming in JAVASCRIPT

I have done client side form validations using JAVASCRIPT

JavaScript Form Validation

JavaScript can be used to validate data in HTML forms before sending off the content to a server.

Form data that typically are checked by a JavaScript could be:

has the user left required fields empty?

has the user entered a valid e-mail address?

has the user entered a valid date?

has the user entered text in a numeric field?

It is the process of checking that a form has been filled in correctly before it is processed.

There are two main methods for validating forms: server side validations (using CGI scripts,

ASP etc), and client side (usually done using javascript).

USE OF SERVLETS

SERVLETS are Java programs running on a web server that produce results viewed remotely

on a web server. SERVLETS has the same purpose that CGI or PHP had in the past. I learnt

how SERVLETS works with some examples and also about Servlet Request and Response

Model, Servlet Life Cycle, Working of servlets in Weblogic.

A very basic example illustrating the use of server is

import java.io.*;

import javax.servlet.*;

import javax.servlet.http.*;

23

public class Myservlet extends HttpServlet

{

public void doGet(HttpServletRequest request, HttpServletResponse response) throws

ServletException, IOException

{

PrintWriter out=response.getWriter();

Out.println(“ Hello World”);

}

}

Here we:

Use javax.servlet.* and javax.servlet.http.*

Because to create a servlet, We must write a program that implements the

javax.servlet.Servlet interface. Most servlets implement this interface by extending either the

javax.servlet.GenericServlet class, which HttpServlet class, which provides extra

functionality needed by HTTP servlets and is implemented is implemented in the

javax.servlet package, or the javax.servlet.http. in the javax.servlet.http package.

And java.io.* header file is used to import all the input and output parameters and functions

available in the java library.

Use "request" to read incoming HTTP headers (e.g. cookies)

// and HTML form data (e.g. data the user entered and submitted)

Use "response" to specify the HTTP response line and headers

// (e.g. specifying the content type, setting cookies).

Use PrintWriter out = response.getWriter();

// Use "out" to send content to browser

HTTP request Methods

Use doGet-it is the simplest most used HTTP method.GET simply retrieves the data

24

identified be the URL. If the URL refers to a script ( CGI, servlet, and so on) , it returns the

data produced by the script.

Use doPost- like GET, POST method is also widely used. Typically, POST is used in HTML

forms. POST is used to transfer a block of data to the server in the entity body of the request.

These are the instructions we need to add for the normal functioning of any and every servlet.

Next comes the LOGIC part which deals with the condition as stated by the clients or the

requirements.

For instance if we simply want to print a string program execution continues with the

followinf statements..

out.println("Hello World");

the output of the above servlet program is a string Hello World.

THE javax.servlet Package

INTERFACE DESCRIPTION

Servlet the main interface that all servlets must

implement either directly or indirectly.

ServletConfig Represents a servlet configuration object

from which information,such as the servlet

name, initial parameters, and the

ServletContext object, can be obtained.

Filter This interface represents a filter. A filter

intercepts a request beforethe request is

handled and can perform task on the

request, the response , or both.

RequestDispatcher Defines an object that dispatches a request

to another dynamic resource, such as a or 25

a servlet or JSP Page.

ServletContext The ServletContext object is the interface

between the servlet container and a

servlet. One ServletContext object exists

for each web application per JVM. In

situations where the whole application

resides in the sane JVM,

theServletContext object can be used to

share global information that will be

available to any resource in the

application.

ServletContextAttributeListener A class implementing this interface is used

to receive notification of changes to the

ServletContext object’s attribute.

ServletContextListener A class implementing this interface is

usedto receive notification of changes to

the SerletContext object.

ServletRequest Represents a request from a web client.

ServletResponse Represents a response from the servlet to a

web client.

SingleThreadModel Tis interface is implemented by a servlet to

gurantee that the servlet handles only one

request at a time.

PICTORIAL REPRESENTATION OF A SERVLET26

LIFE CYCLE OF A SERVLET

The life cycle of a servlet is controlled by the container in which the servlet has been

deployed. When a request is mapped to a servlet, the container performs the following steps.

1. If an instance of the servlet does not exist, the Web container

a. Loads the servlet class.

b. Creates an instance of the servlet class.

c. Initializes the servlet instance by calling the init method. Initialization

27

covered in Initializing a Servlet.

Method used in initialization- public void init (ServletConfig config)throws

ServletException

2. Invokes the service method, passing a request and response object. Service methods

are discussed in the section Writing Service Methods.

Method used- public void services(ServletRequest req, ServletResponse res) throws

ServletException, IO Exception

3. If the container needs to remove the servlet, it finalizes the servlet by calling the

servlet's destroy method.

Destroy method- public void destroy();

A servlets/ JSP application architecture.

ACCESSING DATABASES WITH JDBC

1. The java.sql package

The java.sql package provides the API for accessing and processing data in a data

source. The most important members of the java.sql package are as follows:

The DriverManager class

28

The Driver Interface

The Connection interface

The Statement interface

The ResultSet interface

The PreparedStatement interface

The ResultSetMetaData interface

2. Register driver

3. Class.forName("org.postgresql.Driver")

4. Establish Connection

Connection con=DriverManager.getConnection(“jdbc:odbc:dsn”);

5. Create Statement

Statement st=con.createStatement();

6. Execute a Statement

ResultSet rs=st.executeQuery(“”);// if the database is expected to send back

some data.

int x=st.executeUpdate(“query”);// return int value, used for insertion and

deletion.

Boolean y=st.execute(query);//return Boolean

JAVA SERVER PAGES

JSP is an extremely powerful choice foe web development. JSP is a technology using

server-side scripting that is actually translated into servlets and compiled before they are

run. This gives developers a scripting interface to create powerful java servlets.

JSP pages provide tags that allow developers to perform most dynamic content operations

without writing complex java code. Advanced developers can add the full power of the

java programming language to perform advanced operations in JSP pages.

JSP contains following Scripting Elements.

29

I. DIRECTIVES

A. Page Directives

B. Include

C. Taglib

II. DECLARATION: for declaring expressions & variables. <% ! code%>

III. SCRIPLETS <% Scriplet %>

<% code%>

IV. EXPRESSION

<%=code %>

<%------------for comments in JSP>

LIFE CYCLE OF JSP

1) Translate JSP to Servlet code.

2) Compile servlet to byte code.

3) Load the sever class.

4) Create servlet instance.

5) Call the jspInit method.

6) Call the jspService method.

PAGE DIRECTIVE

javap javax.servlet.http.HttpJspPage//this package is used to import all the methods and

parameters included in servlets.

<% @ import=”java.util.*”%>//this page directive is used to import the utilities of java.util

package like date etc.

<% ! String name=”jsp.page”;

public int sum(int a, int b)

{

return(a+b);

}

%>

Program to get sum of 2 numbers using scriplet code in JSP

<% int a=sum(7,8);

30

out.println(“sum is :=+a”);

out.println(“string passed:==”+name);

%>

<br>

Today date:==

<% =new Date() %>

Program to print today’s date using date() function in the util package.

JSP IMPLICIT OBJECTS

1) Request

<%--------------

String x=request.getParameter(‘one”);

Int a=Integer.parseInt(x);

------------------ %>

This object is used when we want to get parameters say x or y.

2) Response

<%-------

response.sendRedirect(“url”);

------%></body>

This object will open the page given in the URL.

3) Out

it is used to describe data being sent to the output stream in response to a client

request. the output stream is exposed to the jsp author through the implicit out object.

The out object is an instantiation of a javax.servlet.jsp.JspWriter object.

4) PageContext

<%-------------------

JSPWriter xyz=pageContext.getOut();

xyz.println(“xyz”);

-----------------------%>

</body>

It is an implicit object used in try-catch block to get the output printed, if it is not used

then number format exception will occur.

31

5) Page

<% ! int y=90;//declaration

%>

<% int y=900;//scriplet

out.println(y);

out.println(this.y);

%>

<body>

it is used for declaration of variables and coding part of a JSP page.

<% @ page language=”java”;%>

out.println (“JSP is easy”);

%>

JSP container defines language to be used by default as java.

6) Session object

7) Config object

8) Exception object

9) Application object

SOME ATTRIBUTES

Info

<% @ page language=”java”; %>

<% out.println(“jsp is easy”); %>

<% @ page info=”written by any ” %>

<% out.println(getServletInfo()); %>

When used with expression tag it will be written as

<% =getServletInfo() %>

Whatever is declared inside it, it is retrieved using

getServletInfo()

Import

<% @ import=”java.io.*” %>

<% @ import=”java.util.Calendar” %>

The above page directive imports the java.utilCalendar class.

32

The buffer and autoFlush attributes

The buffer attribute determines whether the JSP page will be buffered, and the buffer

size if it is to be buffered.

The autoFlush attribute determines the page’s behaviour when the page buffer is full

or exceeded.

The errorPage and is ErrorPage attributes

The errorPage attribute specifies a url for forwarding exceptions.

The JSP page sent an exception by means of an errorPage attribute must have the page

attribute of is ErrorPage set to be “true”. By default it is set to “false”. If “true” an

explicit scripting variable called exception is created and referenced to the Throwable

error object from the source JSP object.

The is ThreadSafe attribute

It specifies the thread safety of the JSP page. By default it is true. When false the page

must deal with synchronization issues.

The session attribute

It is true by default.

javax.servlet.http.HttpSession is declared.

Session attribute must be made as false when it is not a part of the page, it

unnecessarily consumes the resources.

33

INCLUDE DIRECTIVE

<% @ include file=”first.html” %>

<% out.println(“in JSP page”);

%>

<% @ include file=”second.html” %>

This directive allows data from an external URL to be inserted into the current JSP page.

The data is included in the current JSP page before it is compiled because the include

directive inserts the data from the external URL at the translation time.

TAGLIB DIRECTIVE

It specifies a tag library by which the standard set of JSP tags can be extended.

STANDARD ACTION ELEMENTS

1) Include action

The include action inserts the data from the external URL at the request time in

contrast to the include directive.

< jsp-include……..>

It cannot affect other parts of the page.

2) The JavaBean actions

<jsp-useBean> attributes

id, scope, class, type, beanName

<jsp-setproperty> attributes

name, property, param, value

<jsp-getproperty>attributes

name, property

34

RESULTS AND DISCUSSIONS:

The project was successfully completed, the Tool is working properly with all the

functionalities running smoothly and with complete efficiency.

CONCLUSIONS:

It functions correctly on any system that meet the requirements given in the SRS.

The project is compatible with the processor provided in the SRS.

RECOMMENDATIONS

We can also use some designing software for the designing part.

REFERENCES

Books:

Complete reference by Herbert Shield

Books on web designing ,HTML etc.

Websites:

www.google.com

www.w3schools.com

www.onestoptesting .com

www.roseindia.net

35