Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubts on JDBC

 
Viji be
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All

I have some doubts on JSP.I'm in the learning phase of JSP.

In firstpage.jsp with fields like First Name,Last Name,Phone Number.I have to store the field values in MySql.Iam using NetBeans IDE+TomCat Server.

I need to know exact Connection statements to store those field values.
Anyone please mention me some sample codes for it....


Next one is: In secondpage.jsp,I have UserName and Password.I have to show the field UserName(xyz) has been regitered in the next JSP page(say thirdpage.jsp).

Will href tag helps out in solving this issue?

Can anyone reply me for these 2 queries?

I have designed the page only database connection is leftover.

I have refered some Websites,but I didn't get clear idea.

Thank you!!!
[ March 25, 2005: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your best bet is to look for a JDBC tutorial..
This one is good:
http://csajsp-chapters.corewebprogramming.com/CSAJSP-Chapter18.pdf

A Google search will give you plenty more.
 
Gert Cuppens
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to connect to a MySQL database, you could make an abstract class which contains the exact connection statement, referring to the class driver you are using. If you are to change this driver, there's only one place where you have to change the source code.

Here's the abstract class.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65337
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to JDBC.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic