jsp code for employee payroll

Ads

 
 
 

Share on Google+Share on Google+

pradeep
jsp code for employee payroll
1 Answer(s)      7 years 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
Ads
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

Ads









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
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
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?   <[email protected] 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?   <[email protected] import="java.sql.
jsp code
jsp code  what are the jsp code for view page in online journal
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  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
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 code  i want health management system project code using jsp.its urgent
EMPLOYEE - SQL
EMPLOYEE  CALCULATE EMPLOYEE SALARY  Hi friend, Please give the full details of Problem. Thanks
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
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 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 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
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
Tutorials   
Java Spring Hibernate Struts Training fat image from db fat image from db fat image from db fat image from db unable to get value returned from javascript variable in page How to change image size before adding to mysql using jsp Design a registration.jsp page with input for user registration details Cart Quantity jsp servlet coding issue servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? image pdf marking pdf marking Multiple image upload using JSP Read code from excel sheet and upload into database using JSP Student java about search engine Convert BLOB to PDF and save it to a location how to copy files from remote to local machine using SFTP SSL in java? Like Team viewer Socket and Servert -Jsp how to copy files from remote location to local using java? How To Store Multilple Images In MySQL database dynamically with image uploader and then retrieve them in image gallery using java how to create SOAP based web service in java? how to fetch data from mysql database table and draw a bar chart on that data using in jsp how to create users in LDAP using java? how to authenticate user using TIVOLI api in java? how to create users using IBM Tivoi API in jsp/servelet? Java/J2ee Please explain this code as many packages and classes are unknown to me .! how to download the uploaded folder files using jsp Login Query image is display from path of mysql database please reply the code to store dynamic fields in database? Reloading issue in jsp How to get Button Id ? calling one jap page from another jsp page login login Problem to get connection from DAO class to JDBC Page Loading Time Fix table's column's name row(1st row of the table) so that it does not move up when the table is scrolled up to view more rows below Sending hidden values

Ads

 
Advertisement null

Ads