title: How to get and fetch url employee id in jsp dynamically
body: <p>I have one dynamic jsp page where i enter details in database in this page iam getting url string from other tables like below format <strong>EmployeeRegistration/Employee_vendor_approve.jsp?employee_id=25666</strong>
  Now my question is i want to fetch this employee_id in dynamic textbox user cannot edit this field i tried for using <strong>session.getAttribute("employee_id");</strong> but no work anyone can please help me here is my javascript and jsp code</p>
  
  <p>Javascript</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;form&gt;
  function getinput() 
  { 
  index ++; 
  var singleRecord = ""; 
  **singleRecord += " Employee_id : &lt;input type='text' name='txt_Employee_id"+index+"'&gt;";** //here employee_id should fetch dynamically from other jsp page
  singleRecord += " Project_name : &lt;input type='text' name='txt_project_name"+index+"'&gt;"; 
  singleRecord += "Project/Task : &lt;input type='text' name='txt_Header"+index+"'&gt;"; 
  singleRecord += "Department : &lt;input type='text' name='txt_Department"+index+"'&gt;"; 
  singleRecord += "Description : &lt;input type='text' name='txt_description"+index+"'&gt;"; 
  &lt;!--singleRecord+="Date : &lt;input type='date'  name='datainsertdate"+index+"'&gt;"; ---&gt;
  singleRecord += "&lt;hr/&gt;"; 
  $("#inputs").append(singleRecord); 
  $("#count").val(index); 
  }
  
  &lt;/script&gt; 
  
  &lt;/head&gt; 
  
  &lt;body background="123-slideshow\blue_background.jpg"&gt;
  &lt;form action="EmployeeVendorValidation.jsp" method="post"&gt; 
  
       &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;    
  &lt;input type="hidden" name="count" id="count"/&gt; 
  
  
  
  &lt;div id="inputs"&gt; 
  &lt;/div&gt; 
  &lt;button type="button" onclick="getinput()" class="button button5"&gt;Add&lt;/button&gt; 
  
  &amp;nbsp; 
  &lt;button type="submit" class="button button2"&gt;Submit&lt;/button&gt; 
  
  
  &lt;/form&gt; 
  &lt;/body&gt; 
  
  &lt;/html&gt;
  </code></pre>
  
  <p>JSP</p>
  
  <pre><code>int count = Integer.parseInt(request.getParameter("count")); 
  
  if(count &gt;0){ 
  
  for(int i=1;i&lt;=count;i++){ 
  
  
   //employee_id_numeric=Integer.parseInt(request.getParameter("employee_id")+i);
   String employee_id = request.getParameter("txt_Employee_id"+i);
  String txt_project_name = request.getParameter("txt_project_name"+i); 
  String get_header = request.getParameter("txt_Header"+i); 
  String get_department = request.getParameter("txt_Department"+i); 
  String get_description = request.getParameter("txt_description"+i); 
  
  ps.setString(1, employee_id);   
  ps.setString(2, txt_project_name); 
  ps.setString(3, get_header); 
  ps.setString(4, get_department); 
  ps.setString(5, get_description); 
  
  ps.addBatch(); 
  } 
  } 
  ps.executeBatch(); 
  </code></pre>