Tomcat - 设置 HTTP 摘要认证
摘要:在 Tomcat 中设置 HTTP 摘要认证的示例 在 Tomcat 中设置摘要认证与设置基本认证几乎一样,差别在于配置 web.xml 时,<login-config/> 元素在指定认证方法时,基本认证设置 auth-method 为 BASIC,而摘要认证设置 auth-method 为 DIG
阅读全文
posted @
2016-05-14 10:15
huey2672
阅读(731)
推荐(0)
Commons IO - IOUtils
摘要:IOUtils is a general IO stream manipulation utilities. This class provides static utility methods for input/output operations. closeQuietly - these me
阅读全文
posted @
2016-05-12 11:21
huey2672
阅读(515)
推荐(0)
Servlet & JSP - Servlet API Overview
摘要:Servlet & Generic & HttpServlet 类图 Servlet 的生命周期 init、service 和 destroy 是 servlet 的生命周期方法,它们的调用规则如下: init: 当第一次请求 servlet 时,servlet 容器会调用此方法,而后面即使再接收到
阅读全文
posted @
2016-04-29 12:24
huey2672
阅读(283)
推荐(0)
Commons Codec - 常见的编码解码
摘要:Base64 Base64 编码 安全 URL 的 Base64 编码 Base64 解码 URL URL 编码 URL 解码 MD5 MD5 编码 SHA1 SHA1 编码 SHA256 SHA256 编码
阅读全文
posted @
2016-04-22 16:49
huey2672
阅读(894)
推荐(0)
Jersey(1.19.1) - JSON Support
摘要:Jersey JSON support comes as a set of JAX-RS MessageBodyReader<T> and MessageBodyWriter<T> providers distributed with jersey-json module. These provid
阅读全文
posted @
2016-04-18 16:59
huey2672
阅读(815)
推荐(0)
Jersey(1.19.1) - XML Support
摘要:As you probably already know, Jersey uses MessageBodyWriters and MessageBodyReaders to parse incoming request and create outgoing responses. Every use
阅读全文
posted @
2016-04-18 12:45
huey2672
阅读(300)
推荐(0)
Jersey(1.19.1) - Client API, Security with Http(s)URLConnection
摘要:With Http(s)URLConnection The support for security, specifically HTTP authentication and/or cookie management with Http(s)URLConnection is limited due
阅读全文
posted @
2016-04-17 19:29
huey2672
阅读(281)
推荐(0)
Jersey(1.19.1) - Client API, Testing services
摘要:The Jersey client API was originally developed to aid the testing of the Jersey server-side, primarily to make it easier to write functional tests in
阅读全文
posted @
2016-04-17 19:24
huey2672
阅读(248)
推荐(0)
Jersey(1.19.1) - Client API, Using filters
摘要:Filtering requests and responses can provide useful functionality that is hidden from the application layer of building and sending requests, and proc
阅读全文
posted @
2016-04-17 19:12
huey2672
阅读(338)
推荐(0)
Jersey(1.19.1) - Client API, Overview of the API
摘要:To utilize the client API it is first necessary to create an instance of a Client, for example: Configuring a Client and WebResource The client instan
阅读全文
posted @
2016-04-17 18:35
huey2672
阅读(519)
推荐(0)
Jersey(1.19.1) - Client API, Ease of use and reusing JAX-RS artifacts
摘要:Since a resource is represented as a Java type it makes it easy to configure, pass around and inject in ways that is not so intuitive or possible with
阅读全文
posted @
2016-04-17 13:50
huey2672
阅读(270)
推荐(0)
Jersey(1.19.1) - Client API, Uniform Interface Constraint
摘要:The Jersey client API is a high-level Java based API for interoperating with RESTful Web services. It makes it very easy to interoperate with RESTful
阅读全文
posted @
2016-04-17 10:13
huey2672
阅读(253)
推荐(0)
Jersey(1.19.1) - Use of @Context
摘要:Previous sections have introduced the use of @Context. The JAX-RS specification presents all the standard JAX-RS Java types that may be used with @Con
阅读全文
posted @
2016-04-16 23:42
huey2672
阅读(288)
推荐(0)
Jersey(1.19.1) - Rules of Injection
摘要:Previous sections have presented examples of annotated types, mostly annotated method parameters but also annotated fields of a class, for the injecti
阅读全文
posted @
2016-04-16 23:39
huey2672
阅读(229)
推荐(0)
Jersey(1.19.1) - Security
摘要:Security information is available by obtaining the SecurityContext using @Context, which is essentially the equivalent functionality available on the
阅读全文
posted @
2016-04-16 23:34
huey2672
阅读(316)
推荐(0)
Jersey(1.19.1) - Life-cycle of Root Resource Classes
摘要:By default the life-cycle of root resource classes is per-request, namely that a new instance of a root resource class is created every time the reque
阅读全文
posted @
2016-04-16 23:19
huey2672
阅读(302)
推荐(0)
Jersey(1.19.1) - Conditional GETs and Returning 304 (Not Modified) Responses
摘要:Conditional GETs are a great way to reduce bandwidth, and potentially server-side performance, depending on how the information used to determine cond
阅读全文
posted @
2016-04-16 22:41
huey2672
阅读(322)
推荐(0)
Jersey(1.19.1) - WebApplicationException and Mapping Exceptions to Responses
摘要:Previous sections have shown how to return HTTP responses and it is possible to return HTTP errors using the same mechanism. However, sometimes when p
阅读全文
posted @
2016-04-16 22:20
huey2672
阅读(372)
推荐(0)
Jersey(1.19.1) - Building URIs
摘要:A very important aspects of REST is hyperlinks, URIs, in representations that clients can use to transition the Web service to new application states
阅读全文
posted @
2016-04-16 21:03
huey2672
阅读(215)
推荐(0)
Jersey(1.19.1) - Sub-resources
摘要:@Path may be used on classes and such classes are referred to as root resource classes. @Path may also be used on methods of root resource classes. Th
阅读全文
posted @
2016-04-16 16:29
huey2672
阅读(396)
推荐(0)