• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting details from database

 
kirankumar dondapati
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to get values from database and display them to the user using struts frame work? please write the code
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


please write the code


I dont think here anyone will take the assignments

What have you written till now or thought of writing? Let us know that first.

Even if not in Struts, are you aware of retrieving the data from the database and display it? If your answer is NO to this question, please read about JDBC and the way you can interact with database and how you can get the values from the database. As this is the basic for any database related operations in your application.

Then you can think of displaying it in JSP and through Struts.
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all you should not connect to database direct from Struts actions. This should be done in the model layer. The model layer can be built outside the struts framework so the best place to ask this type of question is in the JDBC forum, or check the Hibernate ORM framework.

When I googled "database connection in struts" I got a lot of hits. Haven't read them but please try google for this first

Sorry Posted this at the same time.

// Mathias
[ May 25, 2007: Message edited by: Mathias Nilsson ]
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Mathias,

This happened with me also once. That too exact replica of the answer

Stay Cool
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic