title: Servlet calling from window.showModalDialog(...)
body: <p>I am calling another application context from window.showModalDialog but confused with following work. Same code to pass parameter within showModalDialg.</p>
  
  <pre><code>var myArguments = new Object();
  myArguments.param1 = "Hello World :)";
  window.showModalDialog("java2sTarget.html", myArguments, ''); 
  </code></pre>
  
  <p>and i can read these myArguments(parameters) in generated HTML using following code:</p>
  
  <pre><code>&lt;script&gt;
    document.write(window.dialogArguments.param1);//Hello World :)
  &lt;/script&gt;
  </code></pre>
  
  <p>I can't use query string &amp; i am sending myArguments(parameter) because i want to hide parameter from Application user. </p>
  
  <p>Now i am calling servlet from showModalDialog(..) </p>
  
  <pre><code>onclick="window.showModelDialog('http://localhost:7778/app/servlet/test',myArguments,'');" 
  </code></pre>
  
  <p>onclick="window.showModelDialog('http://localhost:7778/app/servlet/test',myArguments,'');" </p>
  
  <p>But as per my knowledge</p>
  
  <pre><code>Servlet  --&gt; Servlet container --&gt; HTML+JS+CSS
  </code></pre>
  
  <p>so JS will be available at last phase, but i want to use in first phase(Servlet).</p>
  
  <p>Now, i need to make some Decision in servelt code based on myArguments(parameter).</p>
  
  <p>is there any way to read these myArguments(parameters) in servlet code?</p>