-
大小: 392KB文件类型: .rar金币: 1下载: 0 次发布日期: 2021-06-05
- 语言: 其他
- 标签: JavaWebMVC
资源简介
一个简单的基于MVC的Web应用程序,功能是个人工资所得税计算器。包括一个基于MVC的设计文档和相应的可运行的程序。
代码片段和文件信息
package fm.action;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import fm.service.Computer;
/**
* Servlet implementation class Control
*/
@WebServlet(“/Control“)
public class Control extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Control() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
doPost(requestresponse);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
String num1=request.getParameter(“num1“);
String num2=request.getParameter(“num2“);
String num3=request.getParameter(“num3“);
Computer com=new Computer();
String tax=com.compute(num1 num2 num3);
request.setAttribute(“num1“ num1);
request.setAttribute(“num2“ num2);
request.setAttribute(“num4“ tax);
request.setAttribute(“num5“ Double.parseDouble(num1)-Double.parseDouble(tax));
request.getRequestDispatcher(“/TaxCalculator.jsp“).forward(request response);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 846 2015-03-19 11:10 TaxCalculator\.classpath
文件 1046 2015-03-26 08:54 TaxCalculator\.project
文件 503 2015-03-19 11:06 TaxCalculator\.settings\.jsdtscope
文件 99 2015-04-02 23:31 TaxCalculator\.settings\org.eclipse.core.resources.prefs
文件 364 2015-03-19 11:06 TaxCalculator\.settings\org.eclipse.jdt.core.prefs
文件 491 2015-03-26 08:54 TaxCalculator\.settings\org.eclipse.wst.common.component
文件 345 2015-03-19 11:06 TaxCalculator\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2015-03-19 11:06 TaxCalculator\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2015-03-19 11:06 TaxCalculator\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 1706 2015-04-08 21:55 TaxCalculator\src\fm\action\Control.java
文件 2201 2015-04-08 21:53 TaxCalculator\src\fm\service\Computer.java
文件 111 2015-03-30 09:38 TaxCalculator\WebContent\css\MyCss.css
文件 39 2015-03-19 11:06 TaxCalculator\WebContent\me
文件 1799 2015-04-08 21:56 TaxCalculator\WebContent\TaxCalculator.jsp
文件 1891 2015-04-03 06:55 TaxCalculator\WebContent\WEB-INF\classes\fm\action\Control.class
文件 2065 2015-04-03 07:17 TaxCalculator\WebContent\WEB-INF\classes\fm\service\Computer.class
文件 20682 2015-03-19 09:16 TaxCalculator\WebContent\WEB-INF\lib\jstl.jar
文件 393259 2015-03-19 09:16 TaxCalculator\WebContent\WEB-INF\lib\standard.jar
文件 656 2015-03-26 08:54 TaxCalculator\WebContent\WEB-INF\web.xm
文件 30684 2015-04-08 22:11 个人工资所得税计算器设计文档.docx
目录 0 2015-04-08 22:12 TaxCalculator\WebContent\WEB-INF\classes\fm\action
目录 0 2015-04-08 22:12 TaxCalculator\WebContent\WEB-INF\classes\fm\service
目录 0 2015-04-08 22:12 TaxCalculator\WebContent\WEB-INF\classes\fm
目录 0 2015-04-08 22:12 TaxCalculator\src\fm\action
目录 0 2015-04-08 22:12 TaxCalculator\src\fm\service
目录 0 2015-04-08 22:12 TaxCalculator\WebContent\WEB-INF\classes
目录 0 2015-04-08 22:12 TaxCalculator\WebContent\WEB-INF\lib
目录 0 2015-04-08 22:12 TaxCalculator\src\fm
目录 0 2015-04-08 22:12 TaxCalculator\WebContent\css
目录 0 2015-04-08 22:12 TaxCalculator\WebContent\me
............此处省略9个文件信息
- 上一篇:企业园区网络设计、规划与实施方案
- 下一篇:以太网CSMD/CD协议仿真
评论
共有 条评论