资源简介
适合初学者学习
代码片段和文件信息
package action;
import java.io.IOException;
import java.util.HashSet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import service.IHouseService;
import service.IStreetService;
import service.ITypeService;
import service.impl.HouseService;
import service.impl.StreetService;
import service.impl.TypeService;
import entity.House;
import entity.Street;
import entity.Types;
import entity.Users;
@SuppressWarnings(“all“)
public class AddHouseAction extends HttpServlet {
/**
* Constructor of the object.
*/
public AddHouseAction() {
super();
}
/**
* Destruction of the servlet.
*/
public void destroy() {
super.destroy(); // Just puts “destroy“ string in log
// Put your code here
}
/**
* The doGet method of the servlet.
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
doPost(request response);
}
/**
* The doPost method of the servlet.
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
//获得用户的登录信息
Users user=(Users)request.getSession().getAttribute(“UserLogin“);
ITypeService ts = new TypeService();
IStreetService ss=new StreetService();
//获得标题
String title=request.getParameter(“title“);
//获得房子面积
Integer floorage=Integer.parseInt(request.getParameter(“floorage“));
//获得房子的价格
Double price=Double.parseDouble(request.getParameter(“price“));
//获得房子的联系信息
String contact=request.getParameter(“contact“);
//获得房子的详细信息
String description=request.getParameter(“description“);
//获得房子的发布日期
String houseDate = request.getParameter(“houseDate“);
//获得房子类型id
String type = request.getParameter(“type_id“);
Integer types = null;
Types typeid = null;
try {
types = Integer.parseInt(type);
} catch (Exception e) {
types = null;
}
typeid = ts.getTypeById(types);
//获得街道id
String street = request.getParameter(“street_id“);
Integer streets = null;
Street streetid = null;
try {
streets = Integer.parseInt(street);
} catch (Exception e) {
streets = null;
}
streeti
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2256 2016-05-20 18:12 RentHouse\.classpath
文件 1334 2016-05-20 13:11 RentHouse\.project
文件 522 2016-05-20 10:04 RentHouse\.settings\.jsdtscope
文件 364 2016-05-20 10:04 RentHouse\.settings\org.eclipse.jdt.core.prefs
文件 557 2016-05-20 17:24 RentHouse\.settings\org.eclipse.wst.common.component
文件 414 2016-05-20 10:04 RentHouse\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2016-05-20 10:04 RentHouse\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2016-05-20 10:04 RentHouse\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 3974 2016-05-20 19:38 RentHouse\src\action\AddHouseAction.java
文件 868 2016-05-20 13:23 RentHouse\src\action\CodeFilter.java
文件 2385 2016-05-20 14:02 RentHouse\src\action\DelHouseAction.java
文件 2304 2016-05-22 15:07 RentHouse\src\action\DetailHouseAction.java
文件 1949 2016-05-20 13:28 RentHouse\src\action\ExitLoginAction.java
文件 8608 2016-05-22 23:07 RentHouse\src\action\IndexAction.java
文件 2395 2016-05-20 15:39 RentHouse\src\action\LoginAction.java
文件 2743 2016-05-22 16:05 RentHouse\src\action\ManageAction.java
文件 3280 2016-05-20 13:38 RentHouse\src\action\RegisterAction.java
文件 2398 2016-05-22 17:04 RentHouse\src\action\ShowAllStreetAction.java
文件 2256 2016-05-20 21:17 RentHouse\src\action\ShowOneHouseAction.java
文件 3985 2016-05-20 21:17 RentHouse\src\action\UpdateHouseAction.java
文件 229 2016-05-20 23:28 RentHouse\src\dao\IDistrictDao.java
文件 1065 2016-05-23 09:33 RentHouse\src\dao\IHouseDao.java
文件 2997 2016-05-22 11:14 RentHouse\src\dao\impl\ba
文件 592 2016-05-20 23:29 RentHouse\src\dao\impl\DistrictDao.java
文件 4590 2016-05-23 09:31 RentHouse\src\dao\impl\HouseDao.java
文件 881 2016-05-20 19:48 RentHouse\src\dao\impl\StreetDao.java
文件 552 2016-05-20 16:56 RentHouse\src\dao\impl\TypeDao.java
文件 1094 2016-05-20 10:19 RentHouse\src\dao\impl\UserDao.java
文件 239 2016-05-20 16:53 RentHouse\src\dao\IStreetDao.java
文件 215 2016-05-20 16:41 RentHouse\src\dao\ITypeDao.java
............此处省略221个文件信息
- 上一篇:htcad破解版(cad土方量计算工具)
- 下一篇:openCV1.0.rar
相关资源
- 多人网络源码
- ESP8266远程控制应用+APP源码.
- pentaho-kettle-master-8.3源码.zip
- Coursera课程Deeplearning深度学习笔记+课
- HI35xx平台MPEG解码
- H+4.9响应式后台主题UI框架源码带完整
- 各种类型防火墙源码大集合
- spark1.3源码
- 雷电源码
- 计算机科学cs50的问题集的源码+头文件
- 抓包工具源码 可以截获数据,监视端
- jsoncpp源码+VS2017编译32和64位静态库
- 旺财收银系统源码
- 小说源码.rar
- 少儿编程源码 scratch培训管理系统源码
- dOPC Client Toolkit Delphi 10.3 全源码版
- OLED的各类单片机底层驱动源码,看完
- 网上商城ios源码
- untiy3d 简单td防守+射击游戏
- 跟着开涛学SpringMVC电子书和源码
- UReport使用手册docx、typora、demo案例以
- 老虎淘客系统5.99.17代理系统2.97微擎系
- open bilibili 源码
- 数据可视化源码.rar
- 一个APP源码
- 短视频完美开源源码 后台+APP双端源码
- libevent深入浅出,libevent参考手册,
- unity动物城源码.zip
- gh0st远控源码木马乐园5.0终结版
- cas客户端war包和project源代码
评论
共有 条评论