title: How to pass a variable to another JSP page?
body: <p>I am unfamiliar with jQuery and would like to know the proper way to pass a value to a different JSP. For example, given the code below:</p>
  
  <pre><code>function editURL() {
    var x = "&lt;%=nd.getNodedesc()%&gt;"
    $('body').load('editUrl.jsp', {
      x: 560,
      y: 100,
      height: 450,
      width: 551,
      title: "Edit:Advance configuration",
      skinMode: 'dialog',
      iframe: true,
      url: "editUrl.jsp",
      data: {
        filename: x
      },
      offResize: true,
      offMove: true,
      onTitle: false,
      offBottom: true
  });
  </code></pre>
  
  <p>I want to get the value <code>nd.getNodedesc()</code> which returns a file name and store it in <code>var x</code>. Then, I want to load <code>editUrl.jsp</code> and pass the data to the new JSP page.</p>
  
  <p>The editUrl.jsp:</p>
  
  <pre><code>&lt;%
    // get the values of filename and URL link
    String files = request.getParameter("filename");
  %&gt;
  
  &lt;body&gt;
    File Name: &lt;input type="text" name="Filename" value="&lt;%=files%&gt;" readonly&gt;&lt;br&gt;&lt;br&gt;
  </code></pre>
  
  <p>From there, I will get parameter from <code>filename</code> and pass it on. However, it seems that it returns null to the text name so I must have done something wrong.</p>
  
  <p>I couldn't find the problem but what was my mistake here?</p>
  
  <p>Edit:</p>
  
  <p>Tried changing the JS variable to <code>var x="test121212";</code> still passes null value to the new JSP page. Still no clue what went wrong.</p>