Posting a request from one servlet to another
<p>I am writing a small module where in i need to post an xml string as a parmeter from one servlet to another servlet . The receiving servlet parses the xml and then sends the appropriate response.</p>

<pre><code>    mimetype = request.getParameter("uploadFile");
    mimetype = mimetype.substring(mimetype.indexOf(".") + 1);
    sessionKey = String.valueOf(1000);
    requesttype = "CliFileChkSync";
    localURL = null;
    xmlString = generateXML(requesttype, sessionKey, resourceId, localURL, mimetype);


    HttpClient client = new DefaultHttpClient();
    HttpGet httpget = new HttpGet(URLString+URLEncoder.encode(xmlString,"UTF-8"));;
    HttpResponse httpresponse = client.execute(httpget);
    System.out.println(httpresponse.toString());
</code></pre>

<p>The above snippet generates the xmlstring and i try to send it as a parameter.I am getting the following exceptions.</p>

<pre><code>Cannot start JMX connector: JmxConnector config: { name = system, Protocol = rmi_jrmp, Address = 0.0.0.0, Port = 8686, AcceptAll = false, AuthRealmName = admin-realm, SecurityEnabled = false}: java.io.IOException: Cannot bind to URL [rmi://raviteja-s.sisodomain.com:8686/jmxrmi]: javax.naming.NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    java.rmi.AccessException: Registry.Registry.rebind disallowed; origin unknown]
SEVERE: java.io.IOException: Cannot bind to URL [rmi://raviteja-s.sisodomain.com:8686/jmxrmi]: javax.naming.NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    java.rmi.AccessException: Registry.Registry.rebind disallowed; origin unknown]
</code></pre>

<p>and a whole lots of them.</p>

<p>Can you please help me where i am doing this wrong?Any links / references are highly helpful.</p>
