title: JMeter - Trouble sending HTTP request with POST variable?
body: <p>I am trying to load test a java servlet that fetches records from an archive database.</p>
  
  <p>The servlet works as follows:</p>
  
  <ul>
  <li>1-Reads in post variables from HTTP header</li>
  <li>2-Uses variables to query database</li>
  <li>3-Returns XML</li>
  </ul>
  
  <p>I have setup a test which I want to fire off HTTP requests with post variables however the test is not working, getting errors with J Meter.</p>
  
  <p><strong>Screenshot 1 - Shows the structure of the test</strong>
  <img src="https://i.stack.imgur.com/YtoNS.png" alt="enter image description here"></p>
  
  <p><strong>Screenshot 2 - Shows the CSV file I am reading from</strong>
  <img src="https://i.stack.imgur.com/8YnE0.png" alt="enter image description here"></p>
  
  <p>I have placed the CSV file in the same folder that my test plan is saved in!</p>
  
  <p><strong>Screenshot 3 - Shows the HTTP request</strong>
  <img src="https://i.stack.imgur.com/BN2b8.png" alt="enter image description here"></p>
  
  <p><strong>This is the error output:</strong></p>
  
  <blockquote>
    <p>Thread Name: Thread Group 1-1 Sample Start: 2012-11-20 10:35:27 GMT
    Load time: 0 Latency: 0 Size in bytes: 1113 Headers size in bytes: 0
    Body size in bytes: 1113 Sample Count: 1 Error Count: 1 Response code:
    Non HTTP response code: java.net.URISyntaxException Response message:
    Non HTTP response message: Expected closing bracket for IPv6 address
    at index 13:
    <a href="http://[http://sophos1.testserver.co.uk/servlet/archive]:61061/" rel="noreferrer">http://[http://sophos1.testserver.co.uk/servlet/archive]:61061/</a></p>
    
    <p>Response headers:</p>
    
    <p>HTTPSampleResult fields: ContentType:  DataEncoding: null</p>
  </blockquote>
  
  <p><strong>POST Request</strong></p>
  
  <pre><code>POST http://[http://sophos1.testserver.co.uk/servlet/archive]:61061/
  
  POST data:
  
  
  [no cookies]
  </code></pre>
  
  <p><strong>Returned DATA</strong></p>
  
  <pre><code>java.net.URISyntaxException: Expected closing bracket for IPv6 address at index 13: http://[http://sophos1.testserver.co.uk/servlet/archive]:61061/
          at java.net.URI$Parser.fail(Unknown Source)
          at java.net.URI$Parser.failExpecting(Unknown Source)
          at java.net.URI$Parser.parseServer(Unknown Source)
          at java.net.URI$Parser.parseAuthority(Unknown Source)
          at java.net.URI$Parser.parseHierarchical(Unknown Source)
          at java.net.URI$Parser.parse(Unknown Source)
          at java.net.URI.&lt;init&gt;(Unknown Source)
          at java.net.URL.toURI(Unknown Source)
          at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:232)
          at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
          at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075)
          at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064)
          at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426)
          at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)
          at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>Please help!</p>
  
  <p>Thanks </p>