+1  A: 

HttpClient, Selenium, HtmlUnit - depends on your exact case

Bozho
I see.I have wrote - Just wait a moment...Why did you firstly write, but not read my ask?
Why did you submit the question without having it finished? This makes no sense as well. If you want a preview, just look below the message box.
BalusC
+1 for HtmlUnit.
Adeel Ansari
Ok...I apologise for my stupid actions.May be you can help me giving useful advice?
'just wait a moment' was from the incomprehensible part of the question :)
Bozho
+2  A: 
  1. Use a packet capture utility such as Wireshark to monitor the http requests.

  2. Compare what the browser is sending to what your code is sending.

  3. Modify your code accordingly.

Andrew Strong
+1 - Right approach, though it would be better if the OP could get his web server / container to do the capture; e.g. using RequestDumperValve in Tomcat.
Stephen C