Click here to Skip to main content
13,086,019 members (83,411 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 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 ,
Posted 25-Apr-13 22:42pm
Updated 25-Apr-13 23:07pm
Shubhashish_Mandal 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 26-Apr-13 5:31am
struts 2.1 and simple connection......

truptihota 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 26-Apr-13 5:06am
Is your previous issue resolved? If yes then start a new thread to ask your next question.
Richard MacCutchan 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 26-Apr-13 5:19am

truptihota 26-Apr-13 5:19am
I m using struts 2.1 simple connection
Shubhashish_Mandal 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 27-Apr-13 10:27am
I hv that mysql connection jar files bt don't know how to creat a connection pool
Shubhashish_Mandal 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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 26 Apr 2013
Copyright © CodeProject, 1999-2017
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