Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: struts
hi,
i wanted to know how many class files I hava to make for a database program in struts frame work.i want to know the step by step process for creating a database connection with MYSQL and also that piece of code...
 

I m making a log-in page in struts application ..so I couldn't understand how can i fetch out an entire data base of a single person by giving user-id detail in log-in page by a database connection on program..
 

* i don't want any link for this answer,must be a satisfying theoretical answr
 
thanx ,
trupti
Posted 25-Apr-13 23:42pm
Edited 26-Apr-13 0:07am
(no name)405.2K
v4
Comments
Shubhashish_Mandal at 26-Apr-13 4:46am
   
To create database connection is very easy and for mysql you need only one jar file. But you have to tell me which version of struts you using and do you want to create simple connection or want to create datasource?
truptihota at 26-Apr-13 5:31am
   
struts 2.1 and simple connection......
 

thanx.
truptihota at 26-Apr-13 5:00am
   
through "add project capabilities" when i m adding struts 2.1 (in myeclipse) also i m not getting that tld file in my project
Shubhashish_Mandal at 26-Apr-13 5:06am
   
Is your previous issue resolved? If yes then start a new thread to ask your next question.
Richard MacCutchan at 26-Apr-13 5:08am
   
Please don't make demands in your questions. You are not paying for answers so you will have to be satisfied with what you get.
truptihota at 26-Apr-13 5:19am
   
ok......
 

 

 
thanx
truptihota at 26-Apr-13 5:19am
   
I m using struts 2.1 simple connection
Shubhashish_Mandal at 26-Apr-13 9:20am
   
In that case , as I told you before that only one jar file you need for JDBC with mysql . Download mysql connector jar file. Create a connection class which will return the connection .
And use this connection to retrieve info from database.
N.B. : I suggest you to use Connection Pool to create connection.
TRUPTI_HOTA at 27-Apr-13 10:27am
   
hii,
I hv that mysql connection jar files bt don't know how to creat a connection pool
Shubhashish_Mandal at 28-Apr-13 1:16am
   
pool is nothing but a well managed connection queue.So google it, you will get lots of example .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 319
1 Kornfeld Eliyahu Peter 265
2 Maciej Los 249
3 BillWoodruff 205
4 Sergey Alexandrovich Kryukov 175
0 OriginalGriff 5,107
1 DamithSL 4,157
2 Maciej Los 3,595
3 Kornfeld Eliyahu Peter 3,450
4 Sergey Alexandrovich Kryukov 2,741


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 26 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100