• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use multiple tables in JSP page

 
Sriram Padavala
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am creating a page in jsp and I want to use 2 tables in the page with oracle 10g database.

I have a problem because. It is only possible for me to use only one table. How to use the entire database in a jsp page.

I added the table under SystemDSN and used it in the JSP page by the following commands
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbcdbc:logintable","system","manager");

Now I am in use of another table also. But I created the connection using logintable only. So please help me how to use two tables or multiple tables in JSP page. Help me clearly. Because I dont understand many articles.......
 
Mkunal badgujar
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sriram,

Please take this step by step. first of all use JSP as view. if you want to use database tables in jsp.

make a connection through separate javaclass use the same for accessing both the tables.

ones you get the result out of both the tables store it in different variables (use beans) and use the same variables the jsp (use scriptlet - not a good practice, but good for initial coding)



  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic