I created this HTML page to accept the data from admin of page and store it in the database
And this is how the fetched data will be displayed on html.
Below is the retrieval code in JSP.
And how to Store an image in database directly while filling the form and how to show the image back into html page along with other data.
<%
Class.forName("org.apache.derby.jdbc.ClientDriver");
Connection con=DriverManager.getConnection("jdbc:derby://localhost:1527/SEM6 ","SEM6","SEM6");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("Select * from products");
%>
<%
while(rs.next())
{%>
<div class="productblock">
<div class="producttable">
<table>
<tr><a class="linkfill" href="products/<%= rs.getString("pid") %>.html"></a>
<td colspan="2"><span class="red"><%= rs.getString("name") %></span></td>
</tr>
<tr>
<td>ID: <span class="red"><%= rs.getString("pid") %></span></td>
<td rowspan="3"></td>
</tr>
<tr><td>Wattage: <span class="red"><%= rs.getString("watt") %></span></td></tr>
<tr><td>Price: <span class="red"><%= rs.getString("price") %></span></td></tr>
<tr><td colspan="2"><%= rs.getString("s_desc") %></td></tr>
</table>
</div>
</div>
<%
}%>