资源简介
i订房.tar.gz
代码片段和文件信息
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class UserHotelServlet extends HttpServlet
{
/**
* Constructor of the object.
*/
public UserHotelServlet()
{
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
{
response.setContentType(“text/html“);
PrintWriter out = response.getWriter();
out.println(““);
out.println(““);
out.println(“ tle>A Servlet tle>“);
out.println(“ “);
out.print(“ This is “);
out.print(this.getClass());
out.println(“ using the GET method“);
out.println(“ “);
out.println(““);
out.flush();
out.close();
}
/**
* 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
{
response.setContentType(“text/html“);
PrintWriter out = response.getWriter();
out.println(““);
out.println(““);
out.println(“ tle>A Servlet tle>“);
out.println(“ “);
out.print(“ This is “);
out.print(this.getClass());
out.println(“ using the POST method“);
out.println(“ “);
out.println(““);
out.flush();
out.close();
}
/**
* Initialization of the servlet.
*
* @throws ServletException if an error occurs
*/
public void init() throws ServletException
{
// Put your code here
}
}
相关资源
- 随机算法中文版[MR95].pdf
- PotatsoLite2.4.0.ipa
- MyRecyclerViewDemo.zip
- 25220159房源管理系统.zip
- LATEX入门与提高++第2版.pdf
- DiskGenius4.7专业破解版.rar
- 视觉检测系统.rar
- libSkyChaserHttp_src.zip
- 最优化理论与算法-陈宝林.pdf
- spinewin.zip
- shsh.zip
- 矩阵论程云鹏等第三版西北工业大学
- 新建WinRAR压缩文件.rar
- Lenovo Thinkpad E480安装WIN7声卡没声音驱
- 19441153C完美仿QQ聊天软件MyQQ源代码(
- u013929746_7857119.zip
- OPPO专用工具平台包.zip
- MapTest.zip
- paopao.rar
- VIVO售后解锁账号擦除软件和驱动平台
- eBatPrint13.2_crk破解版CAD批量打印PDF.r
-
Databa
seSystemConcepts6thEdition.pdf - KMSTools_V18.06.2016_Xitongzhijia.zip
- C7.0inaNutshellTheDefinitiveReference.pdf
- 米酷影视5.0修复综艺动漫.zip
- h1.bin
- u011296061_8888705.zip
- GirdDemo.zip
- ListDemo.zip
- u010837860_9188769.zip
评论
共有 条评论