getting error in HTTPURLConnection while running program on linux server
<p>I am running a progrom which is successfully running on my local machine(Success 200 Ok) but when I upload this to my linux web server I am getting the 404 error code.</p>

<p>My Code Is:</p>

<pre><code>try{
String url = "http://sms.bazaardekho.com/ComposeSMS.aspx";
String charset = "UTF-8";
String username = "shaillu";
String priority="1";
String dnd="1";
String unicode="0";
String query = String.format("username=%s&amp;priority=%s&amp;dnd=%s&amp;unicode=%s",
                       URLEncoder.encode(username, charset), 
                       URLEncoder.encode(priority, charset),
                       URLEncoder.encode(dnd, charset),
                       URLEncoder.encode(unicode, charset));
URL oracle = new URL(url + "?" + query);
HttpURLConnection yc =(HttpURLConnection) oracle.openConnection();
yc.setRequestMethod("GET");
yc.setConnectTimeout(3000);
yc.setRequestProperty("Accept", "*/*");
yc.setRequestProperty("User-Agent", "PARSHWA WEB SOLUTIONS");
yc.setRequestProperty("Accept-Charset", charset);
out.println(yc.getRequestMethod());
out.println(yc.getResponseCode());
out.println(yc.getResponseMessage());
out.println("&lt;br/&gt;ErrorStream :"+yc.getErrorStream());
BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) 
out.println(inputLine);
in.close();
}catch(Exception e){out.println("Exception:" + e);}
</code></pre>

<p>Output:</p>

<pre><code>GET 404 Not Found 
ErrorStream :sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@33a719 Exception:java.io.FileNotFoundException: http://sms.bazaardekho.com/ComposeSMS.aspx?username=shaillu&amp;priority=1&amp;dnd=1&amp;unicode=0
</code></pre>

<p>This program is successfully running on my local machine but when I am trying to run this on my online server to use for my website, then I am getting this error.
Please give me the cause of this error &amp; how can I resolve this.</p>

<p>Thank You.</p>
