I have an html page with a text field for the user to enter an ID the user can then click the button:
<FORM METHOD=GET ACTION="find.jsp">
<TD><INPUT TYPE="text" NAME= "employeeID"></TD>
<INPUT TYPE="submit" VALUE= "Display Employee">
I then have a java page in a bean which works using a GUI because I have already done this, so I think it needs tweaking and I'm not sure if it needs a set method or not, there is already a database connection and other methods that get the correct information from the database, but the java that is necassary to understand what I'm doing is: can anyone help with what else i need for the jsp to work?
public String getSurname(String idEmployee)throws SQLException
employeeID = Integer.parseInt(idEmployee);
Result result = getResult(link, employeeID);
return result.getSurname(); }
and then the jsp code which i want to be able to show the employees surname from the database after the initial id entry from the user:
<%@ page language="java" contentType="text/html"
import="java.util.*" errorPage="errorSearch.jsp" %>
<jsp:useBean id="surname" class="Employee.EmployeeRecords" />
<jsp:setProperty name="surname" property="*" />
<TITLE>Search an Employee</TITLE>
<H1>Your Surname Result</H1>
<jsp:getProperty name="data" property="employeeID"/>
any help would be appreciated, thanks.