- 博客(11)
- 资源 (10)
- 收藏
- 关注
原创 重定向与转发的区别
重定向与转发的区别一、API调用的区别转发:request.getRequestDispatcher("/...").forward(request,response);重定向:response.sendRedirect("/...");或者response.setStatue(302);response.setHeaders("location","/...");二、流程上的区别转发流程
2017-02-26 13:05:53 764
原创 Javaweb获取表单数据的几种方式
Javaweb获取表单数据的几种方式一、通过键值对的形式获取表单数据getParameter(String name):通过key,返回一个value。getParameterValues(String name):通过key返回一个string数组(多个值)getParameterNames():返回form表单中的所有key值。下面介绍通过键值对获取form表单数据的数据的方法:@Web
2017-02-25 17:08:07 17343
原创 JavaWeb实现验证码
JavaWeb实现验证码创建一个ImageServlet类,这个类实现了输出验证码的功能。具体代码如下:ImageServlet:@WebServlet("/ImageServlet")public class ImageServlet extends HttpServlet { private static final long serialVersionUID = 1L; pu
2017-02-24 23:19:21 812
原创 请求返回json串和文件下载实例
请求返回json串和文件下载实例请求返回json串JsonServlet代码:@WebServlet("/JsonServelt")public class JsonServelt extends HttpServlet { private static final long serialVersionUID = 1L; public JsonServelt() {
2017-02-24 14:35:12 6462 1
原创 Request和Response
Request和Response当Web容器收到客户端发送的http请求,会在Servlet初始化之后,service调用之前创建HttpServletRequest和HttpServletResponse对象。HttpServletRequest和HttpServletResponse对象分别封装了HTTP协议的请求(客户端实际请求信息)和响应信息(服务器默认响应信息)。Request请求行GE
2017-02-24 14:33:52 439
原创 Servlet学习笔记
Servlet之Hello World及配置方式一:在所在的包名下,点击右键–>选择New–>选择Servlet点击Servlet后,弹出一个框,输入Servlet的名称,点击Finsih。在WebContext目录下WEB-INF的web.xml文件中配置:<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://w
2017-02-22 17:49:03 677
原创 初学JavaWeb需要知道的目录结构与配置
初学JavaWeb需要知道的目录结构与配置JavaWeb目录结构Java Resourcesrc:存放Java源代码的目录。Libraries:存放的是Tomcat及JRE中的jar包。build:自动编译.java文件的目录WebContent(WebRoot):存放的是需要部署到服务器的文件MEAT-INF:是存放工程自身相关的一些信息,元文件信息,通常由开发工具和环境自动生成。MANI
2017-02-22 17:48:00 22754 5
原创 App之间通过Service相互唤醒保活
App之间通过Service相互唤醒保活场景:有2个APP,分别为A和B,当A活着的时候,试着开启B的后台服务,将原本杀死的B的后台服务程序活起来。反之也一样。示例代码(以A启动B为例):1.先看B的代码:创建一个服务YibaServcie,给服务添加一个process属性,设置action。<service android:name=".YibaService" android:p
2017-02-10 14:32:18 6608 1
原创 阿里Java开发手册之编程规约
阿里Java开发手册之编程规约对于程序员来说,编程规范可以养成良好的编程习惯,提高代码质量,降低沟通成本。就在2月9号,阿里出了一份Java开发手册(正式版),分为编程规约,异常日志,MySQL规约,工程规约,安全规约五个章节。这里我根据阿里的编程规约,重点记录(黑色加粗部分)自己还未做好的一些规范,同时方便查阅。++阿里Java开发手册下载地址++编程规约一、命名规约【强制】代码中的命名均不能以
2017-02-10 13:30:29 9305 9
原创 Bugly实现APP热更新
Bugly实现APP热更新Bugly实现热修复采用的是微信Tinker技术。对Tinker进行了简化封装。Bugly热修复官方文档一、配置参数添加插件依赖工程根目录下“build.gradle”文件中添加:buildscript { repositories { jcenter() } dependencies { // tinkersupp
2017-02-07 16:44:07 5374 5
原创 Bugly实现app全量更新
Bugly实现app全量更新Bugly官网文档一、参数配置在app下的gradle中引入第三方库 compile 'com.tencent.bugly:crashreport_upgrade:latest.release'在AndroidManfiest.xml中添加相应的权限<uses-permission android:name="android.permission.READ_PHO
2017-02-07 16:42:48 9958 1
Gradle for Android
2016-11-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人