I am trying to access a bean's property from a jsp. A servlet is used in the middle. when I try the getProperty I get this error and I don't know what it means:
Note: sun.tools.javac.Main has been deprecated.
c:\ServletExec\Servlets\pagecompile\_projFourJSP_xjsp.java:42: Variable 'bean' is already defined in this method.
Object bean = pageContext.findAttribute( "bean" );
^
1 error, 1 warning
Please help
Code for JSP:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Project Four JSP</title>
<jsp:useBean id="bean"
class="java146.project4.ProjectFourServlet"
scope="application"/>
</head>
<body bgcolor = silver>
<center><h1>Search Results For Project Four</h1></center>
<table border = 2>
<th>
<tr>
<td>Empoyee ID </td>
<td>First Name </td>
<td>Middle Name </td>
<td>Last Name </td>
<td>SSN </td>
<td>Department </td>
<td>Room</td>
<td>Phone Ex.</td>
</tr>
</th>
<I><jsp:getProperty name="bean" property="employeeTable" /></I>
</table>
<A HREF="/">Home</A>
</body>
</html>
Note: sun.tools.javac.Main has been deprecated.
c:\ServletExec\Servlets\pagecompile\_projFourJSP_xjsp.java:42: Variable 'bean' is already defined in this method.
Object bean = pageContext.findAttribute( "bean" );
^
1 error, 1 warning
Please help
Code for JSP:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Project Four JSP</title>
<jsp:useBean id="bean"
class="java146.project4.ProjectFourServlet"
scope="application"/>
</head>
<body bgcolor = silver>
<center><h1>Search Results For Project Four</h1></center>
<table border = 2>
<th>
<tr>
<td>Empoyee ID </td>
<td>First Name </td>
<td>Middle Name </td>
<td>Last Name </td>
<td>SSN </td>
<td>Department </td>
<td>Room</td>
<td>Phone Ex.</td>
</tr>
</th>
<I><jsp:getProperty name="bean" property="employeeTable" /></I>
</table>
<A HREF="/">Home</A>
</body>
</html>