Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet jsp code for employee payroll

Have Programming Question? Ask it here!
 
 
 


pradeep
jsp code for employee payroll
1 Answer(s)      4 years and 5 months ago
Posted in : JSP-Servlet


jsp code for employee payroll. i need to generate the payslip with tax calucation and deductions,allwoance .how to calculate the employee tax using the jsp code

Advertisement
View Answers

April 13, 2010 at 1:13 PM


Hi Friend,

Try the following code:

1)employee.jsp:

<html>
<form name="form" method="post" action="payroll.jsp">
<table>
<tr><td>Employee Name:</td><td><input type="text" name="name">
<tr><td>Number of Hours worked in a Week:</td><td><input type="text" name="hours">
<tr><td>Hourly Rate:</td><td><input type="text" name="rate">
<tr><td>Enter federal tax withholding rate:</td><td><input type="text" name="federal"></td></tr>
<tr><td>Enter state tax withholding rate:</td><td><input type="text" name="state"></td></tr>
<tr><td><input type="submit" value="Submit">
</table>
</form>
</html>

2)payroll.jsp:

<%
String name=request.getParameter("name");
int hours=Integer.parseInt(request.getParameter("hours"));
double rate=Double.parseDouble(request.getParameter("rate"));
double federal=Double.parseDouble(request.getParameter("federal"));
double state=Double.parseDouble(request.getParameter("state"));
double grossPay= rate * hours;
double tax1=federal/100;
double federalTax= tax1 * grossPay;
double tax2=state/100;
double stateTax=tax2 * grossPay;
double deduction= federalTax + stateTax;
double netPay = (grossPay) - deduction;
%>
<html>
<table>
<tr><td>Employee Name:</td><td><input type="text" name="name" value="<%=name%>" disabled="disabled">
<tr><td>Number of Hours Worked:</td><td><input type="text" name="hours" value="<%=hours%>" disabled="disabled">
<tr><td>Hourly Rate:</td><td><input type="text" name="rate" value="<%=rate%>" disabled="disabled">
<tr><td>Enter federal tax withholding rate:</td><td><input type="text" name="federal" value="<%=federal%>" disabled="disabled"></td></tr>
<tr><td>Enter state tax withholding rate:</td><td><input type="text" name="state" value="<%=state%>" disabled="disabled"></td></tr>
<tr><td>Gross Pay:</td><td><input type="text" value="<%=grossPay%>" ></td></tr>
<tr><td>Total Deduction:</td><td><input type="text" value="<%=deduction%>" ></td></tr>
<tr><td>Net Pay (After Deductions):</td><td><input type="text" value="<%=netPay%>"></td></tr>
</table>
</html>

Hope that it will be helpful for you.
Thanks
Thanks


Related Tutorials/Questions & Answers:
jsp code for employee payroll - JSP-Servlet
jsp code for employee payroll  jsp code for employee payroll. i need... to calculate the employee tax using the jsp code  Hi Friend, Try the following code: 1)employee.jsp: Employee Name: Number of Hours worked
jsp code for employee attendance tracking system
jsp code for employee attendance tracking system  i need jsp code for employee attendance tracking system...it should contain date,login time,logout time,difference time in hour in separate fields..plz show the flow of detail
Advertisements
Employee Details - JSP-Servlet
Employee Details  Respected Sir/Madam, Thanks for your... else please provide me with some complete code as soon as possible bcoz i am... for specified operation. You can't write the code, which is written
how to calculate the employee tax - JSP-Servlet
how to calculate the employee tax  How to calculate the employee tax.Can u please send to me calculation tables
displaying employee records and their images problem - JSP-Servlet
displaying employee records and their images problem  hi, Thanks for your reply to my question. The code you sent to me yesterday was not working. it doesn't display any record and image. Please, help me out urgent
Payroll and Leave management system in java web application
Payroll and Leave management system in java web application  Hi Can any one help me with leave management and payroll management system sample source code. I need to develop as a web application(not any technology specification
retrive the employee details with image from mysql database using jsp servlet
retrive the employee details with image from mysql database using jsp servlet  im doing the web project to retrive the employee profile which i stored in the database using jsp servlet then want to show the result in the next jsp
HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILE USING JSP?
HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILE USING JSP?  HELLO SIR, CAN ANYONE HELP ME OUT HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILES,IF I ENTER 4 EMPLOYEE DETAILS(NAME,ID,SALARY,EMAIL) ALL THE DETAILS OF 4
how to auto generate number in jsp with the database connection mysql for employee number?
how to auto generate number in jsp with the database connection mysql for employee number?  how to auto generate number in jsp with the database connection mysql for employee number?   <%@page import="java.sql.
how to auto generate number in jsp with the database connection mysql for employee number?
how to auto generate number in jsp with the database connection mysql for employee number?  how to auto generate number in jsp with the database connection mysql for employee number?   <%@page import="java.sql.
web based java application for Leava and Payroll management system
web based java application for Leava and Payroll management system  Hello Team Good Morning, Can any one please help me with the source code for web based java application for Leava and Payroll management system. Thank you
jsp code
jsp code  what are the jsp code for view page in online journal
JSP CODE
JSP CODE  what is the code for downloading images from database using JSP?   Please visit the following link: http://www.roseindia.net/jsp/downloadimage.shtml
jsp code
jsp code  hi i am Ruchi can anybody plz tell me the jsp code... visit the following links: http://www.roseindia.net/jsp/user-search.shtml http://www.roseindia.net/servlets/search.shtml www.roseindia.net/jsp/searchbook.shtml
jsp code
jsp code  i want health management system project code using jsp.its urgent
employee records
employee records  Pl give one script like i will creat one table name... will enter New record and another form like emp_code query and update or delete and one report like details of employee thanks
employee records
employee records  Pl give one script like i will creat one table name... will enter New record and another form like emp_code query and update or delete and one report like details of employee thanks
employee records
employee records  Pl give one script like i will creat one table name... will enter New record and another form like emp_code query and update or delete and one report like details of employee thanks
Adding an employee
Adding an employee  coding for adding an employee
Add Employee
Add Employee  coding for adding an employee
application for an Employee
application for an Employee  hi , could any one help for coding in JSP-servlets.. the prob desc is : 1.INPUT:in the 1st page it should accept input...: in this page it should modify employee data and persist in DB 3.DISPLAY
JSP CODE
JSP CODE  Please help me as soon as possible.Its Urgent. I am working on my college ALUMNI PORTAL. I want to have a ADD FRIEND option in a user's profile. Please send me code
jsp code
jsp code  i want to jsp code which are working as,i have three drop down menu 1st menu for class second menu for subject and third menu as chapter... according to selectde menu,,,,please send me such type code,,,,plz help me
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
EMPLOYEE - SQL
EMPLOYEE  CALCULATE EMPLOYEE SALARY  Hi friend, Please give the full details of Problem. Thanks
jsp code - JSP-Servlet
jsp code  i want to design page into four pages 1) header to diplay 2) left page has to display hyperlink 3)right page has to display related page... : RoseIndia left:Add,delete right:employee Registration form Footer
jsp code - JSP-Servlet
jsp code  i want to design page into four pages 1) header to diplay 2) left page has to display hyperlink 3)right page has to display related page... : RoseIndia left:Add,delete right:employee Registration form Footer
Employee form
Employee form  In employee form emp Id id after any data iserted is incremented for oher data insertion. insert, delete, update buttons when we cleak the select buttoun then the created table data iserted automaticaly
JSP code
JSP code  I get an error when i execute the following code : <... = con.createStatement(); st.executeQuery(query); %> <jsp:forward page="address.jsp"></jsp:forward> HTTP Status 500 - type Exception report message
jsp code
jsp code  how to display date in drop down list by jsp thus the date start from current date and for next year it has to check leap year function to february then it display 30 for some months else 31 for other months
jsp code problem - JSP-Servlet
jsp code problem  Hi, I have employee details form in jsp. After... friend, Please give me detail and send me error code page. Please.... http://www.roseindia.net/jsp/ Thanks
employee progarm
employee progarm  Hai, I have developed a code for an employee program by using jtext fields and buttons,it has no errors but while we..." java.lang.NoClassDefFoundError: Emp/java".Why it is saying like this?The code which i developed
jsp code - JSP-Servlet
jsp code  Can anyone help me in writing jsp/servlet code to retrieve files and display in the browser from a given directory.  Hi Friend, Try the following code: Thanks
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
jsp code - JSP-Servlet
jsp code  sample code for change password example Old Password: new Password: confirm Password
jsp code - JSP-Servlet
jsp code  I need code for bar charts using jsp. I searched some code but they are contain some of their own packages. Please give me asimple code... friend, Code to solve the problem : Thanks
code in jsp
code in jsp  hi.. I had started a project on college admission system in which two operators has been introduced one is admin who can view all... want a code to sort a list of students on the basis of there 12% marks and AIEEE
jsp code - JSP-Servlet
jsp code  sample code to create hyperlink within hyperlink example: reservation: train: A/C department non A/c Department
jsp code - JSP-Servlet
jsp code  in a jsp a table is existed ,in table each row contain one checkbox and name and desription how to delete specific rows in a table .  Hi Friend, Try the following code: 1)form.jsp: Name
jsp code - JSP-Servlet
jsp code  how to count no of clicks made on a link and save it on database( using jsp)  Hi Friend, Try the following code: 1)click.jsp var numberOfClicks = 0; function hello(){ numberOfClicks
jsp code error - JSP-Servlet
jsp code error  I have a jsp page named "tMastDepartment".which has some table row containing text box like 'project code','Departmentcode','employee... there is the problem which i am facing.what will be the exact code
jsp code - JSP-Servlet
jsp code  in my table there are 3 fields named orderid ,itemname, itemqty. i want code that fetch orderid in dropdown... on select dropdown get table of item details of that orderid... there are multiple items at one orderid
JSP code - JSP-Servlet
me how to link these pages with each other using JSP..and how to write the code using JSP.. requriment for Newuser: 1>fname,lastname 2>Loginname...JSP code  hello,i working in project with JSP technology,i have one
store the employee ID,name,login time and logout time of the employee in database
JSP code for the same..i need it urgently..thanx   Please visit...store the employee ID,name,login time and logout time of the employee in database  hello...I want to store the employee ID,name,login time and logout
jsp code - Java Beginners
JSP code and Example  JSP Code Example
jsp code - JSP-Servlet
jsp code  how to write a code in jsp with out using servelts finding sum and avg of 40 numbers  Hi Friend, Try the following code: Thanks  Hi Friend, Do one change in the provided code.As we
Advertisements
 

 

 

DMCA.com