Yes you can obviously do. You can do some JDBC coding in JSP itself by scriptlets or adopt a design pattern like MVC and put the JDBC code in your model part. [ January 20, 2006: Message edited by: Bimal Patel ]
Work Hard, Expect The Worst...<br /> <br />Bimal R. Patel<br />(SCJP 1.2, SCWCD 1.4)
Joined: Jun 24, 2004
can you help me and give me some code or links that explains inserting JDBC code in JSP, to make the page update/insert recordset?
That is the same way as you access a DB from JDBC from a stand alone class. 1. Load the drivers, 2. Aquire a connection object, 3. Get a simple/prepared statement object and 4. execute your sql update/insert by executeUpdate() method. But you should do this in the model layer rather then the view/presentation one.
Originally posted by Bashar Ayyash: can you help me and give me some code or links that explains inserting JDBC code in JSP, to make the page update/insert recordset?
I would start out with a few Google searches on JDBC Tutorial. There are quite a few out there so you should be able to find one that suits your taste pretty easily. fficial" target="_blank" rel="nofollow">http://www.google.com/search?q=JDBC+TUTORIAL&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-USfficial
There is also a JDBC forum on this list.
As always, I recommend getting your database calls working in a simple, standalone Java class from the command line. Once you've done that, you can easily call that class from your JSP.