0

In my application,with the help of joining, I am showing the dynamic value in my jsp page like this :

<%  while(rs.next()){ %>
<td><input type="checkbox" name="chkName" onclick="selectall()"></td> 
<td><input type="text"  name="empId" value="<%= rs.getString(1)%> "  disabled="disabled"  maxlength="10"></td>
<td><input type="text" name="device" value="<%= rs.getString(2)%>"  disabled="disabled" maxlength="10"></td>
<td><input type="text"  name="features" value="<%= rs.getString(3)%>"  disabled="disabled" maxlength="60"></td>
<td><input type="password" name="password" disabled="disabled"></td>
<td><input type="text"  name="policyName" value="<%= rs.getString(4)%>"  disabled="disabled" maxlength="10"></td>
</tr>
<% } 

And whenever from another servlet(as I want to show the fetching from this jsp to another jsp ) I am calling request.getParameter("empId"),it is fetching the "NULL" value.I think,I have to use set (session.setAttribute() or request.setParameter()).

oers
  • 18,436
  • 13
  • 66
  • 75
Tirtha
  • 351
  • 2
  • 6
  • 22

1 Answers1

0

You can pass the empId as a prameter to this JSP.

If you are using get then you can pass it along the URL. Like yoururl.com?empId=xyz

If you are using post you can make a form attribute named empId.

Subir Kumar Sao
  • 8,171
  • 3
  • 26
  • 47