Servlet & JSP - 转发与重定向的区别
摘要:本文转载自:http://blog.csdn.net/kobejayandy/article/details/13762043 转发 转发的原理,可以通过下图展示: 浏览器的请求发送给组件 1,组件 1 经过一些处理之后,将 request 和 response 对象 “传递” 给组件 2,由组件
阅读全文
posted @
2016-04-30 00:32
huey2672
阅读(464)
推荐(0) 编辑
Servlet & JSP - getParameter 与 request.getAttribute 的区别
摘要:getParameter 方法获取的是表单或 URL 的请求参数。参数是从 Web 客户端传递至 Web 服务端。例如有如下的 servlet: 当接收 /hello?foo=a&bar=b 请求时,容器便将 foo 和 bar 这两个参数通过 HttpServletRequest 传递至 doGe
阅读全文
posted @
2016-04-29 23:50
huey2672
阅读(713)
推荐(0) 编辑
Servlet & JSP - Java Web 访问资源的路径问题
摘要:假设 Web 工程的目录结构如下图所示,并且 HelloServlet 配置为 @WebServlet(name = "helloServlet", urlPatterns = {"/hello"}) 访问类路径下的资源 对于类路径下的文件,如 jms.properties 和 100.jpg,使用
阅读全文
posted @
2016-04-29 16:23
huey2672
阅读(697)
推荐(0) 编辑
Servlet & JSP - Servlet API Overview
摘要:Servlet & Generic & HttpServlet 类图 Servlet 的生命周期 init、service 和 destroy 是 servlet 的生命周期方法,它们的调用规则如下: init: 当第一次请求 servlet 时,servlet 容器会调用此方法,而后面即使再接收到
阅读全文
posted @
2016-04-29 12:24
huey2672
阅读(272)
推荐(0) 编辑
Table of Contents - Servlet & JSP
摘要:Servlet Servlet API Overview Java Web 访问资源的路径问题 getParameter 与 request.getAttribute 的区别 转发与重定向的区别 中文字符问题 Session Tracking Cookie Session Tomcat - 持久化
阅读全文
posted @
2016-04-28 21:08
huey2672
阅读(171)
推荐(0) 编辑
Commons Codec - 常见的编码解码
摘要:Base64 Base64 编码 安全 URL 的 Base64 编码 Base64 解码 URL URL 编码 URL 解码 MD5 MD5 编码 SHA1 SHA1 编码 SHA256 SHA256 编码
阅读全文
posted @
2016-04-22 16:49
huey2672
阅读(881)
推荐(0) 编辑
Table of Contents - Apache Commons
摘要:Apache Commons 简述 CLI Usage of CLI Option Properties Codec 常见的编码解码 Compress Configuration2 Quick start guide IO IOUtils JXPath Object Graph Traversal
阅读全文
posted @
2016-04-21 17:12
huey2672
阅读(219)
推荐(0) 编辑
HTTP - 方法
摘要:GET GET 方法通常用于请求服务器发送某个资源。下图显示了一个例子,在这个例子中,客户端用 GET 方法发起了一次 HTTP 请求。 HEAD HEAD 方法与 GET 方法的行为很类似,但服务器在响应中只返回首部,不会返回实体的主体部分。这就允许客户端在未获取实际资源的情况下,对资源的首部进行
阅读全文
posted @
2016-04-21 16:48
huey2672
阅读(346)
推荐(0) 编辑
Wireshark - 观察 ARP 地址解析过程
摘要:下面使用 Wireshark 分析 ARP 的工作过程。试验的机器:发送者机器(IP 地址:10.21.28.47,MAC 地址:68:f7:28:0f:32:2e)下文称为 HOSTA;目标机器(IP 地址:10.21.28.110,MAC 地址:54:ee:75:25:33:fd),下文称为 H
阅读全文
posted @
2016-04-20 20:10
huey2672
阅读(1650)
推荐(0) 编辑
Linux 命令 - arp: 操作系统的 ARP 缓存
摘要:arp 命令可以查看 ARP 缓存或者手动添加、删除缓存中的条目。 命令格式 arp [-evn] [-H type] [-i if] -a [hostname] arp [-v] [-i if] -d hostname [pub] arp [-v] [-H type] [-i if] -s hos
阅读全文
posted @
2016-04-20 17:18
huey2672
阅读(2705)
推荐(0) 编辑
Table of Contents - TCP/IP
摘要:网络访问层 Ethernet II 网际层 IP IPv4 报文格式 ICMP ICMP 报文分析 ping: 向网络主机发送 ICMP ECHO_REQUEST 包 ARP ARP 过程 arp 命令: 操作系统的 ARP 缓存 RARP RIP BGP 传输层 TCP UDP 应用层 HTTP
阅读全文
posted @
2016-04-20 14:54
huey2672
阅读(164)
推荐(0) 编辑
Networking - Ethernet II 帧
摘要:Ethernet II 帧格式 DA(Destination Address): 该字段有 6 个字节,表示目的 MAC 地址。 SA(Source Address): 该字段有 6 个字节,表示源 MAC 地址。 Type: 该字段有 2 个字节,表示数据包的类型。 Playload: 数据载荷。
阅读全文
posted @
2016-04-20 14:38
huey2672
阅读(936)
推荐(0) 编辑
Table of Contents - HTTP
摘要:HTTP 报文 HTTP 方法 HTTP 状态码 HTTP 首部 连接管理 持久连接 Cookie 机制 Session 机制 基本认证机制 在 Tomcat 中设置基本认证 摘要认证 在 Tomcat 中设置摘要认证 实体和编码 内容编码 条件请求
阅读全文
posted @
2016-04-18 20:06
huey2672
阅读(248)
推荐(0) 编辑
Table of Contents - Redis
摘要:Getting Started 安装配置环境 Redis 命令 Keys Strings Lists Hashs Sets Sorted Sets Transactions Connection Server Pub/Sub Programming with Redis 排序 事务 发布/订阅 Hy
阅读全文
posted @
2016-04-18 17:37
huey2672
阅读(193)
推荐(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
阅读(801)
推荐(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
阅读(291)
推荐(0) 编辑
Table of Contents - MyBatis
摘要:Getting Started with MyBatis Hello World Integration with Spring Bootstrapping MyBatis Configuring MyBatis using XML Environment, DataSource, Transact
阅读全文
posted @
2016-04-17 19:55
huey2672
阅读(219)
推荐(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
阅读(269)
推荐(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
阅读(240)
推荐(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
阅读(330)
推荐(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
阅读(499)
推荐(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
阅读(264)
推荐(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
阅读(242)
推荐(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
阅读(280)
推荐(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
阅读(222)
推荐(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
阅读(308)
推荐(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
阅读(298)
推荐(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
阅读(316)
推荐(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
阅读(364)
推荐(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
阅读(208)
推荐(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
阅读(388)
推荐(0) 编辑
Jersey(1.19.1) - Building Responses
摘要:Sometimes it is necessary to return additional information in response to a HTTP request. Such information may be built and returned using Response an
阅读全文
posted @
2016-04-16 15:40
huey2672
阅读(241)
推荐(0) 编辑
Jersey(1.19.1) - Representations and Java Types
摘要:Previous sections on @Produces and @Consumes referred to MIME media types of representations and showed resource methods that consume and produce the
阅读全文
posted @
2016-04-16 15:35
huey2672
阅读(223)
推荐(0) 编辑
Jersey(1.19.1) - Extracting Request Parameters
摘要:Parameters of a resource method may be annotated with parameter-based annotations to extract information from a request. A previous example presented
阅读全文
posted @
2016-04-16 11:47
huey2672
阅读(277)
推荐(0) 编辑
Jersey(1.19.1) - Deploying a RESTful Web Service
摘要:JAX-RS provides a deployment agnostic abstract class Application for declaring root resource and provider classes, and root resource and provider sing
阅读全文
posted @
2016-04-16 01:11
huey2672
阅读(328)
推荐(0) 编辑
Jersey(1.19.1) - Root Resource Classes
摘要:Root resource classes are POJOs (Plain Old Java Objects) that are annotated with @Path have at least one method annotated with @Path or a resource met
阅读全文
posted @
2016-04-15 14:01
huey2672
阅读(407)
推荐(0) 编辑
Jersey(1.19.1) - Hello World, Get started with Jersey using the embedded Grizzly server
摘要:Maven Dependencies The following Maven dependencies need to be added to the pom: Creating a root resource Create the following Java class in your proj
阅读全文
posted @
2016-04-13 22:50
huey2672
阅读(352)
推荐(0) 编辑
Table of Contents - Jersey
摘要:Jersey 1.19.1 Getting Started Get started with Jersey using the embedded Grizzly server Get started with a Web application Overview of JAX-RS 1.1 Root
阅读全文
posted @
2016-04-13 22:32
huey2672
阅读(154)
推荐(0) 编辑
Jersey(1.19.1) - Hello World, Get started with a Web application
摘要:1. Maven Dependency <properties> <jersey.version>1.19.1</jersey.version> </properties> <dependencies> <dependency> <groupId>com.sun.jersey</groupId> <
阅读全文
posted @
2016-04-10 23:01
huey2672
阅读(526)
推荐(0) 编辑
Table of Contents - ActiveMQ
摘要:Getting Started ActiveMQ 的安装 Hello World Configuring Standard ActiveMQ Components Connecting to ActiveMQ Connection Configuration URI ActiveMQ Message
阅读全文
posted @
2016-04-08 17:16
huey2672
阅读(153)
推荐(0) 编辑
Table of Contents
摘要:程序设计 Java JavaSE Apache Commons Servlet & JSP Maven JMS ActiveMQ WebService CXF Jersey HttpClient Spring MyBatis Quartz Scheduler Ehcache ZooKeeper To
阅读全文
posted @
2016-04-08 17:15
huey2672
阅读(726)
推荐(0) 编辑