资源简介
本源代码是自己珍藏的一个完整项目.有很多经常会用到,值得借鉴的编程思想,现发布出来与大家分享,希望对大家有所帮助!

代码片段和文件信息
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 TestContextParamServlet extends HttpServlet {
/**
* Constructor of the object.
*/
public TestContextParamServlet() {
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() + this.getServletConfig().getServletContext().getInitParameter(“a“));
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 occure
*/
public void init() throws ServletException {
// Put your code here
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 753 2007-09-18 10:26 Shopping\.classpath
文件 297 2007-09-18 10:26 Shopping\.myme
文件 1226 2007-09-18 10:26 Shopping\.project
文件 1269 2007-09-18 10:26 Shopping\WebRoot\AdminLogin.jsp
文件 2494 2007-09-18 10:26 Shopping\WebRoot\Buy.jsp
文件 1706 2007-09-18 10:26 Shopping\WebRoot\Confirm.jsp
文件 1097 2007-09-18 10:26 Shopping\WebRoot\GetCategoryChilds.jsp
文件 48452 2007-09-19 11:55 Shopping\WebRoot\Index.jsp
文件 1419 2007-09-18 10:26 Shopping\WebRoot\Login.jsp
文件 666 2007-09-18 10:26 Shopping\WebRoot\Order.jsp
文件 3507 2007-09-18 10:26 Shopping\WebRoot\ProductSearch.jsp
文件 2287 2007-09-20 11:08 Shopping\WebRoot\ProductSearchAJAX.jsp
文件 9153 2007-09-20 09:30 Shopping\WebRoot\Register.jsp
文件 3543 2007-09-20 11:00 Shopping\WebRoot\relative.jsp
文件 11084 2007-09-19 11:34 Shopping\WebRoot\ShowProducts.jsp
文件 910 2007-09-18 10:26 Shopping\WebRoot\TestContextParam.jsp
文件 434 2007-09-18 10:26 Shopping\WebRoot\TestTag.jsp
文件 1383 2007-09-18 10:26 Shopping\WebRoot\UserLogin.jsp
文件 8334 2007-09-18 10:26 Shopping\WebRoot\UserModify.jsp
文件 354 2007-09-20 09:32 Shopping\WebRoot\Validate.jsp
文件 2666 2007-09-20 09:36 Shopping\WebRoot\WEB-INF\web.xm
文件 546 2007-09-18 10:26 Shopping\WebRoot\WEB-INF\tag\HW.tld
文件 31909 2007-09-18 10:26 Shopping\WebRoot\WEB-INF\lib\commons-fileupload-1.1.1.jar
文件 65621 2007-09-18 10:26 Shopping\WebRoot\WEB-INF\lib\commons-io-1.2.jar
文件 307510 2007-09-18 10:26 Shopping\WebRoot\WEB-INF\lib\jcommon-1.0.5.jar
文件 1095935 2007-09-18 10:26 Shopping\WebRoot\WEB-INF\lib\jfreechart-1.0.2.jar
文件 456729 2007-09-18 10:26 Shopping\WebRoot\WEB-INF\lib\mysql-connector-java-3.1.13-bin.jar
文件 2357 2007-09-19 11:12 Shopping\WebRoot\WEB-INF\classes\TestContextParamServlet.class
文件 158 2007-09-18 10:26 Shopping\WebRoot\WEB-INF\classes\config\shopping.properties
文件 2930 2007-09-19 11:12 Shopping\WebRoot\WEB-INF\classes\com\bjsxt\shopping\util\DB.class
............此处省略744个文件信息
相关资源
- 微博系统(Java源码,servlet+jsp),适
- java串口通信全套完整代码-导入eclip
- 美食天下项目Android版源码和Web版源码
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
- Java 文件加密传输
- java做的房产管理系统
评论
共有 条评论