框架中的单例模式
来源:互联网 发布:淘宝跳转链接代码 编辑:程序博客网 时间:2024/05/22 18:34
Struts1
public class testAction extends Action{
public ActionForword execute(ActionMapping mapping,ActionForm from,HttpservletRequest request,
HttpServletResponse response) throws Exception{
System.out.println(this);
return mapping.findForwart("success");
}
}
输出com.struts1.action.IndexAction@3c35fd
Struts2
public class testAction extends Action{
public ActionForword execute(ActionMapping mapping,ActionForm from,HttpservletRequest request,
HttpServletResponse response) throws Exception{
System.out.println(this);
return mapping.findForwart("success");
}
}
com.struts2.action.IndexAction@1f327e
HttpServlet
public class testServlet extends HttpServlet{
protected void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException{
doPost(req,res);
}
protected void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException{
System.out.println(this);
}
}
- 框架中的单例模式
- PHP单例模式在MVC框架设计中的应用
- PHP单例模式在MVC框架设计中的应用 (
- 由Spring框架中的单例模式想到的
- Spring框架中的单例模式(源码解读)
- php中的单例模式(单态)
- c++中的单例模式
- c#中的单例模式
- C++中的单例模式
- spring中的单例模式
- C++中的单例模式
- C++中的单例模式
- C++中的单例模式
- C++中的单例模式
- java中的单例模式
- java中的单例模式
- java中的单例模式
- jdk中的单例模式
- JSONModel解析数据成Model
- DM8168外挂IC卡读写异常
- 深入理解JavaScript中的this关键字
- FZU 2103 Bin & Jing in wonderland
- 第二周项目4-用循环求
- 框架中的单例模式
- [Leetcode]Sudoku Solver
- Visual C++中 #include "stdafx.h" 头文件的用法
- 排序算法总结 java实现
- 并查集-poj-1611-The Suspectst
- 用信号量解决进程的同步与互斥
- android5.0中图片跳转的动画效果
- vs2010程序运行出错 link : fatal error lnk1123: 转换到 coff 期间失败: 文件无效或损坏
- 第二周项目5-用循环求.2