tags:

views:

74

answers:

2

how to insert checkbox values especially image url to mysql using jsp

A: 

You have to connect to the database, either directly via JDBC or via an ORM like Hibernate.

Then you simply issue a query or create an persist an object which stores your data.

ThiefMaster
+1  A: 

Give all checkboxes the same name but a different value.

<input type="checkbox" name="checkbox" value="foo">
<input type="checkbox" name="checkbox" value="bar">
<input type="checkbox" name="checkbox" value="baz">

Then you can obtain them in the servlet using HttpServletRequest#getParameterValues().

String[] checked = request.getParameterValues("checkbox");
BalusC