jsp code for employee payroll

jsp code for employee payroll

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
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
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
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
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
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
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 - JSP-Servlet
jsp code  sample code for change password example Old Password: new Password: confirm Password
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
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-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
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  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 - 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
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
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
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
JSP Code  Create a html reader JSP tag that read the html page from a link and will display the contents on the JSP. Do not use include directive
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  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
jsp code - JSP-Servlet
jsp code  hi my requirement is generate dynamic drop down lists... statement? pls provide code how to get first selected drop down list value to generate second drop down list by using jsp? pls ?   Hi Friend
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
jsp code - JSP-Servlet
jsp code   the value did not passed from script and not inserted in to database in the code u given . var numberOfClicks = 0; function hello(){ numberOfClicks++; alert( numberOfClicks ); document.form1.text.value
JSP code - JSP-Servlet
JSP code  hi i want to clear text box fields after click on submit.... thanking u......... This is what my code is. Jam Name...;   Hi Friend, Try the following code: Jam Name
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  Hello Everybody, can anyone help me to findout the modules as i am developing a whiteboard application using jsp? this application is my dream application. Thank you
JSP Code - JSP-Servlet
JSP Code  Hi, Do we have a datagrid equivalent concept in JSP..., Please visit the following links: http://www.roseindia.net/jsp/data-grid.shtml http://www.roseindia.net/jsp/paging.shtml Thanks
jsp code - JSP-Servlet
jsp code  i want to add below code data in mysql database using jsp... using below code we got data in text box i want to add multiple data in database... Add/Remove dynamic rows in HTML table
JSP Code - JSP-Servlet
JSP Code  Hi, I have a problem in limiting the number of row... to display only 10 records per pages in jsp, then how can i achieve this concept... Rai.  Hi Friend, Try the following code: Pagination
jsp code - JSP-Servlet
jsp code  hello frns i want to display image from the database along... from database in Jsp to visit.... http://www.roseindia.net/jsp/retrieve-image.shtml http://www.roseindia.net/jsp/downloadimage.shtml Thanks
jsp code - JSP-Servlet
jsp code  hi i am doing project work i am generating time table for this i have taken form courseyear textbox semistername textbox no of periods... will be allotted to six days. pls send me code for this pls thankyou
jsp code - JSP-Servlet
jsp code  how to get multi-chat client using jsp? i will be very glad if i'd get an idea from you people. thank you .  Hi Friend, Chat server is a standlone application that is made up the combination of two
jsp code - Java Beginners
JSP code and Example  JSP Code Example
JSP code - JSP-Servlet
JSP code  Hi! Can somebody provide a line by line explanation of the following code. The code is used to upload and download an image. <... have successfully upload the file by the name of: Download /*Code
jsp code - JSP-Servlet
jsp code  i want to add and remove rows dynamically ... in that row 3 colums are there... first colum shows one number , second colum shows second... colum.  Hi Friend, Try the following code: Add/Remove
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
Jsp code - JSP-Servlet
Jsp code   function Calculate() { var fpval; var cityamt; var newspaper; var sizeval; var city = document.form.city.value; var noofwd = document.form.Count.value; var nofw
Jsp code - JSP-Servlet
Jsp code  PlaceAd.jsp function Calculate() { var fpval; var cityamt; var newspaper; var sizeval; var city = document.form.city.value; var noofwd = document.form.Count.value
database connectivity using jsp code
database connectivity using jsp code  i have two tables employee...),'bbbb','bbbb'); so this syntax is possible to use in jsp code based on employee id ename and designation are displayed how it is possible in jsp employee
insert code jsp to access
insert code jsp to access   insert code jsp to access
Need a jsp code
Need a jsp code  I need a jsp code in which when i select a value.....please help me for this.   The given code retrieves the employee name...)For the above code, we have created following table: CREATE TABLE `employee
JSP code for forget password
JSP code for forget password  I need forget password JSP code.. example http://www.roseindia.net/users/forgotpassword.html
jsp code for shopping cart
jsp code for shopping cart  please provide me the jsp code for online shopping cart
tree using jsp code
tree using jsp code  i want to draw a tree structure of a family hierarchy using jsp code

Ads