*
The moose likes JSP and the fly likes connecting jsp page with sql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "connecting jsp page with sql" Watch "connecting jsp page with sql" New topic
Author

connecting jsp page with sql

suman vasireddy
Greenhorn

Joined: Nov 17, 2008
Posts: 12
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

Joined: Jun 06, 2007
Posts: 2716
    
    6

What have done till now? How far have you reached with the solution and where are you stuck?


SCJP, SCWCD.
|Asking Good Questions|
suman vasireddy
Greenhorn

Joined: Nov 17, 2008
Posts: 12
actually im unable to connect the data base to the jsp
Amol Nayak
Ranch Hand

Joined: Oct 26, 2006
Posts: 218
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

Joined: Oct 23, 2008
Posts: 5
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

Joined: Jun 06, 2007
Posts: 2716
    
    6

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

Joined: Jun 06, 2007
Posts: 2716
    
    6

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: connecting jsp page with sql
 
Similar Threads
field value displayed wrongly
The selected checkbox should be checked
Refreshing a window
how can i display my data on jsp page
Client API for Quartz