using System.Xml.Linq; using Newtonsoft.Json; Response.ContentType = "application/json"; XDocument xdoc = XDocument.Load(path); Response.Write(JsonC.....
分类:
编程语言 时间:
2014-11-28 18:03:08
阅读次数:
335
设置cookie过期cookie.Expires = DateTime.Now.AddDays(-1);HttpContext.Current.Request.Cookies.Set(cookie);HttpContext.Current.Response.Cookies.Set(cookie);设...
分类:
其他好文 时间:
2014-11-28 15:59:19
阅读次数:
98
@RequestMapping(value="getCountyBycityId") public void getCountyBycityId(HttpServletRequest request,HttpServletResponse response) throws Exception...
分类:
移动开发 时间:
2014-11-28 15:45:27
阅读次数:
134
以前写过一个相关的跨域的例子,是借助第三个无关的页面(使用了iframe)最近又遇到了几种跨域的解决方案:1、 asp.net设置p3p的方法: HttpContext.Current.Response.AddHeader("p3p", "CP=\""IDC DSP COR ADM DE...
分类:
其他好文 时间:
2014-11-28 11:37:40
阅读次数:
137
简单 方便
/**
* @author think
*以同步方式发送Http请求
*/
public class ApacheHttpClient {
/**
* @return
*
*/
public String httpGet(String uri) {
String response=null;//响应
...
分类:
移动开发 时间:
2014-11-28 10:11:07
阅读次数:
203
这里我已经忽略了思考时间。看这里的liboys事务的值。先记住它们。再看这个图中的liboys事务的时间值,再记住它们。看看这个average transaction response time的采样时间:granularity2秒。现在我改为:115秒(整个场景的运行时间)。再来看average ...
分类:
其他好文 时间:
2014-11-27 18:03:37
阅读次数:
173
可以跨域下载
/**
* 音频下载
*/
@RequestMapping("/audio/download")
public void downloadFile(HttpServletRequest request, HttpServletResponse response) throws IOException {
/...
分类:
编程语言 时间:
2014-11-27 12:46:03
阅读次数:
141
如果页面中不用Ajax,cs中运行某段js代码方式可以是:Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "");如果页面中使用了Ajax ,则上述代码即使执行也无效果。如果页面中Response.Write(),Page.Re...
分类:
Web程序 时间:
2014-11-27 12:08:45
阅读次数:
203
1、转发和重定向HttpServletResponse response转发: RequestDispatcher dispatcher = request.getRequestDispatcher("/secondServlet"); request.setAttribute("pwd...
分类:
编程语言 时间:
2014-11-27 09:07:41
阅读次数:
215
作为一只小小小白的安全新手,只会简单的用sqlmap扫扫网站,用burpsuite的proxy模块拦截一些请求。最近又对proxy有点儿小理解,记录之。1. 查看sqlmap注入的语句以及HTTP request/response信息sqlmap是很好用的自动测试工具,但有时候想要查看请求具体的内容...
分类:
Web程序 时间:
2014-11-27 00:06:25
阅读次数:
641