转自:http://www.cnblogs.com/salam/archive/2010/11/30/1892143.html我们在开发程序是经常会需要软件全屏显示、自定义标题(使用按钮等控件)和其他的需求,今天这一讲就是如何控制Android应用程序的窗体显示. 首先介绍一个重要方法那就是req....
分类:
移动开发 时间:
2015-05-15 07:53:52
阅读次数:
127
1.geturl---- 获取真实的urlfrom urllib.request import Request, urlopenfrom urllib.error import URLError, HTTPError old_url = 'http://rrurl.cn/b1UZuP' req...
分类:
其他好文 时间:
2015-05-14 20:21:01
阅读次数:
141
req.getRequestDiapatcher("hello.jsp").forward(req,resp);//重定向resp.sendRedirect("login.jsp");//请求转发重定向,服务器内部跳转。一次请求,跳转一次。Url不变。请求转发,一次请求,2次跳转.请求的Url变成跳...
分类:
其他好文 时间:
2015-05-13 21:41:11
阅读次数:
133
String path = req.getContextPath();//返回的是项目的根目录 /sshreq.getScheme();//返回的是当前页面服务器的协议; http 或是httpsreq.getServername();//返回的是当前页面服务器的名称; localhost;req....
分类:
Web程序 时间:
2015-05-13 21:33:12
阅读次数:
177
//发送获取xml请求 public static string SentRequest(String url) { HttpWebRequest req = WebRequest.CreateHttp(url); ...
分类:
Web程序 时间:
2015-05-12 15:31:45
阅读次数:
137
问题描述:在使用request.GetResponse时,如果是400错误,将抛出异常信息,而获取不到返回内容,所以返回的内容只能在catch上面获取,转载于http://blog.csdn.net/ahywg/article/details/26267113解决方法: WebRequest req...
分类:
其他好文 时间:
2015-05-12 11:11:36
阅读次数:
118
LoginServlet代码:public class LoginServlet extends HttpServlet{ @Override
protected void service(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException...
分类:
其他好文 时间:
2015-05-11 17:56:56
阅读次数:
131
生成证书:# cd /usr/local/nginx/conf # openssl genrsa -des3 -out server.key 1024 # openssl req -new -key server.key -out server.csr # cp server.key server....
分类:
其他好文 时间:
2015-05-11 17:36:42
阅读次数:
110
重定向 resp.sendRedirect(req.getContextPath()+"/getM.jsp"); 请求转发 req.getRequestDispatcher("/getM.jsp").forward(req,resp);...
分类:
其他好文 时间:
2015-05-08 22:18:44
阅读次数:
96
所谓“过滤器”,只是一个概念,可以理解是一个路由,也可以理解为一个中间件。原理非常简单,就是利用匹配规则,让其有限匹配在正常的路由前面处理就行了。比如有如下路由1 app.get('/', function (req, res, next) {2 res.send('index');3 })...
分类:
其他好文 时间:
2015-05-08 12:38:43
阅读次数:
145