- 博客(23)
- 收藏
- 关注
原创 Pointer and Array--some code fragment
Dereference Yields an Lvalue *sp = "goodbye"; // contents of s now changed string s2 = "some value"; sp = &s2; // sp now points to s2 Subscripts and Pointers int ia[] = {0,2,4,6,8}; int i = ia[0]; // ia points to the first element in ia int *p
2010-12-31 15:45:00 311
原创 C ++
main The Operating system uses the value returned by main method to determine whether the program succeeded or failed. A return value of 0 indicates success. #include This line is a preprocessor directive. Tell compiler that we need to use the iostrea
2010-12-23 23:29:00 478
原创 Tomcat(8-2) The Wrapper Application
The wrapper application demonstrates how to write a minimal container module. The wrapper wraps the ModernServlet that you have used in the previous chapters. This application proves that you can have a servlet container consisting only of one wrapper.
2010-12-19 18:09:00 375
原创 Tomcat(8-1) Container Interface
Container interface source code who is excerpted from Tomcat V7. /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional information regard
2010-12-18 13:30:00 304
原创 Tomcat(8) Container
A container is a module that processes the request for a servlet and populates the response object for web client. A container is represented by org.apache.catalina.Container interface and there are four types of containers: Engine, Host, Context, and Wrap
2010-12-17 21:39:00 402
原创 Google buffers
Please refer to http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/overview.html Overview Protocol buffers are flexible, efficient, automated mechanism as well as language-neutral, platform-neutral, extensible way of serializing structured data
2010-12-16 20:38:00 239
原创 Data type conversion
Convert byte array to hexadecimal // Read data from binary file into input stream, read byte from input stream, convert byte to hexadecimal public void readFile() { // Specify a binary file String fileName = "gpb_201012
2010-12-15 10:47:00 868
原创 Tomcat-6 HTTP 1.1
This topic, we will start with three new features in HTTP 1.1 understanding them is crucial to understanding the internal working of the default connector. Persistent Connections Prior to HTTP 1.1, whenever a browser connected to a web server, the connec
2010-12-12 23:05:00 910
原创 Tomcat-7 Tomcat Default Connector
A Tomcat connector is an independent module that can be plugged into a servlet container. There are already many connectors in existence. Examples include Coyote, mod_jk, mod_jk2, and mod_webapp, A Tomcat connector must meet the following requirements:
2010-12-12 20:05:00 1693
原创 Essentials of JMX API - Dynamic MBean
Standard MBeans are ideally suited for straightforward management structures, where the structure of managed data is well defined in advance and unlikely to change often. In such cases, standard MBeans provide the quickest and easiest way to instrument man
2010-12-04 23:51:00 376
原创 Essentials of JMX API - MXBeans
An MXBean is a new type of MBean that provides a simple way to code an MBean that only references a pre-defined set of types. In this way, you can be sure your MBean will be usable by any client, including remote clients, without any requirement that the c
2010-12-04 23:08:00 416
原创 Singleton Pattern
Singleton Pattern 收藏 This is one of the most commonly used patterns. Make the class of the single instance object responsible for creation, initialization, access, and enforcement. Declare the instance as a private static data member. Provide a publ
2010-12-03 23:22:00 240
原创 Internationalization of Error Message
Excerpted from . A large application such as Tomcat needs to heandle error messages carefully. In Tomcat error messages are useful for both system administrators and servlet programmers. For example, Tomcat logs error messages in order for system administ
2010-12-03 23:21:00 430
原创 Tomcat-5 A simple Connector
There are two modules in Catalina: the connector and the container. In this topic you we will enhance the applications in the topic "A Simple Servlet Container" by writing a connector that create better request and response object. A connector compliant wi
2010-12-03 23:20:00 441
原创 Facade Pattern
Facades are all around us in the real world. Operating System are one such example - you don't see all the inner working of your computer, but the OS provides a simplified interface to use the machine. Buildings also have a facade - the exterior of the bui
2010-12-03 23:19:00 285
原创 Tomcat-4 A Simple Servlet Container
This chapter explains how you can develop your own servlet container by presenting two applications. The first application has been designed to be as simple as possible to make it easy for you to understand how a servlet container works. It then evolves in
2010-12-03 23:15:00 382
原创 Tomcat-3 A Simple Web Server
Excerpted from A web application server must stand by all time as it does not know when a client application will try to connection to it. in order for your application to be able to stan by all the time, you need to use the java.net.ServerSocket class.
2010-12-03 23:12:00 305
原创 The Hypertext Transfer Protocol(HTTP)
Excerpted from . HTTP Requests: A HTTP request consists of three components: Method-Uniform Resource Identifier(URI)-Protocol/Version Request headers Entity body An example of a HTTP request is the following: GET /index.html HTTP/1.1 Ac
2010-12-03 23:06:00 520
原创 How A Servlet container Works
A servlet container is a complex system. However, basically there are three things that a servlet container does to service a request for a servlet: Creating a requestion instance and populate it with information that may be used by the invoked servlet
2010-12-03 23:03:00 328
原创 Essentials of JMX API - Standard MBeans
This topic introduces the fundamental notion of the java management extensions (JMX) API, namely managed beans, or MBeans. A standard MBean is defined by writing a java interface called somethingMBean and a java class called something that implements that
2010-12-03 15:41:00 366
原创 Accessing Standard and Dynamic MBeans via the RMI Connector
The purpose of this examples is to demonstrate the implementation of a standard MBean and a dynamic MBean. It also shows how to perform operations on them, both locally, and remotely through an RMI connection between a server and a remote client. A standa
2010-12-03 14:01:00 497
原创 Accessing Standard and Dynamic MBeans via the RMI Connector
The purpose of this examples is to demostrate the implementation of a standard MBean and a dynamic MBean. It also shows how to perform operations on them, both locally, and remotely through an RMI connection between a server and a remote client. A standa
2010-12-03 02:54:00 191
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人