Hello,
I am trying to do a page where I will be able to edit student record.
I am using
Servlets and
JSP.
There is a "SearchResultsPage.jsp" where the student results will be displayed. When I click on the edit link in the results... I should be able to pass the relavant student id to the servlet.
When I used the following code.. In the servlet when I code
request.getParameter("sid"); its giving null. Even I am not able to get the "edit" as hyperlink.
I am using the following code:
for(int i = 0;i<al.size();i++)
{
ElementaryStudents obel = (ElementaryStudents)al.get(i);
out.print("<tr>");
out.print("<td>");out.print(obel.getFirstname());out.print("</td>");
out.print("<td>");out.print(obel.getLastname());out.print("</td>");
out.print("<td>");out.print(obel.getAddress1());out.print("</td>");
out.print("<td>");out.print(obel.getAddress2());out.print("</td>");
out.print("<td>");out.print(obel.getCity());out.print("</td>");
out.print("<td>");out.print(obel.getState());out.print("</td>");
out.print("<td>");out.print(obel.getZipcode());out.print("</td>");
out.print("<td>");out.print(obel.getEmailID());out.print("</td>");
out.print("<td>");out.print(obel.getPhone_home());out.print("</td>");
out.print("<td>");out.print(obel.getPhone_business());out.print("</td>");
out.print("<td>");out.print(obel.getPhone_mobile());out.print("</td>");
out.print("<td>");
out.print("<jsp:forward page='EditStudent.do' > Edit");
out.print("<jsp:param name='sid' value='value1' />");
out.print("</jsp:forward>");
out.print("</td>");
out.print("</tr>");
}
%>
Hope someone will help me..
Thank you soo much