Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connecting jsp page with sql

 
suman vasireddy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys...

i have created a jsp page for regestring a user. and the problem is here. whenever i create a new user the details should be go to the table which is there in database when ever i pressed submit.......

so please solve my problem

thanks in advance
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have done till now? How far have you reached with the solution and where are you stuck?
 
suman vasireddy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually im unable to connect the data base to the jsp
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say its not a great idea to connect to Database from jsp move this logic out of jsp into a servlet.
 
mehul thakor
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am posting here a code to connect Oracle using jsp page.
You can modigy it and put SQL CONNECTION STRING....




[Edit: Solution removed]
[ November 20, 2008: Message edited by: Amit Ghorpade ]
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by suman vasireddy:
actually im unable to connect the data base to the jsp


why? dont you have a connection bean? It is a plain Java class that does the database connection stuff.Write that bean and use it in your JSP or servlet or anywhere you like.
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mehul, we believe in helping people learn things on their own so that the concepts go in easily. Giving away a solution means taking away a chance to learn and understand.One can get solutions directly once or twice but not all the time. If the concept/methodology is clear, then there is always a solution, just inside the head .

Let suman find the solution then we can always help to make it right.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic