i copied these code from a website. but its not working please help me to solve error. image is not displaying
<%@page import="java.sql.ResultSet"%>
<%@ include file="getcon.jsp"%>
<html>
<head>
<title>View Image Page</title>
</head>
<body>
<table width="100%" border="0">
<%
ResultSet rs=null;
try
{
rs=st.executeQuery("select image from test");
while(rs.next())
{
%>
<table width="70%" height="160" border="1" align="center">
<tr>
<td><img src="image/<%=rs.getString("image") %>" width="115" height="128" /> </td>
</tr>
</table>
<%
}
}
catch(Exception e)
{
out.print(""+e.getMessage());
}
%>
</table>
</body>
</html>
getcon.jsp contains database connection
<%@ page import="java.sql.*" %>
<%!Statement st=null;
Connection cn=null;
%>
<%
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost/test","root","");
st=con.createStatement();
%>
so what changes should i make in this code. image is column name in test table.