Fiddler is a handy tool which sits between two applications act as a proxy. It includes the ability to view, decrypt HTTP or HTTPSÂ traffic for debugging proposes. For instance, we need capture the allÂ HTTP or HTTPS request/responses from client JavaÂ program to the server, and the HTTPS-secured traffic should be decrypted to plain text and displayed inÂ Fiddler. Read the rest of this entry »

1. Java Thread-safe Map Overview

The Map object is an associative containers that store elements, formed by a combination of a uniquely identify keyÂ and a mapped value. In Java, the most importantÂ MapÂ implementation is HashMap, unfortunately it is not synchronized.

Tips: A map cannot contain duplicate keys, each key can map to at most one value.

What does the thread safe Map means? If multiple threads access a hash map concurrently, and at least one of the threads modifies the map structurally, it must be synchronized externally to avoid an inconsistent view of the contents. (A structural modification is any operation that adds or deletes one or more mappings; merely changing the value associated with a key that an instance already contains is not a structural modification.) Read the rest of this entry »

When developing web services applications, it’s often on demand to be able to track the SOAP messages passed along in TCP based conversation, theÂ TCPMonÂ comes as the first optionÂ to capture the outgoing and incoming SOAP envelopes.

1. TCPMonÂ Introduction

TCPMon is a open sourceÂ utility debugÂ tool,Â distributed under the Apache 2.0 license. It has originally being part of Axis1 and now stands as an independent project.Â The official web site is http://ws.apache.org/tcpmon/.Â It is based on a swing UI and works on almost all platforms that Java supports. It allows user record, monitor and resent the messages,Â This TCPMonÂ tutorial is step-by-step guide to explain how TCPMon works and also to explain its features.

(Thereâ€™s a same name TCPMonÂ project in a Google Code, but thatâ€™s not the same one, and it only has less features).

how to get user working directory in Ant ?

To get the user working directory,Â you can directly use ant build-in propertyÂ ${user.dir}, it is actually exposed by JavaÂ System.getProperties(). so it’s the JVM current working directory. it is for often locatedÂ C:\Users\user_name.

If you store the date in milliseconds, for instance,Â 1126483200000,Â its millisecondsÂ since January 1, 1970, 00:00:00 GMT in Oracle, we can see, even one second converts to thousandÂ milliseconds,Â its just a huge number which means nothing and hard to read. So usually we have to write Oracle SQL query statement to get this milliseconds and convert to a date string format as instead: Read the rest of this entry »

Like what we often do in tomcat, we can still static or hot deploy war file(packed or unpacked) to Jetty container, this tutorial will demonstrate how to deploy a war file to jetty? Read the rest of this entry »