开发中有时候需要从服务器端返回json格式的数据,在后台代码中如果有DateTime类型的数据使用系统自带的工具类序列化后将得到一个很长的数字表示日期数据,如下所示: //设置服务器响应的结果为纯文本格式 context.Response.ContentTy...
分类:
Web程序 时间:
2014-11-30 18:30:53
阅读次数:
308
8.Response 8.1.getOutputStream和getWriter方法分别用于得到输出二进制数据、输出文本数据的ServletOutputStream 、Printwriter对象。 8.2.getOutputStream和getWriter方法互相排斥,调用其中的任何一方发后就不能调...
分类:
其他好文 时间:
2014-11-29 23:06:13
阅读次数:
246
一、安装时选择“非管控客户端”二、安装时选择“自定义安装”三、不要安装“应用程序与设备控制”,否则会拖慢开机离线病毒库下载地址http://www.symantec.com/security_response/definitions/download/detail.jsp?gid=n95
分类:
其他好文 时间:
2014-11-29 17:19:48
阅读次数:
129
2 .列举ASP.NET 页面之间传递值的几种方式。答. 1).使用QueryString, 如....?id=1; response. Redirect().... 2).使用Session变量 3).使用Server.Transfer3. 一列数的规则如下: 1、1、2、3、5、8、13、21、...
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