title: how do I link to a servlet within javascript code
body: <p>I got an XLS pic inside of an HTML link, and i need to verify some information first before calling to the servlet, that's why i'm not including the servlet inside of the href="". So i've created a javascript function that verifies the input information in order to be used by the servlet.</p>
  
  <p>(The Servlet returns a XLS in order to be saved by the user).</p>
  
  <p>Tried this:</p>
  
  <pre><code>document.location.href = 'saveExcelServlet.do?' + &lt;&lt;GET method attributes&gt;&gt;;
  </code></pre>
  
  <p>But it didn't work.
  It says:
  Problem accessing /wscall-metrics-web/saveExcelServlet.do. Reason:</p>
  
  <pre><code>null
  </code></pre>
  
  <p>Caused by:</p>
  
  <pre><code>java.lang.NumberFormatException: null
  </code></pre>
  
  <p>If i write  it works...</p>
  
  <p>Can anyone help me?</p>
  
  <p>Thanks.</p>
  
  <p>M.</p>