Friday, 12 April 2013

JSP PROGRAM TO CALCULATE INCOME TAX, LOGIN AND DATA CAPTURE



CALCULATE INCOMETAX

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Calculate Interest JSP</title>
</head>
<body>
<%
String fname = request.getParameter("fname");
String lname = request.getParameter("lname");
String gender = request.getParameter("gender");
String profession = request.getParameter("profession");
String prefix = " ";
if (gender.equals("Male")) { prefix = "Mr."; }
else if (gender.equals("Female")) { prefix = "Ms."; } %>
<FONT COLOR = "Blue">Hello <%=prefix %>&nbsp;<%=fname%>&nbsp;<%=lname%> &nbsp; who works in a <%=profession %></FONT>
<% String sincome = request.getParameter("income");
float income = Float.parseFloat(sincome);
out.println("<BR>Your Annual Income is <FONT COLOR = Blue> " +income + "</FONT>");
float tax;
float diff;
if(income <= 100000)
{
out.println("<BR>You are below the Tax Bracket!!");
}
else if(income >100000 && income <= 200000)
{
out.println("<BR>Your Tax Bracket is between Rs.1,00000 to Rs.2,00000");
out.println("<BR><B><U> Tax Rule: </U></B>10% of income above Rs.1 Lakh");
diff = income - 100000;
tax = (float)0.1*diff;
out.println("<BR>Tax to be paid is <FONT COLOR = Blue> "+tax+ "</FONT>");
}
else if(income >200000 && income <= 300000)
{
out.println("<BR>Your Tax Bracket is between between Rs.1,00000 to Rs.3,00000");
out.println("<BR><B><U>Tax Rule: </U></B> 10% of income upto Rs.1 Lakh and 20% of rest of income");
diff = income - 200000;
tax = (float)0.2*diff + (float)0.1*100000;
out.println("<BR>Tax to be paid is <FONT COLOR = Blue> "+tax+ "</FONT>");
}
else if(income >100000 && income <= 400000)
{
out.println("<BR>Your Tax Bracket is between Rs.1,00000 to Rs.4,00000");
out.println("<BR><B><U>Tax Rule: </U></B>10% of income upto Rs.1 Lakh 20% of income upto Rs.3 Lakh and 30% of rest of income");
diff = income - 300000;
tax = (float)0.3*diff + (float)0.2*200000 + (float)0.1*100000; 
out.println("<BR>Tax to be paid is <FONT COLOR = Blue> "+tax);
}
else if(income > 400000)
{
out.println("<BR>You fall in the tax bracket greater than Rs.4,00000");
diff = income - 400000;
tax = diff + (float)0.3*300000 + (float)0.2*200000 + (float)0.1*100000; 
out.println("<BR><B><U>Tax Rule:</U></B> 10% of income upto Rs.1 Lakh 20% of income upto 3Lakh, 30% of income upto Rs.4 lakh and 100% of rest of income");
out.println("<BR>Tax to be paid is <FONT COLOR = Blue> "+tax+ "</FONT>");
}//end if  %>
</body>
</html>



DATA CAPTURE

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import = "java.util.* , java.text.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%!
HashMap hm;
String uname;
String pwd;
Map.Entry entry;
%>
<%
boolean login = false;
hm = new HashMap();
uname = request.getParameter("username");
pwd = request.getParameter("password");
hm.put("Archie","Riverdale");
hm.put("Haddock", "Marlinspike");
hm.put("Hermione","Hogwarts");
Set s = hm.entrySet();
Iterator it = s.iterator();
while(it.hasNext())
{
entry = (Map.Entry) it.next();
if(uname.equals(entry.getKey()) && pwd.equals(entry.getValue()))
{
login=true;
}
}//end while
if(login==true)
{
out.println("<B><FONT COLOR = Blue>");
out.println("Welcome </FONT></B>");
out.println(uname);
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = new Date();
out.println("<BR><FONT COLOR = Green>");
out.println("Today is </FONT>"+dateFormat.format(date));
%>
<form action="CalculateInterest.jsp" method = "post">
<FONT COLOR = "Magenta"> First Name:</FONT>
<input type = "text" size = "15" name = "fname">
<br>
<FONT COLOR = "Brown">Last Name: </FONT>
<input type = "text" size = "15" name = "lname">
<br>
<FONT COLOR = "Purple">Select your Place of Work:</FONT>
<br>
<select name="profession" size="3">
  <option>IT Company</option>
  <option>Private Bank</option>
  <option>Insurance Company</option>
</select>
<br>
<input type="radio" name="gender" value="Male"> Male<br>
<input type="radio" name="gender" value="Female" checked>Female<br>
<br>
<FONT COLOR = "Red"> Annual Income(in Rupees):</FONT>
<input type = "text" size = "15" name = "income">
<br>
<br>
<input type = "submit" value = "Calculate Tax">
</form>
<%
}
else
{
%>
<jsp:forward page="Login.jsp">
  <jsp:param name="FailReason" value="Wrong Username or Password"/>      
</jsp:forward>
<%
}
%>
</body>
</html>



LOGIN


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login Page</title>
</head>
<body>
<form action="dataCapture.jsp" method = "post">
User Name:
<input type = "text" size = "15" name = "username">
<br>
Password:
<input type = "password" size = "15" name = "password">
<br>
<input type = "submit" value = "Login">
</form>
<%
String reason =  request.getParameter("FailReason");
if(reason !=null)
out.println(reason); %>
</body>
</html>









55 comments:

  1. Informative post! Thank you for sharing. If wondering how to calculate income tax online, reach out to the the companies online calculating and providing options for online payment of taxes. Confirm their ratings before hiring their services.

    ReplyDelete
  2. Tucson has over 25 different bed and breakfasts that you can choose from. They are located either in the downtown or a few miles away from the city center. However most of these are fine Tucson Tax options and you can get the best in class service.

    ReplyDelete
  3. Fathers' Day is celebrated on the third Sunday of June. It is a day set aside to honor fathers everywhere, whether they are the new father of a baby who is too young to say thank you by themselves, the proud patriarch of a young family, or the father of grown children who have flown the nest but still choose to remember him on that day.
    Celebrate Father’s Day

    ReplyDelete
  4. I was more than happy to uncover this great site. I need to to thank you for your time due to this fantastic read!! I definitely enjoyed every bit of it and I have you bookmarked to see new information on your blog. Traveling Captions This is the right blog for anyone who would like to find out about this topic. You understand so much its almost tough to argue with you (not that I really will need to…HaHa). You definitely put a new spin on a subject which has been written about for many years. Great stuff, just excellent! 365 casino

    ReplyDelete
  5. I would like to convey my admiration for your generosity in support of men and women that have the need for help with this particular concern. Your special dedication to getting the message all over had been wonderfully productive and have all the time made professionals much like me to attain their dreams. Your own invaluable tutorial means a great deal to me and additionally to my office workers. Thank you; from everyone of us. Happy Friendship Day Jokes Groom

    ReplyDelete
  6. There is numerous separate years Los angeles Weight reduction eating plan with each a person is a necessity. The pioneer part can be your original getting rid of belonging to the extra pounds. la weight loss pandora apk unlimited [url=https://androidapkwala.com/pandora-apk/]pandora apk unlimited[/url]

    ReplyDelete
  7. I’d have to examine with you here. Which isn’t something I usually do! I take pleasure in studying a publish that can make individuals think. Additionally, thanks for permitting me to comment!
    pinoy lambingan dailymotion

    ReplyDelete
  8. If you are getting ready to start up a new business, or if you have already done so, it is important that you understand the areas where business and law intersect and rely on one another. There are a wide variety of potential legal situations that business owners might find themselves in when starting sky payday loan
    business or growing an existing one. Because the average person might not be aware of the minute details of business law, they could end up facing severe financial consequences.

    ReplyDelete
  9. Although my area of expertise is in the Internet Marketing niche, as I was writing this article, I noticed the information would also work for traditional start up businesses as well. You will notice there are no references to Internet Marketing, etc. This is because I also wanted to share this information with anyone who is planning on starting a "traditional, brick and mortar" business. But the information contained here also applies to my friends who opt to go with the convert money online of online marketing as well. In this article, we focus on the initial planning steps of getting your business up and ready to open.

    ReplyDelete
  10. Leaders, if you do not understand how to strengthen the building blocks in https://cad.cheapsoftwaredownload.net/catia.html business, you cannot grow as fast as you would like. Take a step back and evaluate whether the current state of your business processes are 'solid' enough to expand to the next level of growth in the marketplace.

    ReplyDelete
  11. Hey dude, what kind of wordpress theme are you using? i want it to use on my blog too .     Download Spotify Premium APK

    ReplyDelete
  12. I’ve been which means to publish about something like this particular on a single of our weblogs which features provided me a thought. Thanks. Happy New Year Sms 2020

    ReplyDelete
  13. Pleased to determine this website is useful on my small iPhone , every little thing I want to do can be well-designed. Thanks for keeping it up currently using the newest. Happy New Year Sms 2020

    ReplyDelete
  14. I bookmared your site a couple of days ago coz your blog impresses me.`,,,~ Happy New Year Sms 2020

    ReplyDelete
  15. Good day. Very cool website!! Guy .. Beautiful .. Wonderful .. I’ll bookmark your blog and take the feeds additionally…I’m glad to find so much helpful information right here within the article. Thank you for sharing… Happy New Year Sms 2020

    ReplyDelete
  16. In the great pattern of things you secure an A+ with regard to effort and hard work. Exactly where you confused me personally was in all the facts. You know, it is said, the devil is in the details… And that could not be much more true at this point. Having said that, allow me say to you what did deliver the results. Your writing can be rather persuasive and that is most likely why I am taking an effort to opine. I do not really make it a regular habit of doing that. Secondly, even though I can easily see the leaps in reasoning you come up with, I am not confident of just how you seem to unite your ideas which in turn make your final result. For the moment I will subscribe to your position but hope in the near future you actually connect the dots much better. Happy New Year Sms 2020

    ReplyDelete
  17. Great post, you have pointed out some excellent points, I as well believe this is a very superb website. yahoo mail login in sign in

    ReplyDelete
  18. We all like the idea of having control over our time, working when we want and how we want to, and doing things at our own pace. These are good reasons to start your very own business. Then again, you may wonder what kind of business you should go into. how to buy coreldraw online

    ReplyDelete
  19. I discovered your blog website on google and check several of your early posts. Continue to keep the top notch operate. I additional increase your Feed to my MSN News Reader. Seeking toward reading a lot more of your stuff at a later time!… cheap software

    ReplyDelete
  20. Financing for film, television and animation credits in Canada. Information on how owners of productions in film, TV, and digital animation can supplement the financing of their projects via film tax credits Canada. Film tax credits play a key role in entertainment finance in the Canadian marketplace. warrant vs option

    ReplyDelete
  21. Excellent blog! Do you have any tips and hints for aspiring writers? I’m planning to start my own website soon but I’m a little lost on everything. Would you advise starting with a free platform like WordPress or go for a paid option? There are so many choices out there that I’m totally confused .. Any suggestions? Many thanks! 먹튀디비

    ReplyDelete
  22. writing is my passion that is why it is easy for me to do article writing in less than a hour or so’ 먹튀

    ReplyDelete
  23. When talking about business related issues, solutions, and technologies, you will almost always group businesses as small and large. While the separation is there, it won't be wrong to say that in a modern where digital technologies prevail, it should not be a problem for small businesses to compete with large ones. YOUTUBE

    ReplyDelete
  24. Initial Coin Offerings (ICOs) are a hot trend in today's cryptocurrency ecosystem. New blockchain-based digital assets and applications are using ICOs to quickly raise funds for their development. If you're wondering what is an ICO, we'll discuss that in detail, as well as some successful and relevant examples. amazon

    ReplyDelete
  25. How Your Firm Can Qualify And Access P O Trade finance;Information on how Canadian business owners and financial managers can access purchase order financing. How P O Finance works in the Canadian trade finance arena. Qubittech

    ReplyDelete
  26. How Your Firm Can Qualify And Access P O Trade finance;Information on how Canadian business owners and financial managers can access purchase order financing. How P O Finance works in the Canadian trade finance arena. earn bitcoin for free

    ReplyDelete
  27. เหล็กดัดเชียงใหม่ ( chiangmai Wrought iron ) รับติดตั้ง ประตูเหล็กดัด เหล็กดัดหน้าต่าง เหล็กดัดอิตาลีเชียงใหม่ มุ้งลวดเหล็กดัด มุ้งจีบ งานกระจก อลูมิเนียม กันสาด ทุกรูปแบบ มุ้งลวดเหล็กดัดเชียงใหม่

    ReplyDelete
  28. Information on purchase order financing in Canada. How does P O finance and financing inventory work for firms with contracts and orders that cant be financed via your bank. Payday Loans Near Me

    ReplyDelete
  29. For a successful business, it is essential to do right marketing, especially when online. There are some really effective marketing methods, which give extraordinary results if applied. Due to huge competition in online market, every business owner tries to apply different and unique strategies to get valuable clientele to his/her website. To get this new and innovative change many businesses have followed an impressive way of social media marketing (SMM) to boost their products/services sales online. email template builder

    ReplyDelete
  30. How Your Firm Can Qualify And Access P O Trade finance;Information on how Canadian business owners and financial managers can access purchase order financing. How P O Finance works in the Canadian trade finance arena. UnitedFinances.com offer 500 dollar loan no credit check

    ReplyDelete
  31. Are you having a financial business website? Are you happy with the return of your investment in developing the website? I mean to say is the site focused to showcase your business? If the case is otherwise, you are in need of one of the best finance website templates. There are many excellent finance web templates available in the template shops. The matter of success hides inside your wise decision. سعر البيتكوين

    ReplyDelete
  32. How Your Firm Can Qualify And Access P O Trade finance;Information on how Canadian business owners and financial managers can access purchase order financing. How P O Finance works in the Canadian trade finance arena. url shortener

    ReplyDelete
  33. I ran across your site last week and started to follow your posts consistently. I haven’t commented on any kind of blog site just yet but I was considering to start soon. It’s truly exciting to actually contribute to an article even if it’s only a blog. I really don’t know exactly what to write other than I really loved reading through a couple of of your articles. Great articles for sure. I will keep visiting your blog regularly. I learned a lot from you. Thanks! jewelry stores dallas

    ReplyDelete
  34. The lease equipment financing industry in Canada has a self governing body called the CFLA - Canadian Finance and Leasing Association. Its U.S. equivalent organization recently put out a report on business financing availability and optimism - Let's look at some of the key highlights of the report and try and put some Canadian flavor to them! 5paisa share price

    ReplyDelete
  35. Social media marketing is a whirlwind of activity for big, small and home businesses alike. Everyone is jumping on the Facebook and Twitter bandwagon. But what are the real benefits to your business bottom line. Here we examine six ways to assess impact on your business in terms of making money online from your social networking efforts. smm panel

    ReplyDelete
  36. You've shared some incredibly useful information about Smm reseller panel. This is frequently a terrific way for us to broaden our knowledge while remaining useful. Thank you for bringing this article to our attention.

    ReplyDelete
  37. Are you having a financial business website? Are you happy with the return of your investment in developing the website? I mean to say is the site focused to showcase your business? If the case is otherwise, you are in need of one of the best finance website templates. There are many excellent finance web templates available in the template shops. The matter of success hides inside your wise decision. refinance auto loans

    ReplyDelete
  38. The world of video games is creative beyond imagination; quite literally so! The PlayStation, Game Boy or even a smartphone is like a portal that opens into an astonishing universe. But what is most astonishing is that irrespective of country, creed, colour or language, gamers the world over are playing the same games. Niche: binomo

    ReplyDelete
  39. I am grateful for this blog to distribute knowledge about this significant topic. Here I found different segments and now I am going to use these new instructions with new enthusiasm. Smm panels

    ReplyDelete
  40. Mining ibelink for sale with worldwide delivery. We are a team of professionals with experience in Blockchain Management, Offline Sales, and Cryptocurrency Mining. Innosilicon g32 grin miner and best miner for lyra2rev2. As experts in Asic mining rigs for sale, we are specialists in reselling Antminer hardware since 2017! We exclusively sell products of the manufacturer and brand Bitmain so we can offer you great service and the best online pricing. ibelink, ibelink Asic, ibelink bm-k1, bitmain antminer s13 pro, bitcoin miners.

    ReplyDelete
  41. An online business directory is a website submission service that allows your small business's website to be added to a specific category where it can be searched for by interested visitors. These searchable online directories allow their visitors to search for websites and businesses that they find interesting or that they want to learn more about. Listing your small business on an online directory increases your website's visibility on the web and helps to create inbound links to your business' website. Online directories make it easy for people to find what they are looking for. All they have to do is jump online, which means that people could find your business' website from their home, office or even while traveling. Bitcoin news

    ReplyDelete
  42. When most people think of cryptocurrency they might as well be thinking of cryptic currency. Very few people seem to know what it is and for some reason everyone seems to be talking about it as if they do. This report will hopefully demystify all the aspects of cryptocurrency so that by the time you're finished reading you will have a pretty good idea of what it is and what it's all about. abra app

    ReplyDelete
  43. When most people think of cryptocurrency they might as well be thinking of cryptic currency. Very few people seem to know what it is and for some reason everyone seems to be talking about it as if they do. This report will hopefully demystify all the aspects of cryptocurrency so that by the time you're finished reading you will have a pretty good idea of what it is and what it's all about. wazirx

    ReplyDelete
  44. When most people think of cryptocurrency they might as well be thinking of cryptic currency. Very few people seem to know what it is and for some reason everyone seems to be talking about it as if they do. This report will hopefully demystify all the aspects of cryptocurrency so that by the time you're finished reading you will have a pretty good idea of what it is and what it's all about. bybit referral code

    ReplyDelete
  45. So, you want to start a plumbing business. This could be a terrific decision, or, it could be the worst idea ever. Starting a plumbing business, or any business really, involves a certain amount of structured thinking to put everything in place, and making sure that you have thought of everything. prize bond list

    ReplyDelete
  46. Do you want to improve the performance of your business? Of course you do! Maybe you're unsure where to start, or how to go about it. This checklist of questions will give you a good overview of your business's strengths, weaknesses and areas that need improvement. You may find some of them tough - or a little confronting - but be honest! The path to improving your business performance starts today. 9janews

    ReplyDelete