import java.io.IOException;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PutMethod;

public class BugTest
{
    public static void main(String[] args) {
        try {

            String httplocation = "http://localhost:8182//bugtest1.xml";
            HttpClient client = new HttpClient();
            PutMethod put1 = new PutMethod(httplocation);
            put1.setRequestBody("bugteststring");

            client.executeMethod(put1);
            put1.releaseConnection();

            GetMethod get1 = new GetMethod(httplocation);
            client.executeMethod(get1);
            get1.releaseConnection();

            PutMethod put2 = new PutMethod(httplocation);
            put2.setRequestBody("bugteststring_lastone");

            client.executeMethod(put2);
            put2.releaseConnection();

        } catch ( HttpException e ) {
            e.printStackTrace();
        } catch ( IOException e ) {
            e.printStackTrace();
        }
    }

}
