<%@page import="java.sql.*"%>
<%@page import="com.binod.db.DBConnection"%>
<jsp:include page="header.jsp"/>
<center>
<div class="content">
<table border="1" cellpadding="5" class="full">
<tr>
<td>Cat_id</td>
<td>cat_name</td>
<td>
Cat_Path
</td>
</tr>
<%
ResultSet rs;
DBConnection db=new DBConnection();
db.open();
String query="Select * from `category`";
PreparedStatement preparedStatement =db.getPreparedStatement(query);
rs=preparedStatement.executeQuery();
while(rs.next()){
int cat_id=rs.getInt("cat_id");
String cat_name=rs.getString("cat_name");
String cat_path=rs.getString("cat_image");
System.out.println(cat_path);
%>
<tr>
<td><%=cat_id %></td>
<td> <%= cat_name %></td>
<td class="Images"><img src="<%= cat_path%>" alt="Image not found"/></td>
</tr>
<%
}
%>
</table>
</div>
</center>
<jsp:include page="footer.jsp"/>
MY Console output: Image path stored in database
C:\Users\Binod\workspace\shop\Pictures\Category\bbb.jpg C:\Users\Binod\workspace\shop\Pictures\Category\bbb.jpg C:\Users\Binod\workspace\shop\Pictures\Category\Screenshot (5).png C:\Users\Binod\workspace\shop\Pictures\Category\Screenshot (5).png C:\Users\Binod\workspace\shop\Pictures\Category\Screenshot (5).png C:\Users\Binod\workspace\shop\Pictures\Category\Screenshot (5).png C:\Users\Binod\workspace\shop\Pictures\Category\Screenshot (5).png C:\Users\Binod\workspace\shop\Pictures\Category\Screenshot (6).png