Database « Bean « JSP-Servlet Q&A





1. Is this A bean or db design problem    coderanch.com

I have a set of chkboxes on a jsp page. These checkboxes values are givien from a db. So I call a loop to show checkboxes. Problem being, is tat on my other jsp page that I allow to modify it, I would like to use the most effcient way to show all the checkboxes and which ones were checked an ...

3. Db connection in jsp works but when bean used does not work[solved]    coderanch.com

This code is directly embedded in the JSP page and it returns result properly.... <% Stringplace; Connection dbconn; ResultSet results; Statement stmt; try { Class.forName("org.gjt.mm.mysql.Driver").newInstance(); try { dbconn = DriverManager.getConnection("jdbc:mysql://localhost:3306/Forum_db","root","rootPassword"); stmt = dbconn.createStatement(); String query = "select * from `Forums_tbl`"; results = stmt.executeQuery(query); while(results.next()){ out.println(results.getString("Name")); } } catch (SQLException s) { out.println(s.toString()); } } catch (ClassNotFoundException err) { out.println("Class loading error"); ...

4. Fetching Bean value from database    coderanch.com

8. How to change the database instance for web service which uses entity beans    coderanch.com

Hello, I have created a web service which uses entity beans. I will have a config file for the web service. One of the properties is the database url. My question is how can I change the database programically? I want to be able to read the config file and make the change. I think I would have to change the ...





10. Is my code running twice? JSP, java beans, db updates - strange happenings    coderanch.com

I've created a web application consisting of jsp, html, java beans, etc. What is supposed to happen is the user submits the web page, some java code kicks off that inserts records into a database table (there are various checks to see if the record has already been inserted for the customer number, and other checks). The problem I'm running into ...

11. Stateless Session Beans and Database connection Pooling    coderanch.com

Hi All, I am using EJB3.1 I want to write a Stateless Session Bean which connects to the Oracle Database and reads the database metadata. The session beans basically will have two business methods. First method to return list of Tables in a database schema and second method to return list of columns of a particular table. I will expose a ...