Disclaimer: This is an example of a student written essay.
Click here for sample essays written by our professional writers.

Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UKEssays.com.

The Existing System For Payslip Generation

Paper Type: Free Essay Subject: Information Technology
Wordcount: 5292 words Published: 15th May 2017

Reference this

The purpose of the proposed project is to automate the Payslip generation process which replaces the traditional system of Payslip generation that used to print the employee salary details onto a paper.

This project includes a single user who is authorized to initiate the application. The privileges are given only to the individual in a department who is responsible for generating the PaySlips for the employees.

The application takes in the Excel Spreadsheet as input and generates an encrypted PDF PaySlip for each employee. This PDF PaySlip is mailed to the respective employee by using their mail-id which is provided in the Excel sheet.

This application generates PaySlips of each employee every month. The PaySlip spreadsheet is uploaded to the system. The application uses an excel parser to read this spreadsheet. The excel parser parses the excel sheet in a row-wise fashion and generates an xml string for each row. This xml string contains the salary data of each employee. The salary data is converted into a password-protected PDF document as per a pre-defined template. These salary statements (in PDF) are emailed to respective users. The email process is logged.

Get Help With Your Essay

If you need assistance with writing your essay, our professional essay writing service is here to help!

Essay Writing Service

1.2 Existing System:

The existing System for PaySlip generation includes manual entry of the pay details of all the employees in an excel sheet and converting them to word document. Each row from the excel sheet is taken and then converted into the word document. This word document contains the Pay details of the employee. This document is printed on to a paper and then distributed to all the employees.

The Existing System requires manual effort in converting the excel sheet data into the word document. The word document which contains the salary details should be generated for all the employees which in turn delays the whole process of distributing the payslips. As the paper is used in distributing the payslips this even includes the wastage of paper. This is till the part of generation of pyslips itself. When talking about distribution each and every paslip has to be signed by the authority, stamped and then folded which is placed in the envelope.this has to be distributed to all the employee's near the desk has to take an acknowledgement that the employee has received by signing on paper. If the employee is not at the desk or out of station then distribution has to be postponed for that employee till he is available. That is he can't check it immediately after its been issued. Making it remotely accessible is also another aspect of it.

1.3 Proposed System:

The proposed System for generating the PaySlips is a Web based Automated System for generation and distribution of PaySlips.

Proposed System is efficient enough as it includes Less Manual effort. Manual effort is needed in only logging into the application and uploading the appropriate excel sheet into the application. Just a click on the upload button is sufficient, then the application itself will generate the payslips and distribute them to the respective employee's mailid. Optimal performance of the application is achieved as delay is reduced in generation of Payslips with the existing system. Paper conservation is achieved, as the PaySlips are sent to the employees through mails, This makes the payslip remotely accessible

2.1 Functional Requirements



Upload File

Excel Parser

PDF Generation


Module Description:

Authentication/Authorization Module:

This application is used to generate payslips of the employees for every month. Payslips, that depict all the salary details, is very confidential and hence this work should be carried out by an authorized person. For this purpose the user is presented with a login and is granted access to the application only after supplying a valid username and password. This needs database connectivity that stores all the details of the users who can use the application with their password.

This module is implemented using Struts. As this partitions the presentation and implementation the login UI is built using Java server pages. When the user submits the user name and password the servlet gets invoked handling the process that connects to the database, verifies and accordingly an action is taken that forwards to another UI.

Upload File:

This module uploads the Excel spread sheet into the application in which details of all the employees are present with the present month's salary details. The details of the employee includes the name, empid, designation etc .The Excel spread sheet that is needed to be uploaded should be in a specified format i.e., all the details should be in the same chronological order according to the specifications. The uploaded spread sheet will not be saved any where as the data in the Excel sheet is very confidential.

This module is implemented using Struts. The File Upload UI is built using Java server pages. When the user uploads an Excel file a servlet gets invoked handling the process that directs an action.

Excel Parser:

This module takes the uploaded excel sheet as input and parses it in a row wise fashion, organizes the data in xml format For this a special software tool is used In this module we also retrieve the employee-id, mail-id and month for which the payslip is generated.

The software tool used for parsing the Excel document is POI. This needs a POI.jar added in the library where some predefined methods are defined. The POI consists of APIs for manipulating various file formats based upon Microsoft's OLE 2 Compound Document format, and Office OpenXML format, using pure Java. In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. POI is your Java Excel solution (for Excel 97-2007).

However, we have a complete API for porting other OLE 2 Compound Document formats and welcome others to participate.

OLE 2 Compound Document Format based files include most Microsoft Office files such as XLS and DOC as well as MFC serialization API based file formats. Office OpenXML Format based files include the new (2007+) xml based file formats, including Microsoft office files such as XLSX, DOCX and PPTX.

PDF Generation:

This module creates a PDF file per employee based on pre-defined template and a randomly generated Password is used to encrypt the PDF file. This password is used by the employees to retrieve the PaySlips. The template is designed using XSL independently and values are taken from the Excel and filled into PDF using java. The PDF is encrypted using a random generated password and the password is attached to the mail. The encrypted PDF document is mailed to the employee.

The software tool used for generating a PDF document is XSL-FO. XSL-FO is a language for formatting XML data . XSL-FO stands for Extensible Stylesheet Language Formatting Objects . XSL-FO is a W3C Recommendation . XSL-FO is now formally named XSL . XSL-FO is an XML-based markup language describing the formatting of XML data for output to screen, paper or other media. Styling is both about transforming and formatting information. When the World Wide Web Consortium (W3C) made their first XSL Working Draft, it contained the language syntax for both transforming and formatting XML documents. Later, the XSL Working Group at W3C split the original draft into separate Recommendations. XSLT, a language for transforming XML documents . XSL or XSL-FO, a language for formatting XML documents. XPath, a language for navigating through elements and attributes in XML documents.

This is more advantageous because this seperates the presentation or template of the PDF and the implementation how the data is filled in.

Email Module:

This Module emails the Payslips (Password protected PDF files) to the respective employee by using their mail id. The mailing details are saved in a batch log with the time and date at which the mail is sent to the employee for verification. This module sets the mail attributes like the subject, from_address, to_address and message body. Also a partial random generated password is sent in the mails which need to be personalized by the employee. This module also inserts values into the email log with the details of mailing.

The Protocol used for mailing the PDF document to a particular employee is SMTP. The JavaMail API provides a platform-independent and protocol-independent framework to build mail and messaging applications.This is binded with Simple Mail Transfer Protocol for mailing.

2.2 Non-Functional Requirements


This application is easily accessible by the user who is authorized to use the system for generating PaySlips every month.


This system can generate PaySlips for any number of employees considering the same speed.


This system is consistent and performs required functions under stated conditions.


Unauthorized access to the system and its data is not allowed.

The person who wants to access the system is authenticated against a username and password. The PaySlip mailed to the employee is also password protected. This ensures unauthorized access of the PaySlip.


This system enhances usability by incorporating well structured user interfaces, end-user interactions, informative error messages etc.

2.3 System Requirement Specification:

Software Requirements:

Language: Java/J2EE

Operating system: Win 2000/XP or higher

Web Server: Apache Tomcat Server

Excel Parsers: POI(Poor Obfuscation Implementation)

PDF Generator Tools: XSL-FO(Extensible Style sheet Language-Formatting Object)

Back End: MySQL Database

Hardware Requirements:

Processor: P4 or higher

RAM: 1 GB or higher

Hard disk: 10 GB

3.1 Technical Architecture

A Technical Architecture breaks down operational (business) processes into functional components and capabilities. It describes the structure and behaviour of the technology infrastructure of an enterprise, solution or system.

The following diagram depicts functional components of the application.


Web Container



PaySlip Generation System

The web container in detail handles the following operations as depicted in the following diagram

As the web container receives the request from the browser it invokes the parser functionality and does the excel parsing row-wise and generates an xml String. The string data is used in generating the PDF. These PDF's which are generated are mailed to the respective employee's by the mailer component. The entire email process is logged in a file.

Once the application is deployed in the server we can access it locally or from remote using public IP or giving some domain name to the application.

3.2 Software Architecture

Software architecture alludes to the overall structure of the software and the ways in which the structure provides conceptual integrity for a system. In the simplest form software architecture is the hierarchical structure of program components (modules), the manner in which these components interact and structure of data that are used by these components. The software architecture of a program or computing system is the structure or structures of the system, which comprise software components, the externally visible properties of those components, and the relationships between them.

4.1 Design Objectives:

Design is the first step in the development phase of a process or system in sufficient details to permit its physical realization.

Without design specifications, the design will be unguided.

It is difficult to know when the process is complete and to measure the progress.

Design is used to plan what information needs to be displayed and entered and how it relates to other information.

Design is the only way to translate the requirements into a finished system.

A well designed program will be easier to implement, distribute and maintain.

4.2 UML Diagrams

4.2.1 Usecase Diagram:

4.2.2 Class Diagram:

4.2.3 Sequence Diagram:

4.2.4 Collaboration Diagram:

4.2.5 Activity Diagram:

4.3 Data Flow Diagrams:

Level - 1

4.4 Database Design:

4.4.1 E-R Diagrams

4.4.2 Database Tables:

Database Tables:

5.1 Pseudo Code

Login Module

Login form:

public class LoginForm extends ActionForm


/**Declare two string variables that holds the username and password values entered in the form

Define getter and setter methods **/


Login Action:

public class LoginAction extends Action


Public ActionForward execute(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception


/**Create an object to the login form

Retrieve the username and password entered in the form and save in some variables

Create an object for the implementation and call the function validate() with the retrieved username and password as arguments


Depending on its return value forward the action to success page or failure page**/


Login Interface:

public interface LoginDAO


/**Declare th method validate(string , string)**/


Interface Implementation:

public class LoginDAOimpl extends BaseDAO implements LoginDAO





Validate ()


/**Declare two string variables that holds the values of the username and password from he database

Get the connection to the database using the predefined method in java

Retrieve the username and password from the database using a SQL query(select)

Compare both username, password from form and database

Return a Boolean value according to the comparision**/




<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

CTE Pay Slip Generation System - Employee Login


UserName :
Password :

Upload File Module:

Upload form:

public class UploadForm extends ActionForm


/**Define a variable file of type file

Also define the getter and setter methods **/


Upload Action:

public class StrutsUploadAction extends Action


public ActionForward execute


ActionMapping mapping,

ActionForm form,

HttpServletRequest request,

HttpServletResponse response) throws Exception


/** If the token is valid then

Create an object for upload form to retrieve parameters like contentType, fileName, fileSize.

Create an object to interface to all the method parseExcel(file)

Return success


Return failure **/


<%@ page contentType="text/html;charset=UTF-8" pageEncoding="utf-8" language="java" %>

<%@ page import="org.apache.struts.action.Action"%>

<%@ page import="org.apache.struts.taglib.html.Constants"%>

<%@ taglib uri="struts-html" prefix="html" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

CTE Pay Slip Generation System - Employee Login

File Upload

Select File

Upload interface:

public interface PaySlipDAO {

declare a method parseExcel()


/**Upload interface implementation(Excel Working and PDF Generation Modules **/


public class PaySlipDAOImpl extends BaseDAO implements PaySlipDAO





public String parseExcel(String fileName) throws Exception


Define a String array str[]={"sno","month","NoofDays","empid","empname","desg","Basic","HRA",……}

That defines the sequence in which Excel file should be in.

/**Define a string variable that holds the root tag declare an input stream and initialize it to null now define a new input stream and initialize it to file (Excel file)

initialize POIFSFileSystem to inputstream define a new HSSFworkbook

get the sheet count get the sheet with count zero

iterate the rows if the sheet has rows then

iterate the cells from that retrieve the 4th,2nd and 21st cell values.

4-mployeeid 2-month 21-Email id

For every cell value append the opening tag using the string array**/

/**According to the cell value get the value





After adding the value append the closing tag

Like wise iterate till all the cells are completed

At the end append the closing root tag

With this we are ready with our xml string.

Using this xml string as the argument make the call to the generatPDF()

Return empid's of employees for whom the mail is sent and to whom the mail is not sent with a # appended in between.**/


PDF Generation Module:

public int genPDF( HSSFCell empid,

HSSFCell mailid,

HSSFCell monthyear,

String xmlStr )

/**Set the path of the base directory to the current directory

Define a file in which we save the xslt file that is used in designing the payslip

Also define a PDF file with parameters like where to save(current directory),with what name(employee-id) and with what extension(.pdf)

Create new instances for fop factory and fo user agent

Get the random generated password which is of six characters length

Now define two random numbers and retrieve th characters at that ndex in the employee id

Append these two characters to the random generated password

Encrypt the pdf using method PDFEncryptionParams() and set the Boolean parameters like allow print, allowCopyContent, allowEditContent, allowEditAnnotations and also the keys to encrypt

configure foUserAgent as desired.

Setup output.

Construct fop with desired output format

Setup XSLT

Setup input for XSLT transformation

Resulting SAX events (the generated FO) must be piped through to FOP

Start XSLT transformation and FOP processing**/

/**Call the sendmail method by creating its object

Save the returnvalue in a variable

If that is equal to one then save that email id as sentmailid and append all other of this kind in the Excel sheet to this**/

/**If that's is equal to zero save that email id as failedmailid and append all others of this kind in the Excel sheet to this

After mail is sent save that in the log using the user defined method

insertIntoEmailLog (mailid, monthYear,status)**/ }

private void insertIntoEmailLog(HSSFCell mailid, String monthYear, int status)


/**Get the data base connection

Insert into table the values of status,month nd the mailed**/


public static String getPassword(int n)


/**Generate n random characters may it be alphabets(upper and lower),numbers and symbols

Return a string of length n characters**/


MailService Module:

public class MailService


MailService ();



/**Define the host, transport_protocol, authentication needed, debugging needed etc.**/

public int sendMail(String empId,String monthYear,String emailid,byte[] pdfBytes,String randompwd,int randomposition1,int randomposition2)


/**Set the parameters like frommail, tomail, subject, messagetext, content type etc

Define a new mail session

Declare a new MIMEmessage() for this mail session

set the source to PDF bytes

send that message as mail to the tomailid**/




<%@ page contentType="text/html;charset=UTF-8" pageEncoding="utf-8" language="java" %>

<%@ taglib uri="struts-html" prefix="html" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

CTE Pay Slip Generation System - Employee Login


response.setHeader("Cache-Control","no-cache"); //HTTP 1.1

response.setHeader("Pragma","no-cache"); //HTTP 1.0

response.setDateHeader ("Expires", 0); //prevents caching at the proxy server

response.setHeader("Cache-Control","no-store"); //HTTP 1.1


Invalid username or password Please

Try Again


<%@ page contentType="text/html;charset=UTF-8" pageEncoding="utf-8" language="java" %>

<%@ taglib uri="struts-html" prefix="html" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

CTE Pay Slip Generation System - Employee Login


response.setHeader("Cache-Control","no-cache"); //HTTP 1.1

response.setHeader("Pragma","no-cache"); //HTTP 1.0

response.setDateHeader ("Expires", 0); //prevents caching at the proxy server

response.setHeader("Cache-Control","no-store"); //HTTP 1.1



Cite This Work

To export a reference to this article please select a referencing stye below:

Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.

Related Services

View all

DMCA / Removal Request

If you are the original writer of this essay and no longer wish to have your work published on UKEssays.com then please:

File Successfully Uploaded


String maildata = (String)request.getAttribute("emailEmpId");

int splitCount= maildata.indexOf("#");

String sentEmailIds=maildata.substring(0,splitCount);

String failedEmailIds=maildata.substring(splitCount+1,maildata.length());


EMail sent to:
EMail failed to: