I'm confused, your out.println(bunch-o-html) looks like a line of code that would
be in a servlet not a jsp.
You need a form to pass any kind of data from http client to http server. What I've
done in past is this.
Create a table with your first column containing a button. That button references
the primary key for the table in which you would like to update/add/remove. The
rest of the row contains input fields which correspond to a db row. Each row is
encapsulated by a form, this prevents the entire table from being updated. Then you
have a bean in the backend that handles all the actual db connectivity.

Regards,

Fz

Matt Brown wrote:

> I want to insert some buttons on a jsp page, that when clicked would each
> write a different predetermined row of data into a db. Is it possible to do
> this without using a form and servlet that would redisplay the page? I want
> the buttons to interact with db methods directly without affecting display.
>
> Is it possible to access beans via a bean id such as:
> out.println(" <TD><input type=\"button\" name=\"match\" value=\"match\"
> onClick=\"beanid.InsertRow()\"> ");
> ?
>
> Thanks,
> Matt
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to